Class MAssetType

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_A_Asset_Type, I_Persistent, Evaluatee, ImmutablePOSupport

public class MAssetType extends X_A_Asset_Type implements ImmutablePOSupport
Asset Type
Author:
Teo Sarca, SC ARHIPAC SERVICE SRL
See Also:
  • Constructor Details

    • MAssetType

      public MAssetType(Properties ctx, String A_Asset_Type_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      A_Asset_Type_UU - UUID key
      trxName - Transaction
    • MAssetType

      public MAssetType(Properties ctx, int A_Asset_Type_ID, String trxName)
      Parameters:
      ctx -
      A_Asset_Type_ID -
      trxName -
    • MAssetType

      public MAssetType(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
    • MAssetType

      public MAssetType(MAssetType copy)
      Copy constructor
      Parameters:
      copy -
    • MAssetType

      public MAssetType(Properties ctx, MAssetType copy)
      Copy constructor
      Parameters:
      ctx -
      copy -
    • MAssetType

      public MAssetType(Properties ctx, MAssetType copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • get

      public static MAssetType get(int A_Asset_Type_ID)
      Get Asset Type from cache (immutable)
      Parameters:
      A_Asset_Type_ID -
      Returns:
      asset type object
    • get

      public static MAssetType get(Properties ctx, int A_Asset_Type_ID)
      Get Asset Type from cache (immutable)
      Parameters:
      ctx - context
      A_Asset_Type_ID -
      Returns:
      asset type object
    • isFixedAsset

      public boolean isFixedAsset()
      Returns:
      true if this is of Fixed Asset type
    • isFixedAsset

      public static boolean isFixedAsset(int A_Asset_ID)
      Parameters:
      A_Asset_ID -
      Returns:
      true if asset is of Fixed Asset type
    • isFixedAsset

      public static boolean isFixedAsset(MAsset asset)
      Parameters:
      asset -
      Returns:
      true if asset is of Fixed Asset type
    • isFixedAssetGroup

      public static boolean isFixedAssetGroup(Properties ctx, int A_Asset_Group_ID)
      Parameters:
      ctx -
      A_Asset_Group_ID -
      Returns:
      true if asset group is of Fixed Asset type
    • isInventoryObject

      public boolean isInventoryObject()
      Returns:
      true if this if of Inventory Object type
    • getBoolean

      protected static Boolean getBoolean(String value, boolean useDefaults)
      Convert an Yes-No-Unknown field to Boolean
      Parameters:
      value - N=FALSE, Y=FALSE, X=default(use second character as default)
      useDefaults -
      Returns:
      converted Boolean value or null
    • validate

      public static void validate(MAssetType.Model m)
      Validate a Model
      Parameters:
      m - model
      Throws:
      ContextUserException
    • update

      public boolean update(SetGetModel model, boolean useDefaults)
      Update the given SetGetModel; Does not set A_Asset_Type_ID
      Parameters:
      model -
      useDefaults - in case is not a concrete value, use defaults
      Returns:
      always return true
    • markImmutable

      public MAssetType markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO