Class MResource

    • Constructor Detail

      • MResource

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

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

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

      • get

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

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

        public static MResource getCopy​(Properties ctx,
                                        int S_Resource_ID,
                                        String trxName)
        Get updateable copy of MResource from cache
        Parameters:
        ctx -
        S_Resource_ID -
        trxName -
        Returns:
        MResource
      • getResourceType

        public MResourceType getResourceType()
        Get cached Resource Type
        Returns:
        Resource Type
      • getProduct

        public MProduct getProduct()
        Get Product (use cache)
        Returns:
        product
      • getC_UOM_ID

        public int getC_UOM_ID()
      • 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
      • beforeDelete

        protected boolean beforeDelete()
        Description copied from class: PO
        Executed before Delete operation.
        Overrides:
        beforeDelete in class PO
        Returns:
        true if record can be deleted
      • toString

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