Class MResourceType

    • Constructor Detail

      • MResourceType

        public MResourceType​(Properties ctx,
                             int S_ResourceType_ID,
                             String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        S_ResourceType_ID - id
      • MResourceType

        public MResourceType​(Properties ctx,
                             ResultSet rs,
                             String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
      • MResourceType

        public MResourceType​(MResourceType copy)
        Parameters:
        copy -
    • Method Detail

      • get

        public static MResourceType get​(int S_ResourceType_ID)
        Get from Cache (immutable)
        Parameters:
        S_ResourceType_ID -
        Returns:
        MResourceType
      • get

        public static MResourceType get​(Properties ctx,
                                        int S_ResourceType_ID)
        Get from Cache (immutable)
        Parameters:
        ctx -
        S_ResourceType_ID -
        Returns:
        MResourceType
      • getCopy

        public static MResourceType getCopy​(Properties ctx,
                                            int S_ResourceType_ID,
                                            String trxName)
        Get updateable copy of MResourceType from cache
        Parameters:
        ctx -
        S_ResourceType_ID -
        trxName -
        Returns:
        MResourceType
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new record
        Returns:
        true if record can be saved
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        Description copied from class: PO
        Called after Save for Post-Save Operation
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new record
        success - true if save operation was success
        Returns:
        if save was a success
      • getDayDurationMillis

        public long getDayDurationMillis()
      • getTimeSlotHours

        public int getTimeSlotHours()
        Get how many hours/day a is available. Minutes, secords and millis are discarded.
        Returns:
        available hours
      • getAvailableDaysWeek

        public int getAvailableDaysWeek()
        Get available days / week.
        Returns:
        available days / week
      • isDayAvailable

        public boolean isDayAvailable​(Timestamp dateTime)
      • isAvailable

        public boolean isAvailable()
        Returns:
        true if a resource of this type is generally available (i.e. active, at least 1 day available, at least 1 hour available)
      • toString

        public String toString()
        Description copied from class: PO
        String representation
        Overrides:
        toString in class X_S_ResourceType
        Returns:
        String representation