Package org.compiere.model
Class MRequest
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_R_Request
-
- org.compiere.model.MRequest
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_Persistent
,I_R_Request
,Evaluatee
public class MRequest extends X_R_Request
Request Model- Version:
- $Id: MRequest.java,v 1.2 2006/07/30 00:51:03 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
SEPARATOR
Separator line-
Fields inherited from class org.compiere.model.X_R_Request
CONFIDENTIALTYPE_AD_Reference_ID, CONFIDENTIALTYPE_Internal, CONFIDENTIALTYPE_PartnerConfidential, CONFIDENTIALTYPE_PrivateInformation, CONFIDENTIALTYPE_PublicInformation, CONFIDENTIALTYPEENTRY_AD_Reference_ID, CONFIDENTIALTYPEENTRY_Internal, CONFIDENTIALTYPEENTRY_PartnerConfidential, CONFIDENTIALTYPEENTRY_PrivateInformation, CONFIDENTIALTYPEENTRY_PublicInformation, DUETYPE_AD_Reference_ID, DUETYPE_Due, DUETYPE_Overdue, DUETYPE_Scheduled, NEXTACTION_AD_Reference_ID, NEXTACTION_FollowUp, NEXTACTION_None, PRIORITY_AD_Reference_ID, PRIORITY_High, PRIORITY_Low, PRIORITY_Medium, PRIORITY_Minor, PRIORITY_Urgent, PRIORITYUSER_AD_Reference_ID, PRIORITYUSER_High, PRIORITYUSER_Low, PRIORITYUSER_Medium, PRIORITYUSER_Minor, PRIORITYUSER_Urgent, TASKSTATUS_0NotStarted, TASKSTATUS_100Complete, TASKSTATUS_20Started, TASKSTATUS_40Busy, TASKSTATUS_60GoodProgress, TASKSTATUS_80NearlyDone, TASKSTATUS_90Finishing, TASKSTATUS_95AlmostDone, TASKSTATUS_99CleaningUp, TASKSTATUS_AD_Reference_ID
-
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_R_Request
accessLevel, COLUMNNAME_A_Asset_ID, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_Role_ID, COLUMNNAME_AD_Table_ID, COLUMNNAME_AD_User_ID, COLUMNNAME_C_Activity_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_Campaign_ID, COLUMNNAME_C_Invoice_ID, COLUMNNAME_C_InvoiceRequest_ID, COLUMNNAME_C_Order_ID, COLUMNNAME_C_Payment_ID, COLUMNNAME_C_Project_ID, COLUMNNAME_CloseDate, COLUMNNAME_ConfidentialType, COLUMNNAME_ConfidentialTypeEntry, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateCompletePlan, COLUMNNAME_DateLastAction, COLUMNNAME_DateLastAlert, COLUMNNAME_DateNextAction, COLUMNNAME_DateStartPlan, COLUMNNAME_DocumentNo, COLUMNNAME_DueType, COLUMNNAME_EndTime, COLUMNNAME_IsActive, COLUMNNAME_IsEscalated, COLUMNNAME_IsInvoiced, COLUMNNAME_IsSelfService, COLUMNNAME_LastResult, COLUMNNAME_M_ChangeRequest_ID, COLUMNNAME_M_FixChangeNotice_ID, COLUMNNAME_M_InOut_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_M_ProductSpent_ID, COLUMNNAME_M_RMA_ID, COLUMNNAME_NextAction, COLUMNNAME_Priority, COLUMNNAME_PriorityUser, COLUMNNAME_Processed, COLUMNNAME_QtyInvoiced, COLUMNNAME_QtyPlan, COLUMNNAME_QtySpent, COLUMNNAME_R_Category_ID, COLUMNNAME_R_Group_ID, COLUMNNAME_R_MailText_ID, COLUMNNAME_R_Request_ID, COLUMNNAME_R_Request_UU, COLUMNNAME_R_RequestRelated_ID, COLUMNNAME_R_RequestType_ID, COLUMNNAME_R_Resolution_ID, COLUMNNAME_R_StandardResponse_ID, COLUMNNAME_R_Status_ID, COLUMNNAME_Record_ID, COLUMNNAME_RequestAmt, COLUMNNAME_Result, COLUMNNAME_SalesRep_ID, COLUMNNAME_StartDate, COLUMNNAME_StartTime, COLUMNNAME_Summary, COLUMNNAME_TaskStatus, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MRequest(Properties ctx, int SalesRep_ID, int R_RequestType_ID, String Summary, boolean isSelfService, String trxName)
SelfService ConstructorMRequest(Properties ctx, int R_Request_ID, String trxName)
ConstructorMRequest(Properties ctx, ResultSet rs, String trxName)
Load Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToResult(String Result)
Add To Resultprotected boolean
afterSave(boolean newRecord, boolean success)
After Saveprotected boolean
beforeSave(boolean newRecord)
Before SaveFile
createPDF()
Create PDFFile
createPDF(File file)
Create PDF filevoid
doClose()
(Soft) Close request.void
doEscalate(boolean user)
Escalate requestMRequestAction[]
getActions()
Get Action HistoryMBPartner
getBPartner()
Get BPartner (may be not defined)MRequestCategory
getCategory()
Get Request CategoryString
getCategoryName()
Get Request Category NameString
getConfidentialEntryText()
Get Confidential Entry Text (for jsp)String
getConfidentialText()
Get Confidential Text (for jsp)String
getCreatedByName()
Get Name of creatorString
getDueTypeText()
Get DueType Text (for jsp)MGroup
getGroup()
Get Request GroupString
getGroupName()
Get Request Group NameString
getMailTag()
Get Mail TagString
getPriorityText()
Get Priority Text (for jsp)String
getPriorityUserText()
Get Importance Text (for jsp)static int
getR_Request_ID(String mailText)
Get Request ID from mail textMRequestType
getRequestType()
Get Request TypeString
getRequestTypeName()
Get Request Type Text (for jsp)MResolution
getResolution()
Get Request ResolutionString
getResolutionName()
Get Request Resolution NameMUser
getSalesRep()
Get Sales RepString
getSalesRepName()
Get Sales Rep NameMStatus
getStatus()
Get StatusString
getStatusName()
Get Request Status NameMRequestUpdate[]
getUpdates(String confidentialType)
Get UpdatesMRequestUpdate[]
getUpdatesCustomer()
Get Customer UpdatesMRequestUpdate[]
getUpdatesInternal()
Get Internal UpdatesMRequestUpdate[]
getUpdatesPublic()
Get Public UpdatesMUser
getUser()
Get Contact (may be not defined)boolean
isChanged()
boolean
isDue()
Is dueboolean
isOverdue()
Is Overdueboolean
isWebCanUpdate()
Web Can Update Requestvoid
setConfidentialTypeEntry(String ConfidentialTypeEntry)
Set Confidential Type Entryvoid
setDateLastAlert()
Set Date Last Alert to todayvoid
setDueType()
Set DueType based on Date Next Actionvoid
setIsChanged(boolean changed)
void
setR_RequestType_ID()
Set Default Request Type.void
setR_Status_ID()
Set Default Request Status.void
setSalesRep_ID(int SalesRep_ID)
Set SalesRep_IDString
toString()
String Representationboolean
webUpdate(String result)
Web Update-
Methods inherited from class org.compiere.model.X_R_Request
get_AccessLevel, getA_Asset, getA_Asset_ID, getAD_Role, getAD_Role_ID, getAD_Table, getAD_Table_ID, getAD_User, getAD_User_ID, getC_Activity, getC_Activity_ID, getC_BPartner, getC_BPartner_ID, getC_Campaign, getC_Campaign_ID, getC_Invoice, getC_Invoice_ID, getC_InvoiceRequest, getC_InvoiceRequest_ID, getC_Order, getC_Order_ID, getC_Payment, getC_Payment_ID, getC_Project, getC_Project_ID, getCloseDate, getConfidentialType, getConfidentialTypeEntry, getDateCompletePlan, getDateLastAction, getDateLastAlert, getDateNextAction, getDateStartPlan, getDocumentNo, getDueType, getEndTime, getKeyNamePair, getLastResult, getM_ChangeRequest, getM_ChangeRequest_ID, getM_FixChangeNotice, getM_FixChangeNotice_ID, getM_InOut, getM_InOut_ID, getM_Product, getM_Product_ID, getM_ProductSpent, getM_ProductSpent_ID, getM_RMA, getM_RMA_ID, getNextAction, getPriority, getPriorityUser, getQtyInvoiced, getQtyPlan, getQtySpent, getR_Category, getR_Category_ID, getR_Group, getR_Group_ID, getR_MailText, getR_MailText_ID, getR_Request_ID, getR_Request_UU, getR_RequestRelated, getR_RequestRelated_ID, getR_RequestType, getR_RequestType_ID, getR_Resolution, getR_Resolution_ID, getR_StandardResponse, getR_StandardResponse_ID, getR_Status, getR_Status_ID, getRecord_ID, getRequestAmt, getResult, getSalesRep_ID, getStartDate, getStartTime, getSummary, getTaskStatus, initPO, isEscalated, isInvoiced, isProcessed, isSelfService, setA_Asset_ID, setAD_Role_ID, setAD_Table_ID, setAD_User_ID, setC_Activity_ID, setC_BPartner_ID, setC_Campaign_ID, setC_Invoice_ID, setC_InvoiceRequest_ID, setC_Order_ID, setC_Payment_ID, setC_Project_ID, setCloseDate, setConfidentialType, setDateCompletePlan, setDateLastAction, setDateLastAlert, setDateNextAction, setDateStartPlan, setDocumentNo, setDueType, setEndTime, setIsEscalated, setIsInvoiced, setIsSelfService, setLastResult, setM_ChangeRequest_ID, setM_FixChangeNotice_ID, setM_InOut_ID, setM_Product_ID, setM_ProductSpent_ID, setM_RMA_ID, setNextAction, setPriority, setPriorityUser, setProcessed, setQtyInvoiced, setQtyPlan, setQtySpent, setR_Category_ID, setR_Group_ID, setR_MailText_ID, setR_Request_ID, setR_Request_UU, setR_RequestRelated_ID, setR_RequestType_ID, setR_Resolution_ID, setR_StandardResponse_ID, setR_Status_ID, setRecord_ID, setRequestAmt, setResult, setStartDate, setStartTime, setSummary, setTaskStatus
-
Methods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
Methods inherited from interface org.compiere.model.I_R_Request
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
-
-
-
Field Detail
-
SEPARATOR
public static final String SEPARATOR
Separator line- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MRequest
public MRequest(Properties ctx, int R_Request_ID, String trxName)
Constructor- Parameters:
ctx
- contextR_Request_ID
- request or 0 for newtrxName
- transaction
-
MRequest
public MRequest(Properties ctx, int SalesRep_ID, int R_RequestType_ID, String Summary, boolean isSelfService, String trxName)
SelfService Constructor- Parameters:
ctx
- contextSalesRep_ID
- SalesRepR_RequestType_ID
- request typeSummary
- summaryisSelfService
- self servicetrxName
- transaction
-
MRequest
public MRequest(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
-
Method Detail
-
getR_Request_ID
public static int getR_Request_ID(String mailText)
Get Request ID from mail text- Parameters:
mailText
- mail text- Returns:
- ID if it contains request tag otherwise 0
-
setR_RequestType_ID
public void setR_RequestType_ID()
Set Default Request Type.
-
setR_Status_ID
public void setR_Status_ID()
Set Default Request Status.
-
addToResult
public void addToResult(String Result)
Add To Result- Parameters:
Result
-
-
setDueType
public void setDueType()
Set DueType based on Date Next Action
-
getActions
public MRequestAction[] getActions()
Get Action History- Returns:
- array of actions
-
getUpdates
public MRequestUpdate[] getUpdates(String confidentialType)
Get Updates- Parameters:
confidentialType
- maximum confidential type - null = all- Returns:
- updates
-
getUpdatesPublic
public MRequestUpdate[] getUpdatesPublic()
Get Public Updates- Returns:
- public updates
-
getUpdatesCustomer
public MRequestUpdate[] getUpdatesCustomer()
Get Customer Updates- Returns:
- customer updates
-
getUpdatesInternal
public MRequestUpdate[] getUpdatesInternal()
Get Internal Updates- Returns:
- internal updates
-
getRequestType
public MRequestType getRequestType()
Get Request Type- Returns:
- Request Type
-
getRequestTypeName
public String getRequestTypeName()
Get Request Type Text (for jsp)- Returns:
- Request Type Text
-
getCategory
public MRequestCategory getCategory()
Get Request Category- Returns:
- category
-
getCategoryName
public String getCategoryName()
Get Request Category Name- Returns:
- name
-
getGroup
public MGroup getGroup()
Get Request Group- Returns:
- group
-
getGroupName
public String getGroupName()
Get Request Group Name- Returns:
- name
-
getStatus
public MStatus getStatus()
Get Status- Returns:
- status
-
getStatusName
public String getStatusName()
Get Request Status Name- Returns:
- name
-
getResolution
public MResolution getResolution()
Get Request Resolution- Returns:
- resolution
-
getResolutionName
public String getResolutionName()
Get Request Resolution Name- Returns:
- name
-
isOverdue
public boolean isOverdue()
Is Overdue- Returns:
- true if overdue
-
isDue
public boolean isDue()
Is due- Returns:
- true if due
-
getDueTypeText
public String getDueTypeText()
Get DueType Text (for jsp)- Returns:
- text
-
getPriorityText
public String getPriorityText()
Get Priority Text (for jsp)- Returns:
- text
-
getPriorityUserText
public String getPriorityUserText()
Get Importance Text (for jsp)- Returns:
- text
-
getConfidentialText
public String getConfidentialText()
Get Confidential Text (for jsp)- Returns:
- text
-
getConfidentialEntryText
public String getConfidentialEntryText()
Get Confidential Entry Text (for jsp)- Returns:
- text
-
setDateLastAlert
public void setDateLastAlert()
Set Date Last Alert to today
-
getSalesRep
public MUser getSalesRep()
Get Sales Rep- Specified by:
getSalesRep
in interfaceI_R_Request
- Overrides:
getSalesRep
in classX_R_Request
- Returns:
- Sales Rep User
-
getSalesRepName
public String getSalesRepName()
Get Sales Rep Name- Returns:
- Sales Rep User
-
getCreatedByName
public String getCreatedByName()
Get Name of creator- Returns:
- name
-
getUser
public MUser getUser()
Get Contact (may be not defined)- Returns:
- Sales Rep User
-
getBPartner
public MBPartner getBPartner()
Get BPartner (may be not defined)- Returns:
- Sales Rep User
-
isWebCanUpdate
public boolean isWebCanUpdate()
Web Can Update Request- Returns:
- true if Web can update
-
setConfidentialTypeEntry
public void setConfidentialTypeEntry(String ConfidentialTypeEntry)
Set Confidential Type Entry- Specified by:
setConfidentialTypeEntry
in interfaceI_R_Request
- Overrides:
setConfidentialTypeEntry
in classX_R_Request
- Parameters:
ConfidentialTypeEntry
- confidentiality
-
webUpdate
public boolean webUpdate(String result)
Web Update- Parameters:
result
- result- Returns:
- true if updated
-
toString
public String toString()
String Representation- Overrides:
toString
in classX_R_Request
- Returns:
- info
-
createPDF
public File createPDF()
Create PDF- Returns:
- pdf or null
-
createPDF
public File createPDF(File file)
Create PDF file- Parameters:
file
- output file- Returns:
- file if success
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
setSalesRep_ID
public void setSalesRep_ID(int SalesRep_ID)
Set SalesRep_ID- Specified by:
setSalesRep_ID
in interfaceI_R_Request
- Overrides:
setSalesRep_ID
in classX_R_Request
- Parameters:
SalesRep_ID
- id
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success)
After Save
-
getMailTag
public String getMailTag()
Get Mail Tag- Returns:
- [Req@{id}@]
-
doClose
public void doClose()
(Soft) Close request. Must be called after webUpdate
-
doEscalate
public void doEscalate(boolean user)
Escalate request- Parameters:
user
- true if user escalated - otherwise system
-
isChanged
public boolean isChanged()
-
setIsChanged
public void setIsChanged(boolean changed)
-
-