Package org.compiere.model
Class MAsset
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_A_Asset
org.compiere.model.MAsset
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_A_Asset
,I_Persistent
,Evaluatee
Asset Model
- Author:
- Teo Sarca, SC ARHIPAC SERVICE SRL
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ChangeType - Asset Group changedFields inherited from class org.compiere.model.X_A_Asset
A_ASSET_ACTION_AD_Reference_ID, A_ASSET_ACTION_Dispose, A_ASSET_ACTION_Inbound, A_ASSET_ACTION_Modify, A_ASSET_ACTION_Outbound, A_ASSET_ACTION_Reevaluate, A_ASSET_ACTION_Retire, A_ASSET_ACTION_Transfer, A_ASSET_STATUS_Activated, A_ASSET_STATUS_AD_Reference_ID, A_ASSET_STATUS_Depreciated, A_ASSET_STATUS_Disposed, A_ASSET_STATUS_New, A_ASSET_STATUS_Preservation, A_ASSET_STATUS_Retired, A_ASSET_STATUS_Sold
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.compiere.model.I_A_Asset
accessLevel, COLUMNNAME_A_Asset_Action, COLUMNNAME_A_Asset_Class_ID, COLUMNNAME_A_Asset_CreateDate, COLUMNNAME_A_Asset_Group_ID, COLUMNNAME_A_Asset_ID, COLUMNNAME_A_Asset_RevalDate, COLUMNNAME_A_Asset_Status, COLUMNNAME_A_Asset_Type_ID, COLUMNNAME_A_Asset_UU, COLUMNNAME_A_AssetType, COLUMNNAME_A_Parent_Asset_ID, COLUMNNAME_A_QTY_Current, COLUMNNAME_A_QTY_Original, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_User_ID, COLUMNNAME_AssetActivationDate, COLUMNNAME_AssetDepreciationDate, COLUMNNAME_AssetDisposalDate, COLUMNNAME_AssetServiceDate, COLUMNNAME_C_Activity_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_BPartner_Location_ID, COLUMNNAME_C_BPartnerSR_ID, COLUMNNAME_C_Location_ID, COLUMNNAME_C_Project_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_GuaranteeDate, COLUMNNAME_Help, COLUMNNAME_InventoryNo, COLUMNNAME_IsActive, COLUMNNAME_IsDepreciated, COLUMNNAME_IsDisposed, COLUMNNAME_IsFullyDepreciated, COLUMNNAME_IsInPosession, COLUMNNAME_IsOwned, COLUMNNAME_LastMaintenanceDate, COLUMNNAME_LastMaintenanceNote, COLUMNNAME_LastMaintenanceUnit, COLUMNNAME_Lease_BPartner_ID, COLUMNNAME_LeaseTerminationDate, COLUMNNAME_LifeUseUnits, COLUMNNAME_LocationComment, COLUMNNAME_Lot, COLUMNNAME_M_AttributeSetInstance_ID, COLUMNNAME_M_InOutLine_ID, COLUMNNAME_M_Locator_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_ManufacturedYear, COLUMNNAME_Manufacturer, COLUMNNAME_Name, COLUMNNAME_NextMaintenenceDate, COLUMNNAME_NextMaintenenceUnit, COLUMNNAME_Processed, COLUMNNAME_Processing, COLUMNNAME_Qty, COLUMNNAME_SerNo, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_UseLifeMonths, COLUMNNAME_UseLifeYears, COLUMNNAME_UseUnits, COLUMNNAME_Value, COLUMNNAME_VersionNo, Model, Table_ID, Table_Name
-
Constructor Summary
ModifierConstructorDescriptionMAsset
(Properties ctx, int A_Asset_ID, String trxName) MAsset
(Properties ctx, int A_Asset_ID, String trxName, String... virtualColumns) MAsset
(Properties ctx, String A_Asset_UU, String trxName) UUID based ConstructorMAsset
(Properties ctx, ResultSet rs, String trxName) Load ConstructorMAsset
(Properties ctx, MAsset copy) Copy constructorMAsset
(Properties ctx, MAsset copy, String trxName) Copy constructorCopy constructorprotected
MAsset
(MIFixedAsset ifa) Construct from MIFixedAsset (import)MAsset
(MInOut mInOut, MInOutLine sLine, int deliveryCount) Create asset from material receipt lineMAsset
(MInventory inventory, MInventoryLine invLine, BigDecimal qty, BigDecimal costs) Create Asset from Inventoryprotected
Construct from MMatchInvprotected
author Edwin Ang -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterSave
(boolean newRecord, boolean success) Called after Save for Post-Save Operationprotected boolean
Executed before Delete operation.protected boolean
beforeSave
(boolean newRecord) Before Savevoid
changeStatus
(String newStatus, Timestamp date) Change asset status to newStatusconfirmDelivery
(javax.servlet.http.HttpServletRequest request, int ad_User_ID) 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.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.static MAsset
get
(Properties ctx, int A_Asset_ID, String trxName) Get Assetint
int
int
static MAsset
getFromShipment
(Properties ctx, int i, String trxName) int
int
boolean
void
setA_Accumulated_Depr
(BigDecimal A_Accumulated_Depr) void
setA_Accumulated_Depr_F
(BigDecimal A_Accumulated_Depr_F) void
setA_Asset_Cost
(BigDecimal A_Asset_Cost) void
setA_Current_Period
(int A_Current_Period) void
setA_Depreciation_F_ID
(int A_Depreciation_F_ID) void
setA_Depreciation_ID
(int A_Depreciation_ID) void
Set ASI Info (M_AttributeSetInstance_ID, Lot, SerNo)void
setAssetGroup
(MAssetGroup assetGroup) Set Asset Groupvoid
setDateAcct
(Timestamp DateAcct) void
setI_FixedAsset
(MIFixedAsset I_FixedAsset) void
setUseLifeMonths_F
(int UseLifeMonths_F) void
Update various status related flagMethods inherited from class org.compiere.model.X_A_Asset
get_AccessLevel, getA_Asset_Action, getA_Asset_Class, getA_Asset_Class_ID, getA_Asset_CreateDate, getA_Asset_Group, getA_Asset_Group_ID, getA_Asset_ID, getA_Asset_RevalDate, getA_Asset_Status, getA_Asset_Type, getA_Asset_Type_ID, getA_Asset_UU, getA_AssetType, getA_Parent_Asset, getA_Parent_Asset_ID, getA_QTY_Current, getA_QTY_Original, getAD_User, getAD_User_ID, getAssetActivationDate, getAssetDepreciationDate, getAssetDisposalDate, getAssetServiceDate, getC_Activity, getC_Activity_ID, getC_BPartner, getC_BPartner_ID, getC_BPartner_Location, getC_BPartner_Location_ID, getC_BPartnerSR, getC_BPartnerSR_ID, getC_Location, getC_Location_ID, getC_Project, getC_Project_ID, getDescription, getGuaranteeDate, getHelp, getInventoryNo, getLastMaintenanceDate, getLastMaintenanceNote, getLastMaintenanceUnit, getLease_BPartner, getLease_BPartner_ID, getLeaseTerminationDate, getLifeUseUnits, getLocationComment, getLot, getM_AttributeSetInstance, getM_AttributeSetInstance_ID, getM_InOutLine, getM_InOutLine_ID, getM_Locator, getM_Locator_ID, getM_Product, getM_Product_ID, getManufacturedYear, getManufacturer, getName, getNextMaintenenceDate, getNextMaintenenceUnit, getQty, getSerNo, getUseLifeMonths, getUseLifeYears, getUseUnits, getValue, getVersionNo, initPO, isDepreciated, isDisposed, isFullyDepreciated, isInPosession, isOwned, isProcessed, isProcessing, setA_Asset_Action, setA_Asset_Class_ID, setA_Asset_CreateDate, setA_Asset_Group_ID, setA_Asset_ID, setA_Asset_RevalDate, setA_Asset_Status, setA_Asset_Type_ID, setA_Asset_UU, setA_AssetType, setA_Parent_Asset_ID, setA_QTY_Current, setA_QTY_Original, setAD_User_ID, setAssetActivationDate, setAssetDepreciationDate, setAssetDisposalDate, setAssetServiceDate, setC_Activity_ID, setC_BPartner_ID, setC_BPartner_Location_ID, setC_BPartnerSR_ID, setC_Location_ID, setC_Project_ID, setDescription, setGuaranteeDate, setHelp, setInventoryNo, setIsDepreciated, setIsDisposed, setIsFullyDepreciated, setIsInPosession, setIsOwned, setLastMaintenanceDate, setLastMaintenanceNote, setLastMaintenanceUnit, setLease_BPartner_ID, setLeaseTerminationDate, setLifeUseUnits, setLocationComment, setLot, setM_AttributeSetInstance_ID, setM_InOutLine_ID, setM_Locator_ID, setM_Product_ID, setManufacturedYear, setManufacturer, setName, setNextMaintenenceDate, setNextMaintenenceUnit, setProcessed, setProcessing, setQty, setSerNo, setUseLifeMonths, setUseLifeYears, setUseUnits, setValue, setVersionNo, toString
Methods inherited from class org.compiere.model.PO
afterDelete, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface org.compiere.model.I_A_Asset
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
Methods inherited from interface org.compiere.model.I_Persistent
save
-
Field Details
-
CHANGETYPE_setAssetGroup
public static final int CHANGETYPE_setAssetGroupChangeType - Asset Group changed- See Also:
-
-
Constructor Details
-
MAsset
UUID based Constructor- Parameters:
ctx
- ContextA_Asset_UU
- UUID keytrxName
- Transaction
-
MAsset
- Parameters:
ctx
-A_Asset_ID
-trxName
-
-
MAsset
Load Constructor- Parameters:
ctx
- contextrs
- result set record
-
MAsset
Construct from MMatchInv- Parameters:
match
- match invoice
-
MAsset
Construct from MIFixedAsset (import)- Parameters:
ifa
-
-
MAsset
author Edwin Ang- Parameters:
project
-
-
MAsset
Create asset from material receipt line- Parameters:
mInOut
-sLine
-deliveryCount
-
-
MAsset
Create Asset from Inventory- Parameters:
inventory
- inventoryinvLine
- inventory lineqty
-costs
-
-
MAsset
Copy constructor- Parameters:
copy
-
-
MAsset
Copy constructor- Parameters:
ctx
-copy
-
-
MAsset
Copy constructor- Parameters:
ctx
-copy
-trxName
-
-
MAsset
-
-
Method Details
-
get
Get Asset- Parameters:
ctx
- contextA_Asset_ID
- assettrxName
-
-
forASI
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
Set Asset Group- Parameters:
assetGroup
-
-
getAssetGroup
- Returns:
- MAssetGroup
-
setASI
Set ASI Info (M_AttributeSetInstance_ID, Lot, SerNo)- Parameters:
asi
-
-
beforeSave
protected boolean beforeSave(boolean newRecord) Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) Description copied from class:PO
Called after Save for Post-Save Operation -
beforeDelete
protected boolean beforeDelete()Description copied from class:PO
Executed before Delete operation.- Overrides:
beforeDelete
in classPO
- Returns:
- true if record can be deleted
-
updateStatus
public void updateStatus()Update various status related flag- See Also:
-
changeStatus
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
-
setDateAcct
-
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
-
setA_Asset_Cost
-
getA_Accumulated_Depr
-
setA_Accumulated_Depr
-
getA_Accumulated_Depr_F
-
setA_Accumulated_Depr_F
-
getI_FixedAsset
-
setI_FixedAsset
-
confirmDelivery
Methods below have been created for compilation of org.compiere.process.AssetDelivery and it is not working in any meaningful way. -
getProductDownloads
-
confirmDelivery
public MAssetDelivery confirmDelivery(javax.servlet.http.HttpServletRequest request, int ad_User_ID) -
getDeliveries
-
getFromShipment
-
getProductR_MailText_ID
public int getProductR_MailText_ID() -
isDownloadable
public boolean isDownloadable()
-