Package org.eevolution.model
Class MPPProductBOM
- java.lang.Object
-
- org.compiere.model.PO
-
- org.eevolution.model.X_PP_Product_BOM
-
- org.eevolution.model.MPPProductBOM
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_Persistent
,Evaluatee
,I_PP_Product_BOM
,ImmutablePOSupport
public class MPPProductBOM extends X_PP_Product_BOM implements ImmutablePOSupport
PP Product BOM Model.- Author:
- Victor Perez www.e-evolution.com, Teo Sarca, http://www.arhipac.ro
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eevolution.model.X_PP_Product_BOM
BOMTYPE_AD_Reference_ID, BOMTYPE_CurrentActive, BOMTYPE_Future, BOMTYPE_Maintenance, BOMTYPE_Make_To_Kit, BOMTYPE_Make_To_Order, BOMTYPE_Previous, BOMTYPE_PreviousSpare, BOMTYPE_ProductConfigure, BOMTYPE_Repair, BOMUSE_AD_Reference_ID, BOMUSE_Engineering, BOMUSE_Manufacturing, BOMUSE_Master, BOMUSE_Planning, BOMUSE_Quality
-
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, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.eevolution.model.I_PP_Product_BOM
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_BOMType, COLUMNNAME_BOMUse, COLUMNNAME_C_UOM_ID, COLUMNNAME_CopyFrom, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_Help, COLUMNNAME_IsActive, COLUMNNAME_M_AttributeSetInstance_ID, COLUMNNAME_M_ChangeNotice_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_Name, COLUMNNAME_PP_Product_BOM_ID, COLUMNNAME_PP_Product_BOM_UU, COLUMNNAME_Processing, COLUMNNAME_Revision, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_ValidFrom, COLUMNNAME_ValidTo, COLUMNNAME_Value, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MPPProductBOM(Properties ctx, int PP_Product_BOM_ID, String trxName)
MPPProductBOM(Properties ctx, ResultSet rs, String trxName)
MPPProductBOM(Properties ctx, MPPProductBOM copy)
MPPProductBOM(Properties ctx, MPPProductBOM copy, String trxName)
MPPProductBOM(MPPProductBOM copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
afterDelete(boolean success)
Executed after Delete operation.protected boolean
afterSave(boolean newRecord, boolean success)
Called after Save for Post-Save Operationprotected boolean
beforeSave(boolean newRecord)
Called before Save for Pre-Save Operationstatic MPPProductBOM
get(int PP_Product_BOM_ID)
Get Product BOM by ID (cached) (immutable)static MPPProductBOM
get(Properties ctx, int PP_Product_BOM_ID)
Get Product BOM by ID (cached) (immutable)static MPPProductBOM
get(MProduct product, int ad_org_id, String trxName)
Get BOM for Productstatic MPPProductBOM
get(MProduct product, int ad_org_id, Timestamp valid, String trxName)
Get BOM with valid dates for Productstatic int
getBOMSearchKey(MProduct product)
Get PP_Product_BOM_ID for given M_Product_IDstatic MPPProductBOM
getCopy(Properties ctx, int PP_Product_BOM_ID, String trxName)
Get updateable copy of MPPProductBOM from cachestatic MPPProductBOM
getDefault(MProduct product, String trxName)
Get BOM with Default Logic (Product = BOM Product and BOM Value = Product Value)MPPProductBOMLine[]
getLines()
Get BOM Lines for Product BOM from cacheMPPProductBOMLine[]
getLines(boolean reload)
Get BOM Lines for Product BOMMPPProductBOMLine[]
getLines(Timestamp valid)
Get BOM Lines valid date for Product BOMstatic List<MPPProductBOM>
getProductBOMs(MProduct product)
get the Product BOM for a productstatic boolean
isProductMakeToOrder(Properties ctx, int productId, String trxName)
Is Product Make to Orderboolean
isValidFromTo(Timestamp date)
MPPProductBOM
markImmutable()
mark PO as immutableString
toString()
String representation-
Methods inherited from class org.eevolution.model.X_PP_Product_BOM
get_AccessLevel, getBOMType, getBOMUse, getC_UOM, getC_UOM_ID, getCopyFrom, getDescription, getHelp, getKeyNamePair, getM_AttributeSetInstance, getM_AttributeSetInstance_ID, getM_ChangeNotice, getM_ChangeNotice_ID, getM_Product, getM_Product_ID, getName, getPP_Product_BOM_ID, getPP_Product_BOM_UU, getRevision, getValidFrom, getValidTo, getValue, initPO, isProcessing, setBOMType, setBOMUse, setC_UOM_ID, setCopyFrom, setDescription, setHelp, setM_AttributeSetInstance_ID, setM_ChangeNotice_ID, setM_Product_ID, setName, setPP_Product_BOM_ID, setPP_Product_BOM_UU, setProcessing, setRevision, setValidFrom, setValidTo, setValue
-
Methods inherited from class org.compiere.model.PO
beforeDelete, 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_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, 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, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, 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, 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_Persistent
save
-
Methods inherited from interface org.eevolution.model.I_PP_Product_BOM
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
-
-
-
Constructor Detail
-
MPPProductBOM
public MPPProductBOM(Properties ctx, int PP_Product_BOM_ID, String trxName)
-
MPPProductBOM
public MPPProductBOM(Properties ctx, ResultSet rs, String trxName)
-
MPPProductBOM
public MPPProductBOM(MPPProductBOM copy)
- Parameters:
copy
-
-
MPPProductBOM
public MPPProductBOM(Properties ctx, MPPProductBOM copy)
- Parameters:
ctx
-copy
-
-
MPPProductBOM
public MPPProductBOM(Properties ctx, MPPProductBOM copy, String trxName)
- Parameters:
ctx
-copy
-trxName
-
-
-
Method Detail
-
isProductMakeToOrder
public static boolean isProductMakeToOrder(Properties ctx, int productId, String trxName)
Is Product Make to Order- Parameters:
ctx
-productId
-trxName
-- Returns:
-
getProductBOMs
public static List<MPPProductBOM> getProductBOMs(MProduct product)
get the Product BOM for a product- Parameters:
product
-- Returns:
- return List with MPPProductBOM
-
get
public static MPPProductBOM get(int PP_Product_BOM_ID)
Get Product BOM by ID (cached) (immutable)- Parameters:
PP_Product_BOM_ID
-- Returns:
- product bom
-
get
public static MPPProductBOM get(Properties ctx, int PP_Product_BOM_ID)
Get Product BOM by ID (cached) (immutable)- Parameters:
ctx
-PP_Product_BOM_ID
-- Returns:
- product bom
-
getCopy
public static MPPProductBOM getCopy(Properties ctx, int PP_Product_BOM_ID, String trxName)
Get updateable copy of MPPProductBOM from cache- Parameters:
ctx
-PP_Product_BOM_ID
-trxName
-- Returns:
- MPPProductBOM
-
getBOMSearchKey
public static int getBOMSearchKey(MProduct product)
Get PP_Product_BOM_ID for given M_Product_ID- Parameters:
product
-- Returns:
- PP_Product_BOM_ID
-
getDefault
public static MPPProductBOM getDefault(MProduct product, String trxName)
Get BOM with Default Logic (Product = BOM Product and BOM Value = Product Value)- Parameters:
product
-trxName
-- Returns:
- product BOM
-
get
public static MPPProductBOM get(MProduct product, int ad_org_id, String trxName)
Get BOM for Product- Parameters:
product
- productad_org_id
- Organization IDtrxName
- Transaction Name- Returns:
- BOM
-
get
public static MPPProductBOM get(MProduct product, int ad_org_id, Timestamp valid, String trxName)
Get BOM with valid dates for Product- Parameters:
product
- productad_org_id
- Organization IDvalid
- Date to ValidatetrxName
- Transaction Name- Returns:
- BOM
-
getLines
public MPPProductBOMLine[] getLines(Timestamp valid)
Get BOM Lines valid date for Product BOM- Parameters:
valid
- Date to Validate- Returns:
- BOM Lines
-
getLines
public MPPProductBOMLine[] getLines()
Get BOM Lines for Product BOM from cache- Returns:
- BOM Lines
-
getLines
public MPPProductBOMLine[] getLines(boolean reload)
Get BOM Lines for Product BOM- Returns:
- BOM Lines
-
isValidFromTo
public boolean isValidFromTo(Timestamp date)
-
afterDelete
protected boolean afterDelete(boolean success)
Description copied from class:PO
Executed after Delete operation.- Overrides:
afterDelete
in classPO
- Parameters:
success
- true if record deleted- Returns:
- true if delete is a success
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Description copied from class:PO
Called before Save for Pre-Save Operation- Overrides:
beforeSave
in classPO
- 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
-
markImmutable
public MPPProductBOM markImmutable()
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
toString
public String toString()
Description copied from class:PO
String representation- Overrides:
toString
in classX_PP_Product_BOM
- Returns:
- String representation
-
-