psdi.app.calendar

Class Shift

  • All Implemented Interfaces:
    java.rmi.Remote, ShiftRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class Shift
    extends Mbo
    implements ShiftRemote
    Mbo object to represent Shift.

    Attribute Description

    AttributeDescription
    DESCRIPTIONOne Line Short Shift Description
    LDKEYLong Description Key For The Shift
    SHIFTNUMUnique Identifier For Shift
    STARTDAYThe day of the week the shift begins on.
    • Constructor Detail

      • Shift

        public Shift(MboSet ms)
              throws MXException,
                     java.rmi.RemoteException
        Construct the Shift object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Delete the shift record and delete associated shiftpatternday records.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        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.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • startDayToInt

        public int startDayToInt()
                          throws MXException,
                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setPatternDays

        public ShiftPatternDaySetRemote setPatternDays(int numberOfDays)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Created necessry empty rows (without working hour) in table shiftpatternday for this shift. The client can call this function when a shift with a non zero number of pattern days is being added. If the pattern already exists, an exception is thrown. This function is only here to provide the convenience when a new shift is created. Modification and insertion to the existing or zero day pattern should be achieved by directly calling ShiftPatternDaySet's add() and ShiftPatternDay's setValue().
        Specified by:
        setPatternDays in interface ShiftRemote
        Throws:
        MXException
        java.rmi.RemoteException