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, phantomQueueALLROWS, 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 |
delete()
Mark the object to be deleted with all the normal security checks.
|
void |
finishAssignment(java.util.Date finishDate)
Finish Assignment.
|
MboSetRemote |
getAvailableLabor()
Gets the available labor for the current assignment.
|
java.lang.String |
getCrewWorkZoneWhere(MboRemote owner) |
java.lang.String |
getCrewWorkZoneWhere(java.lang.String assetNum,
java.lang.String location,
java.lang.String siteId,
java.lang.String orgId) |
java.lang.String |
getLaborWorkZoneWhere(MboRemote owner) |
java.lang.String |
getLaborWorkZoneWhere(java.lang.String assetNum,
java.lang.String location,
java.lang.String siteId,
java.lang.String orgId) |
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 |
modify()
Internal method that marks the record as modified.
|
void |
propagateKeyValue(java.lang.String keyName,
java.lang.String keyValue)
Set value for Wonum.
|
protected void |
save()
Save the object and other linked objects.
|
protected LabTransRemote |
setLabTrans(MboRemote resource,
LabTransRemote labTrans)
Set the values in the new LabTrans record.
|
protected boolean |
skipCopyField(MboValueInfo mvi)
Overrides the skipCopyField() in the Mbo.
|
void |
startAssignment(java.util.Date startDate)
Start the assignment.
|
void |
undelete()
Unmark the Mbo for deletion.
|
addMboSetForRequiredCheck, addToDeleteForInsertList, andEvaluateConditions, appValidate, blindCopy, canDelete, checkFieldAccess, checkMethodAccess, checkMethodAccess, checkQualifiedRestriction, checkRecordLock, checkSiteOrgAccessForSave, clear, clearRelatedSets, clearRelatedSets, commit, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, deleteDoclinks, 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, getESId, getExistingMboSet, getFetchIndex, getFieldExceptions, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertOrgForSite, getInsertSite, getInstanciatedMboSet, getInstanciatedMboValue, getInt, getIntegrationService, getKeyValue, getLanguageRecordRowStamp, getLinesRelationship, getList, getLockedByDisplayName, getLockedByUserID, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboCtx, getMboData, getMboDataSet, getMboForAttribute, getMboForAttributeStatic, getMboInitialValue, getMboList, getMboLogger, getMboRecordData, getMboServer, getMboSet, getMboSet, getMboSet, getMboSetInfo, getMboSetInfo, getMboValue, getMboValueData, getMboValueData, getMboValueData, getMboValueDataForDownload, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getProfile, getPropagateKeyFlag, getProxy, getRecordIdentifer, getRecordMboName, getRecordType, getRelatedSets, getRelatedWhere, getRelatedWhere, getRelationshipNameToLangTable, getResourceName, getRowRestrictionFlag, getRowStamp, getRowStampObject, getSecurityLogger, getSiteOrg, getSqlLogger, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getSynonymValueWhere, getTenantId, getTenantIdForNoMboRecordData, getThisMboSet, getTranslator, getUniqueIdentifer, getUniqueIDName, getUniqueIDValue, getUniqueLanguageIDRecord, getUserInfo, getUserName, getValidateOrder, hasFieldAccess, hasHierarchyLink, hasLockSaveRights, hasRelatedQbe, hasUniqueID, initFieldFlagsOnMbo, initRelationship, isApiBatchError, isAppLockEnabled, isAutoKeyed, isBasedOn, isChangeByUserWhenSetFromLookup, isDuringInit, isEAuditFieldModified, isESigFieldModified, isFlagSet, isForDM, isLocked, isLocked, isLockedByMe, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNoSql, isNull, isOptionGranted, isSelected, isSkipCopyField, isValid, isZombie, lock, moveFieldFlagsToMboValue, needCallInitFieldFlag, orEvaluateConditions, removeCtx, removeRelatedSet, resolveNoSqlWhere, rollbackToCheckpoint, select, setAppDefaultValue, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDatabaseDefaultValues, setDatabaseDefaultValues, setDefaultValue, setDefaultValues, setDeleted, setDuringInit, setEAuditFieldModified, setESId, setESigFieldModified, setFetchIndex, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setHierarchyLink, setIgnoreRecordLockCheck, setLangCodeDefault, setMboCtx, setMLValue, setModified, setModifiedForIntegrationOnly, setNewMbo, setNoSql, setPropagateKeyFlag, setPropagateKeyFlag, setProxy, setReadonlyWhenParentIsReadonly, setRecordType, setReferencedMbo, setReferencedMbo, setResolveNoSqlWhere, setResourceName, setTenantIdForNoMboRecordData, 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, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, throwRequiredException, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undeleteDoclinks, unlock, unselect, useDataSecurity, validate, validateAttributes, validateKeyUniqueness, valueChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddMboSetForRequiredCheck, addToDeleteForInsertList, blindCopy, checkMethodAccess, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, 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, getMboValueDataForDownload, 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, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, unlock, unselect, validate, validateAttributespublic Assignment(MboSet ms) throws MXException, java.rmi.RemoteException
ms - The Assignment MboSet.MXExceptionjava.rmi.RemoteExceptionpublic void init()
throws MXException
init in class MboMXExceptionpublic void add()
throws MXException,
java.rmi.RemoteException
add in interface MboRemoteadd in class MboMXApplicationException - AddAssignment when its owner is not WorkorderMXExceptionjava.rmi.RemoteExceptionpublic boolean calledFromAssignmentManager()
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic void completeAssignment(java.lang.String status,
java.util.Date date)
throws MXException,
java.rmi.RemoteException
completeAssignment in interface AssignmentRemotedate - the date/time of the completion an assignmentstatus - a synonym of the COMPLETEMXExceptionjava.rmi.RemoteExceptionAssignment.completeAssignment(String status, Date date)public void completeAssignment()
throws MXException,
java.rmi.RemoteException
completeAssignment in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic void completeAssignment(boolean completeWO)
throws MXException,
java.rmi.RemoteException
completeAssignment in interface AssignmentRemotecompleteWO - Determines whether the workorder that owns this assignment will have its status changed to
Close or Comp.MXExceptionjava.rmi.RemoteExceptionpublic LabTransSetRemote getLabTransSet() throws MXException, java.rmi.RemoteException
getLabTransSet in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic void createLabTrans(WORemote ownerWO) throws MXException, java.rmi.RemoteException
createLabTrans in interface AssignmentRemoteownerWO - The workorder that is the owner of this assignment.MXExceptionjava.rmi.RemoteExceptionprotected LabTransRemote setLabTrans(MboRemote resource, LabTransRemote labTrans) throws MXException, java.rmi.RemoteException
resource - - The own assignment or a AMCrewLabor could be used to provide values forlabTrans - - The new LabTrans recordMXExceptionjava.rmi.RemoteExceptionpublic ToolTransSetRemote getToolTransSet() throws MXException, java.rmi.RemoteException
AssignmentRemotegetToolTransSet in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic void createToolTransCrew(WORemote ownerWO, AMCrewRemote crew) throws MXException, java.rmi.RemoteException
AssignmentRemotecreateToolTransCrew in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic void completeTheWO(WORemote ownerWO) throws MXException, java.rmi.RemoteException
completeTheWO in interface AssignmentRemoteownerWO - The workorder that is the owner of this assignment.MXExceptionjava.rmi.RemoteExceptionpublic boolean canFinishWO(WO woMbo) throws MXException, java.rmi.RemoteException
canFinishWO in interface AssignmentRemoteownerWO - The workorder that is the owner of this assignment.MXExceptionjava.rmi.RemoteExceptionpublic java.util.Date getWPEndDateTime(MboRemote WorkTimeMbo, java.util.Date wpStartDateTime, java.util.GregorianCalendar scratchCal, AvailCalc availCalc) throws MXException, java.rmi.RemoteException
getWPEndDateTime in interface AssignmentRemoteWorkTimeMbo - 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.MXExceptionjava.rmi.RemoteExceptionpublic void calcFinishDate()
throws MXException,
java.rmi.RemoteException
calcFinishDate in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionprotected boolean skipCopyField(MboValueInfo mvi) throws java.rmi.RemoteException, MXException
skipCopyField in class Mbomvi - The MboValueInfo object of the MboValue that needs to be copied.java.rmi.RemoteExceptionMXExceptionpublic void propagateKeyValue(java.lang.String keyName,
java.lang.String keyValue)
throws MXException,
java.rmi.RemoteException
propagateKeyValue in interface MboRemotepropagateKeyValue in class MbokeyName - Should equal "wonum" or else nothing will be propagated.keyValue - The new value of wonum.MXExceptionjava.rmi.RemoteExceptionpublic void startAssignment(java.util.Date startDate)
throws MXException,
java.rmi.RemoteException
startAssignment in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic void interruptAssignment(java.util.Date interruptDate)
throws MXException,
java.rmi.RemoteException
interruptAssignment in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic void finishAssignment(java.util.Date finishDate)
throws MXException,
java.rmi.RemoteException
finishAssignment in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionprotected void save()
throws MXException,
java.rmi.RemoteException
Mbosave in class MboMXExceptionjava.rmi.RemoteExceptionpublic java.lang.String getCrewWorkZoneWhere(MboRemote owner) throws MXException, java.rmi.RemoteException
getCrewWorkZoneWhere in interface AssignmentRemoteMXExceptionjava.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 getCrewWorkZoneWhere(java.lang.String assetNum,
java.lang.String location,
java.lang.String siteId,
java.lang.String orgId)
throws MXException,
java.rmi.RemoteException
getCrewWorkZoneWhere in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic java.lang.String getLaborWorkZoneWhere(java.lang.String assetNum,
java.lang.String location,
java.lang.String siteId,
java.lang.String orgId)
throws MXException,
java.rmi.RemoteException
getLaborWorkZoneWhere in interface AssignmentRemoteMXExceptionjava.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 java.lang.String getLaborWorkZoneWhere(MboRemote owner) throws MXException, java.rmi.RemoteException
getLaborWorkZoneWhere in interface AssignmentRemoteMXExceptionjava.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.RemoteExceptionMXExceptionjava.sql.SQLExceptionpublic MboSetRemote getAvailableLabor() throws MXException, java.rmi.RemoteException
getAvailableLabor in interface AssignmentRemoteMXExceptionjava.rmi.RemoteExceptionpublic void delete()
throws MXException,
java.rmi.RemoteException
MboPlease note that if you need to apply application specific rules when an object is being deleted, please overwrite method delete(long) instead of this one in the derived class.
delete in interface MboRemotedelete in class MboMXExceptionjava.rmi.RemoteExceptionMbo.delete(long)public void undelete()
throws MXException,
java.rmi.RemoteException
Mboundelete in interface MboRemoteundelete in class MboMXExceptionjava.rmi.RemoteExceptionpublic void modify()
throws MXException,
java.rmi.RemoteException
modify in class MboMXExceptionjava.rmi.RemoteException