Class MAssetGroup

    • Constructor Detail

      • MAssetGroup

        public MAssetGroup​(Properties ctx,
                           int A_Asset_Group_ID,
                           String trxName)
        Default Constructor
        Parameters:
        ctx - context
        A_Asset_Group_ID -
      • MAssetGroup

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

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

      • get

        public static MAssetGroup get​(int A_Asset_Group_ID)
        Get Asset Group [CACHE]
        Parameters:
        A_Asset_Group_ID - asset group id
        Returns:
        asset group or null
      • get

        public static MAssetGroup get​(Properties ctx,
                                      int A_Asset_Group_ID)
        Get Asset Group [CACHE]
        Parameters:
        ctx - context
        A_Asset_Group_ID - asset group id
        Returns:
        asset group or null
      • getCopy

        public static MAssetGroup getCopy​(Properties ctx,
                                          int A_Asset_Group_ID,
                                          String trxName)
        Get updateable copy of MAssetGroup from cache
        Parameters:
        ctx -
        A_Asset_Group_ID -
        trxName -
        Returns:
        MAssetGroup
      • getDefault_ID

        public static int getDefault_ID​(SetGetModel m)
        Get default asset group ID for given model. WARNING: trxName = null.
        Parameters:
        m - reference model (used to get AD_Client_ID)
        Returns:
        default asset group ID or 0 if not found
      • updateAsset

        public static void updateAsset​(SetGetModel m,
                                       int A_Asset_Group_ID)
        Update Asset - updates asset M_AssetGroup_ID if is null
      • 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