public class Assignment extends Mbo implements AssignmentRemote
This is a site level object.
There is no unique key for this object.
The attributes in this object are as follows:
Attribute Name | Description |
---|---|
Craft | The craft that is needed to meet this requirement.
|
FinishDate | The datetime someone was assigned to finish this requirement. |
Labor
| A non persistent attribute to represent the laborcode or craft code which assigned to this requirement. |
LaborCode
| The identifier of the Labor assigned to this requirement.
|
LaborHrs | The length of time the craft will be required. |
Name
| The name of the laborcode or craft code which assigned to this requirement, non persistent attribute. |
OrgID
| Identifier of the organization for this failure. |
Rate
| The Rate of the labor or craft which assigned to this requirement, non persistent attribute. |
ScheduleDate | The datetime when this requirement has been rescheduled for. |
SiteID
| Identifier of the site for this failure. |
StartDate | The datetime someone was assigned to start this requirement. |
Status | The status of the requirement. |
TaskID
| The task identifier to the work order which this requirement applies, non
persistent attribute.
|
WplaborId | Identifier to the exact WPLabor record used to generate this row.
|
WoNum | Identifier to the work order which this requirement applies.
|
MULTILANGCOPY, phantomList, phantomQueue
ALLROWS, CHANGEDBY_USER, COUNT_ADDITIONS, COUNT_AFTERSAVE, COUNT_DATABASE, COUNT_DELETED, COUNT_EXISTING, DBCONFIG, DELAYVALIDATION, DELAYVALIDATIONONLY, DISCARDABLE, GOTCOMPLETEWHERE, HIDDEN, NO_RELATEDMBOS_OF_OWNERSCHILDREN_FETCH, NOACCESSCHECK, NOACTION, NOADD, NOCOMMIT, NODELETE, NONE, NOOVERWRITE, NOSAVE, NOSETVALUE, NOUPDATE, NOVALIDATION, NOVALIDATION_AND_NOACTION, NOVALIDATION_AND_NOACTION_ALLOWCROSSOVER, READONLY, REBUILD, REQUIRED, SAMEVALUEVALIDATION, SETBYPARENT, USER
Constructor and Description |
---|
Assignment(MboSet ms)
Your basic construtor
|
Modifier and Type | Method and Description |
---|---|
void |
add()
Creates a new assigment object.
|
void |
calcFinishDate()
Calculates the finish date based on ScheduleDate and LaborHrs; if either is null, then FinishDate is also set to
null.
|
boolean |
calledFromAssignmentManager() |
boolean |
canFinishWO(WO woMbo)
Checks whether the workorder can be completed or closed.
|
void |
completeAssignment()
Calls completeAssignment(boolean) with the boolean set to true, which will complete the work order as part of its
action.
|
void |
completeAssignment(boolean completeWO)
Completes an assignment: changes the status to Complete, creates a LabTrans record, and completes or closes the
parent Work Order if all assignments are now complete and if the passed completeWO parameter is set to true.
|
void |
completeAssignment(java.lang.String status,
java.util.Date date)
Completes an assignment for the specified status and date/time.
|
void |
completeTheWO(WORemote ownerWO)
Completes or closes the parent work order if all assignments are now complete.
|
int |
countMembers() |
void |
createLabTrans(WORemote ownerWO)
Creates a LabTrans record for this assignment.
|
void |
createToolTransCrew(WORemote ownerWO,
AMCrewRemote crew)
Creates the TOOLTRANS records for a given crew assigned.
|
void |
finishAssignment(java.util.Date finishDate)
Finish Assignment.
|
java.lang.String |
getCrewWorkZoneWhere(MboRemote owner) |
java.lang.String |
getLaborWorkZoneWhere(MboRemote owner) |
LabTransSetRemote |
getLabTransSet()
Allows a bean to retrieve a newly created labTrans MboSet for cleanup purposes if there was a problem.
|
ToolTransSetRemote |
getToolTransSet()
Allows a bean to retrieve a newly created TOOLTRANS MboSet for cleanup purposes if there was a problem.
|
java.util.Date |
getWPEndDateTime(MboRemote WorkTimeMbo,
java.util.Date wpStartDateTime,
java.util.GregorianCalendar scratchCal,
AvailCalc availCalc)
Gets the end datetime for a workperiod.
|
void |
init()
Initialization routine.
|
void |
interruptAssignment(java.util.Date interruptDate)
Interrupt Assignment.
|
void |
propagateKeyValue(java.lang.String keyName,
java.lang.String keyValue)
Set value for Wonum.
|
void |
startAssignment(java.util.Date startDate)
Start the assignment.
|
addMboSetForRequiredCheck, addToDeleteForInsertList, andEvaluateConditions, appValidate, blindCopy, canDelete, checkFieldAccess, checkMethodAccess, checkMethodAccess, checkQualifiedRestriction, checkSiteOrgAccessForSave, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, delete, determineRequiredFieldsFromERM, duplicate, enableMethod, evaluateCondition, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, evaluateRestriction, excludeObjectForPropagate, findAllNullRequiredFields, fireEvent, generateAutoKey, generateContentUID, getAlwaysFlags, getAttrRestrictionFlag, getAttrRestrictions, getBoolean, getByte, getBytes, getCheckpoint, getClientLocale, getClientTimeZone, getCommLogOwnerNameAndUniqueId, getCondition, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainFilterWhere, getDomainIDs, getDouble, getExistingMboSet, getFetchIndex, getFieldExceptions, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertSite, getInstanciatedMboSet, getInstanciatedMboValue, getInt, getIntegrationService, getKeyValue, getLanguageRecordRowStamp, getLinesRelationship, getList, getLockedByDisplayName, getLockedByUserID, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboData, getMboDataSet, getMboForAttribute, getMboForAttributeStatic, getMboInitialValue, getMboList, getMboLogger, getMboRecordData, getMboServer, getMboSet, getMboSet, getMboSet, getMboSetInfo, getMboValue, getMboValueData, getMboValueData, getMboValueData, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getProfile, getPropagateKeyFlag, getProxy, getRecordIdentifer, getRecordMboName, getRelatedWhere, getRelatedWhere, getRelationshipNameToLangTable, getRowRestrictionFlag, getRowStamp, getSecurityLogger, getSiteOrg, getSqlLogger, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getSynonymValueWhere, getTenantId, getThisMboSet, getTranslator, getUniqueIdentifer, getUniqueIDName, getUniqueIDValue, getUserInfo, getUserName, getValidateOrder, hasFieldAccess, hasHierarchyLink, hasLockSaveRights, hasRelatedQbe, hasUniqueID, initFieldFlagsOnMbo, initRelationship, isAutoKeyed, isBasedOn, isChangeByUserWhenSetFromLookup, isEAuditFieldModified, isESigFieldModified, isFlagSet, isForDM, isLocked, isLocked, isLockedByMe, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNull, isOptionGranted, isSelected, isSkipCopyField, isValid, isZombie, lock, modify, moveFieldFlagsToMboValue, needCallInitFieldFlag, orEvaluateConditions, removeRelatedSet, rollbackToCheckpoint, select, setAppDefaultValue, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDefaultValue, setDefaultValues, setDeleted, setEAuditFieldModified, setESigFieldModified, setFetchIndex, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setHierarchyLink, setIgnoreRecordLockCheck, setLangCodeDefault, setMLValue, setModified, setNewMbo, setPropagateKeyFlag, setPropagateKeyFlag, setProxy, setReadonlyWhenParentIsReadonly, setReferencedMbo, setReferencedMbo, setUniqueIDValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromSequence, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, useDataSecurity, validate, validateAttributes, validateKeyUniqueness, valueChanged
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMboSetForRequiredCheck, addToDeleteForInsertList, blindCopy, checkMethodAccess, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, delete, duplicate, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, excludeObjectForPropagate, generateAutoKey, getBoolean, getByte, getBytes, getCommLogOwnerNameAndUniqueId, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainIDs, getDouble, getExistingMboSet, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertSite, getInt, getKeyValue, getLinesRelationship, getList, getLockedByDisplayName, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboData, getMboDataSet, getMboInitialValue, getMboList, getMboSet, getMboSet, getMboSet, getMboValueData, getMboValueData, getMboValueData, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getPropagateKeyFlag, getRecordIdentifer, getSiteOrg, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getThisMboSet, getUniqueIDName, getUniqueIDValue, getUserInfo, getUserName, hasHierarchyLink, hasLockSaveRights, isAutoKeyed, isBasedOn, isFlagSet, isForDM, isLocked, isLocked, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNull, isOptionGranted, isSelected, isZombie, lock, rollbackToCheckpoint, select, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDeleted, setESigFieldModified, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setIgnoreRecordLockCheck, setMLValue, setModified, setNewMbo, setPropagateKeyFlag, setPropagateKeyFlag, setReferencedMbo, setReferencedMbo, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, validate, validateAttributes
public Assignment(MboSet ms) throws MXException, java.rmi.RemoteException
ms
- The Assignment MboSet.MXException
java.rmi.RemoteException
public void init() throws MXException
init
in class Mbo
MXException
public void add() throws MXException, java.rmi.RemoteException
add
in interface MboRemote
add
in class Mbo
MXApplicationException
- AddAssignment when its owner is not WorkorderMXException
java.rmi.RemoteException
public boolean calledFromAssignmentManager() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void completeAssignment(java.lang.String status, java.util.Date date) throws MXException, java.rmi.RemoteException
completeAssignment
in interface AssignmentRemote
date
- the date/time of the completion an assignmentstatus
- a synonym of the COMPLETEMXException
java.rmi.RemoteException
completeAssignment(String status, Date date)
public void completeAssignment() throws MXException, java.rmi.RemoteException
completeAssignment
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public void completeAssignment(boolean completeWO) throws MXException, java.rmi.RemoteException
completeAssignment
in interface AssignmentRemote
completeWO
- Determines whether the workorder that owns this assignment will have its status changed to
Close or Comp.MXException
java.rmi.RemoteException
public LabTransSetRemote getLabTransSet() throws MXException, java.rmi.RemoteException
getLabTransSet
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public void createLabTrans(WORemote ownerWO) throws MXException, java.rmi.RemoteException
createLabTrans
in interface AssignmentRemote
ownerWO
- The workorder that is the owner of this assignment.MXException
java.rmi.RemoteException
public ToolTransSetRemote getToolTransSet() throws MXException, java.rmi.RemoteException
AssignmentRemote
getToolTransSet
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public void createToolTransCrew(WORemote ownerWO, AMCrewRemote crew) throws MXException, java.rmi.RemoteException
AssignmentRemote
createToolTransCrew
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public void completeTheWO(WORemote ownerWO) throws MXException, java.rmi.RemoteException
completeTheWO
in interface AssignmentRemote
ownerWO
- The workorder that is the owner of this assignment.MXException
java.rmi.RemoteException
public boolean canFinishWO(WO woMbo) throws MXException, java.rmi.RemoteException
canFinishWO
in interface AssignmentRemote
ownerWO
- The workorder that is the owner of this assignment.MXException
java.rmi.RemoteException
public java.util.Date getWPEndDateTime(MboRemote WorkTimeMbo, java.util.Date wpStartDateTime, java.util.GregorianCalendar scratchCal, AvailCalc availCalc) throws MXException, java.rmi.RemoteException
getWPEndDateTime
in interface AssignmentRemote
WorkTimeMbo
- The WorkPeriod or ModAvail mbo whos endtime we're converting to a datetime.wpStartDateTime
- The start time of the workperiod in datetime format.scratchCal
- A Gregorian calendar.availCalc
- An AvailCalc object.MXException
java.rmi.RemoteException
public void calcFinishDate() throws MXException, java.rmi.RemoteException
calcFinishDate
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public void propagateKeyValue(java.lang.String keyName, java.lang.String keyValue) throws MXException, java.rmi.RemoteException
propagateKeyValue
in interface MboRemote
propagateKeyValue
in class Mbo
keyName
- Should equal "wonum" or else nothing will be propagated.keyValue
- The new value of wonum.MXException
java.rmi.RemoteException
public void startAssignment(java.util.Date startDate) throws MXException, java.rmi.RemoteException
startAssignment
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public void interruptAssignment(java.util.Date interruptDate) throws MXException, java.rmi.RemoteException
interruptAssignment
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public void finishAssignment(java.util.Date finishDate) throws MXException, java.rmi.RemoteException
finishAssignment
in interface AssignmentRemote
MXException
java.rmi.RemoteException
public java.lang.String getCrewWorkZoneWhere(MboRemote owner) throws MXException, java.rmi.RemoteException
getCrewWorkZoneWhere
in interface AssignmentRemote
MXException
java.rmi.RemoteException
- This is to build a query to find the 'Work Zones associated to a Crew via the main Location/Asset on WO application
and the Crew Type in the Assignment table.public java.lang.String getLaborWorkZoneWhere(MboRemote owner) throws MXException, java.rmi.RemoteException
getLaborWorkZoneWhere
in interface AssignmentRemote
MXException
java.rmi.RemoteException
- This is to build a query to find the 'Work Zones associated to a Labor via the main Location/Asset on WO application
and the planned Craft in the Assignment table.public int countMembers() throws java.rmi.RemoteException, MXException, java.sql.SQLException
java.rmi.RemoteException
MXException
java.sql.SQLException