Class MAsset

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

public class MAsset extends X_A_Asset
Asset Model
Author:
Teo Sarca, SC ARHIPAC SERVICE SRL
See Also:
  • Field Details

    • CHANGETYPE_setAssetGroup

      public static final int CHANGETYPE_setAssetGroup
      ChangeType - Asset Group changed
      See Also:
  • Constructor Details

    • MAsset

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

      public MAsset(Properties ctx, int A_Asset_ID, String trxName)
      Parameters:
      ctx -
      A_Asset_ID -
      trxName -
    • MAsset

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

      protected MAsset(MMatchInv match)
      Construct from MMatchInv
      Parameters:
      match - match invoice
    • MAsset

      protected MAsset(MIFixedAsset ifa)
      Construct from MIFixedAsset (import)
      Parameters:
      ifa -
    • MAsset

      protected MAsset(MProject project)
      author Edwin Ang
      Parameters:
      project -
    • MAsset

      public MAsset(MInOut mInOut, MInOutLine sLine, int deliveryCount)
      Create asset from material receipt line
      Parameters:
      mInOut -
      sLine -
      deliveryCount -
    • MAsset

      public MAsset(MInventory inventory, MInventoryLine invLine, BigDecimal qty, BigDecimal costs)
      Create Asset from Inventory
      Parameters:
      inventory - inventory
      invLine - inventory line
      qty -
      costs -
    • MAsset

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

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

      public MAsset(Properties ctx, MAsset copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
    • MAsset

      public MAsset(Properties ctx, int A_Asset_ID, String trxName, String... virtualColumns)
  • Method Details

    • get

      public static MAsset get(Properties ctx, int A_Asset_ID, String trxName)
      Get Asset
      Parameters:
      ctx - context
      A_Asset_ID - asset
      trxName -
    • forASI

      public static Collection<MAsset> forASI(Properties ctx, int M_Product_ID, int M_ASI_ID)
      Get Assets from given M_Product_ID and M_ASI_ID.

      Note: The A_Asset_Product table is not checked !!!

      Parameters:
      ctx -
      M_Product_ID - (optional)
      M_ASI_ID -
      Returns:
      collection of MAsset
    • setAssetGroup

      public void setAssetGroup(MAssetGroup assetGroup)
      Set Asset Group
      Parameters:
      assetGroup -
    • getAssetGroup

      public MAssetGroup getAssetGroup()
      Returns:
      MAssetGroup
    • setASI

      public void setASI(MAttributeSetInstance asi)
      Set ASI Info (M_AttributeSetInstance_ID, Lot, SerNo)
      Parameters:
      asi -
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a 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.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - true if it is a new record
      success - true if save operation was success
      Returns:
      if save was a success
    • beforeDelete

      protected boolean beforeDelete()
      Description copied from class: PO
      Execute before Delete operations.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeDelete in class PO
      Returns:
      true if record can be deleted
    • updateStatus

      public void updateStatus()
      Update various status related flag
      See Also:
    • changeStatus

      public void changeStatus(String newStatus, Timestamp date)
      Change asset status to newStatus
      Parameters:
      newStatus - see A_ASSET_STATUS_
      date - state change date; if null context "#Date" will be used
    • getUseLifeMonths_F

      public int getUseLifeMonths_F()
    • setUseLifeMonths_F

      public void setUseLifeMonths_F(int UseLifeMonths_F)
    • getA_Current_Period

      public int getA_Current_Period()
    • setA_Current_Period

      public void setA_Current_Period(int A_Current_Period)
    • getDateAcct

      public Timestamp getDateAcct()
    • setDateAcct

      public void setDateAcct(Timestamp DateAcct)
    • getA_Depreciation_ID

      public int getA_Depreciation_ID()
    • setA_Depreciation_ID

      public void setA_Depreciation_ID(int A_Depreciation_ID)
    • getA_Depreciation_F_ID

      public int getA_Depreciation_F_ID()
    • setA_Depreciation_F_ID

      public void setA_Depreciation_F_ID(int A_Depreciation_F_ID)
    • getA_Asset_Cost

      public BigDecimal getA_Asset_Cost()
    • setA_Asset_Cost

      public void setA_Asset_Cost(BigDecimal A_Asset_Cost)
    • getA_Accumulated_Depr

      public BigDecimal getA_Accumulated_Depr()
    • setA_Accumulated_Depr

      public void setA_Accumulated_Depr(BigDecimal A_Accumulated_Depr)
    • getA_Accumulated_Depr_F

      public BigDecimal getA_Accumulated_Depr_F()
    • setA_Accumulated_Depr_F

      public void setA_Accumulated_Depr_F(BigDecimal A_Accumulated_Depr_F)
    • getI_FixedAsset

      public MIFixedAsset getI_FixedAsset()
    • setI_FixedAsset

      public void setI_FixedAsset(MIFixedAsset I_FixedAsset)
    • confirmDelivery

      public MAssetDelivery confirmDelivery(EMail email, int ad_User_ID)
      Methods below have been created for compilation of org.compiere.process.AssetDelivery and it is not working in any meaningful way.
    • getProductDownloads

      public MProductDownload[] getProductDownloads()
    • confirmDelivery

      public MAssetDelivery confirmDelivery(javax.servlet.http.HttpServletRequest request, int ad_User_ID)
    • getDeliveries

      public MAssetDelivery[] getDeliveries()
    • getFromShipment

      public static MAsset getFromShipment(Properties ctx, int i, String trxName)
    • getProductR_MailText_ID

      public int getProductR_MailText_ID()
    • isDownloadable

      public boolean isDownloadable()