Class MAssetClass

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

public class MAssetClass extends X_A_Asset_Class implements ImmutablePOSupport
Asset Class
Version:
$Id$
Author:
Teo Sarca, SC Arhipac SRL
See Also:
  • Constructor Details

    • MAssetClass

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

      public MAssetClass(Properties ctx, int A_Asset_Class_ID, String trxName)
      Parameters:
      ctx -
      A_Asset_Class_ID -
      trxName -
    • MAssetClass

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

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

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

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

    • get

      public static MAssetClass get(int id)
      Get Asset Class from cache
      Parameters:
      id - A_Asset_Class_ID
      Returns:
      MAssetClass or null if not found
    • get

      public static MAssetClass get(Properties ctx, int id)
      Get Asset Class from cache (immutable)
      Parameters:
      ctx - context
      id - A_Asset_Class_ID
      Returns:
      MAssetClass or null if not found
    • get

      public static MAssetClass get(Properties ctx, String value)
      Get MAssetClass via Value from DB
      Parameters:
      ctx -
      value -
    • setDescription

      public void setDescription()
      Set description value
    • setLevels

      public void setLevels()
      Set fixed asset group level
    • getA_Life_Period_Min

      public int getA_Life_Period_Min(Timestamp serviceDate)
      Parameters:
      serviceDate -
      Returns:
      Life period min or life period 2004 min
    • validate

      public String validate(boolean saveError, int A_Life_Period, Timestamp serviceDate)
      Validate A_Life_Period of asset
      Parameters:
      saveError -
      A_Life_Period - Useful life period in months
      serviceDate -
      Returns:
      error message or empty string
    • validate

      public boolean validate(org.idempiere.fa.feature.UseLifeImpl asset)
      Validate UseLifeImpl model
      Parameters:
      asset -
    • isDepreciated

      public boolean isDepreciated()
      Depreciated check
      Returns:
      true if assert have been fully depreciated
    • beforeSave

      public 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
    • markImmutable

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