public class Calendar extends Mbo implements CalendarRemote
Attribute Description
Attribute | Description |
---|---|
CALNUM | Calendar Number |
DESCRIPTION | Calendar Description |
ENDDATE | Calendar End Day |
LDKEY | Long Description Key |
STARTDATE | Calendar Start Day |
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 |
---|
Calendar(MboSet ms)
Construct the Calendar object
|
Modifier and Type | Method and Description |
---|---|
void |
add()
This is called when a new Mbo is added to the Mboset collection.
|
java.util.Date |
addDates(java.util.Date date,
int days)
Add or minus days from the given date.
|
boolean |
applyNonWorkTime(MboSetRemote nonWorkTimeSet)
Propagates workperiod records from specified non-working start date to
end date.
|
void |
applyNonWorkTime(java.lang.String nonWorkType,
java.lang.String description,
java.util.Date startDate,
java.util.Date endDate)
Propagates workperiod records from specified non-working start date to
end date.
|
void |
applyShift(java.lang.String shiftname)
Propagates workperiod records from start date to end date of the calendar
for the input shift definition.
|
void |
applyShift(java.lang.String shiftname,
java.util.Date startdate,
java.util.Date enddate)
Propagates workperiod records from specified start date to end date for
a selected shift definition.
|
void |
applyShift(java.util.Vector shiftSet)
Propagates workperiod records from start date to end date of the calendar
for the input shift definition.
|
void |
appValidate()
Pre-save validation method.
|
double |
calculateAvailability()
Add up the total work hours for all work period records in this calendar between
its start date and end date.
|
double |
calculateAvailability(java.util.Date startDate,
java.util.Date endDate)
Add up the total work hours for all work period records in this calendar between
the input start date and end date.
|
double |
calculateDownTime(java.util.Date lastChangeDate,
java.util.Date currentChangeDate)
Calculate the actual Downtime for an Asset.
|
double |
calculateHours(java.util.Date date1,
java.util.Date date2)
Calculate Elapsed Time in hours.
|
double |
calculateWorkHours(java.util.Date workDate)
Add up the total work hours for all work period records in this calendar for
the given work date.
|
void |
canApplyShift(ShiftRemote shift)
Can a shift be applied to a calendar?
A shift can be applied to a calendar only if a pattern has already been defined for that shift.
|
void |
canApplyShift(java.lang.String shiftname)
Can a shift be applied to a calendar?
Cannot apply the shift to the calendar when it is not existing.
|
void |
canDelete()
canDelete method.
|
java.util.Date |
combineDateTime(java.util.Date date,
java.util.Date time)
Combine fist Date's date and second Date's time and return a new date.
|
void |
delete(long accessModifier)
Delete the calendar record and delete associated workperiod records.
|
void |
deleteWorkPeriod(java.util.Date startDate,
java.util.Date endDate)
Delete WorkPeriod Mbo Set for the specified startdate and enddate
|
MboRemote |
duplicate()
This method creates a duplicate calendar
Copies over all the workperiods that belong to this calendar
|
void |
generateAutoKey()
Calendar supports autokeying - sets the calnum attribute.
|
double |
getDownTime(java.util.Date currentChangeDate,
java.util.Date lastChangeDate)
Get WorkPeriod Mbo Set with given where clause.
|
java.lang.String[][] |
getMonthsAvailableHours(com.ibm.icu.util.Calendar cal)
Gets The Available Hours in the Month for given Calendar
|
double |
getWorkPeriodData(WorkPeriodSet workPeriodSet,
java.util.Date lastChangeDate,
java.util.Date currentChangeDate)
Get WorkPeriod data and calcualte down time.
|
WorkPeriodSetRemote |
getWorkPeriodSet(java.util.Date workDate)
Get the workperid mboset for the given workdate
|
void |
init()
Called by the framework when the Mbo has been constructed and the
MboValues have been initialized.
|
boolean |
isAvailable(java.util.Date date)
Function to determine if the date passed in is within this calendar.
|
void |
setWPIncrement(int i) |
addMboSetForRequiredCheck, addToDeleteForInsertList, andEvaluateConditions, blindCopy, checkFieldAccess, checkMethodAccess, checkMethodAccess, checkQualifiedRestriction, checkSiteOrgAccessForSave, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, determineRequiredFieldsFromERM, enableMethod, evaluateCondition, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, evaluateRestriction, excludeObjectForPropagate, findAllNullRequiredFields, fireEvent, 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, propagateKeyValue, 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, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, excludeObjectForPropagate, 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, propagateKeyValue, 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 Calendar(MboSet ms) throws MXException, java.rmi.RemoteException
ms
- MXException
java.rmi.RemoteException
public void init() throws MXException
Mbo
init
in class Mbo
MXException
public void generateAutoKey() throws java.rmi.RemoteException, MXException
generateAutoKey
in interface MboRemote
generateAutoKey
in class Mbo
MXException
java.rmi.RemoteException
MboValue.autoKey()
,
MboValue.generateUniqueID()
public boolean isAvailable(java.util.Date date) throws MXException, java.rmi.RemoteException
isAvailable
in interface CalendarRemote
MXException
java.rmi.RemoteException
psdi.app.laborgroup.LaborGroup#getFirstAvailablePerson
,
AvailCalc.checkAvailableCalendar(java.util.Date, java.util.Date, java.lang.String)
public void appValidate() throws MXException, java.rmi.RemoteException
appValidate
in class Mbo
MXException
java.rmi.RemoteException
public MboRemote duplicate() throws MXException, java.rmi.RemoteException
duplicate
in interface MboRemote
duplicate
in class Mbo
MXException
java.rmi.RemoteException
skipCopyField(psdi.mbo.MboValueInfo)
public void canDelete() throws MXException, java.rmi.RemoteException
canDelete
in class Mbo
MXException
java.rmi.RemoteException
public void delete(long accessModifier) throws MXException, java.rmi.RemoteException
delete
in interface MboRemote
delete
in class Mbo
accessModifier
- The bitwise flag specified to determine
if certain normal security checks are to be
bypassed for this delete request.
For example:
if the accessModifer is NOACCESSCHECK, then the
check for the object's NODELETE flag and the
call to the object's canDelete() method
will not be performed.
If the accessModifer is NONE, then all the
access checks are performed before this object
is marked delete.MXException
java.rmi.RemoteException
Mbo.delete(long)
public void canApplyShift(ShiftRemote shift) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void canApplyShift(java.lang.String shiftname) throws MXException, java.rmi.RemoteException
canApplyShift
in interface CalendarRemote
MXException
java.rmi.RemoteException
public void applyShift(java.util.Vector shiftSet) throws MXException, java.rmi.RemoteException
applyShift
in interface CalendarRemote
MXException
java.rmi.RemoteException
public void applyShift(java.lang.String shiftname) throws MXException, java.rmi.RemoteException
applyShift
in interface CalendarRemote
MXException
java.rmi.RemoteException
public void applyShift(java.lang.String shiftname, java.util.Date startdate, java.util.Date enddate) throws MXException, java.rmi.RemoteException
applyShift
in interface CalendarRemote
MXException
java.rmi.RemoteException
public void setWPIncrement(int i) throws MXException, java.rmi.RemoteException
setWPIncrement
in interface CalendarRemote
MXException
java.rmi.RemoteException
public boolean applyNonWorkTime(MboSetRemote nonWorkTimeSet) throws MXException, java.rmi.RemoteException
applyNonWorkTime
in interface CalendarRemote
MXException
java.rmi.RemoteException
public void applyNonWorkTime(java.lang.String nonWorkType, java.lang.String description, java.util.Date startDate, java.util.Date endDate) throws MXException, java.rmi.RemoteException
applyNonWorkTime
in interface CalendarRemote
MXException
java.rmi.RemoteException
public double calculateAvailability() throws MXException, java.rmi.RemoteException
calculateAvailability
in interface CalendarRemote
MXException
java.rmi.RemoteException
public double calculateAvailability(java.util.Date startDate, java.util.Date endDate) throws MXException, java.rmi.RemoteException
calculateAvailability
in interface CalendarRemote
MXException
java.rmi.RemoteException
getDownTime(java.util.Date, java.util.Date)
public double calculateHours(java.util.Date date1, java.util.Date date2)
public double calculateDownTime(java.util.Date lastChangeDate, java.util.Date currentChangeDate) throws MXException, java.rmi.RemoteException
calculateDownTime
in interface CalendarRemote
MXException
java.rmi.RemoteException
public double getDownTime(java.util.Date currentChangeDate, java.util.Date lastChangeDate) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public double getWorkPeriodData(WorkPeriodSet workPeriodSet, java.util.Date lastChangeDate, java.util.Date currentChangeDate) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.util.Date addDates(java.util.Date date, int days)
public java.util.Date combineDateTime(java.util.Date date, java.util.Date time)
public void deleteWorkPeriod(java.util.Date startDate, java.util.Date endDate) throws MXException, java.rmi.RemoteException
deleteWorkPeriod
in interface CalendarRemote
MXException
java.rmi.RemoteException
public double calculateWorkHours(java.util.Date workDate) throws MXException, java.rmi.RemoteException
calculateWorkHours
in interface CalendarRemote
MXException
java.rmi.RemoteException
public WorkPeriodSetRemote getWorkPeriodSet(java.util.Date workDate) throws MXException, java.rmi.RemoteException
getWorkPeriodSet
in interface CalendarRemote
MXException
java.rmi.RemoteException
public java.lang.String[][] getMonthsAvailableHours(com.ibm.icu.util.Calendar cal) throws MXException, java.rmi.RemoteException
getMonthsAvailableHours
in interface CalendarRemote
MXException
java.rmi.RemoteException
public void add() throws MXException, java.rmi.RemoteException
Mbo
add
in interface MboRemote
add
in class Mbo
MXException
java.rmi.RemoteException