Package org.compiere.model
Class MAttributeSet
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_M_AttributeSet
org.compiere.model.MAttributeSet
- All Implemented Interfaces:
Serializable,Cloneable,Comparator<Object>,I_M_AttributeSet,I_Persistent,Evaluatee,ImmutablePOSupport
Product Attribute Set
- Version:
- $Id: MAttributeSet.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- FR [ 2214883 ] Remove SQL code and Replace for Query
- See Also:
-
Field Summary
Fields inherited from class org.compiere.model.X_M_AttributeSet
ENTITYTYPE_AD_Reference_ID, M_ATTRIBUTESET_TYPE_AD_Reference_ID, M_ATTRIBUTESET_TYPE_MaterialManagementSystem, M_ATTRIBUTESET_TYPE_TableAttribute, MANDATORYTYPE_AD_Reference_ID, MANDATORYTYPE_AlwaysMandatory, MANDATORYTYPE_NotMandatory, MANDATORYTYPE_WhenShippingFields 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_IDFields inherited from interface org.compiere.model.I_M_AttributeSet
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_EntityType, COLUMNNAME_GuaranteeDays, COLUMNNAME_IsActive, COLUMNNAME_IsAutoGenerateLot, COLUMNNAME_IsGuaranteeDate, COLUMNNAME_IsGuaranteeDateMandatory, COLUMNNAME_IsInstanceAttribute, COLUMNNAME_IsLot, COLUMNNAME_IsLotMandatory, COLUMNNAME_IsSerNo, COLUMNNAME_IsSerNoMandatory, COLUMNNAME_LotCharEOverwrite, COLUMNNAME_LotCharSOverwrite, COLUMNNAME_M_AttributeSet_ID, COLUMNNAME_M_AttributeSet_Type, COLUMNNAME_M_AttributeSet_UU, COLUMNNAME_M_LotCtl_ID, COLUMNNAME_M_SerNoCtl_ID, COLUMNNAME_MandatoryType, COLUMNNAME_Name, COLUMNNAME_SerNoCharEOverwrite, COLUMNNAME_SerNoCharSOverwrite, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_UseGuaranteeDateForMPolicy, Model, Table_ID, Table_Name -
Constructor Summary
ConstructorsConstructorDescriptionMAttributeSet(Properties ctx, int M_AttributeSet_ID, String trxName) Standard constructorMAttributeSet(Properties ctx, String M_AttributeSet_UU, String trxName) UUID based ConstructorMAttributeSet(Properties ctx, ResultSet rs, String trxName) Load constructorMAttributeSet(Properties ctx, MAttributeSet copy) Copy constructorMAttributeSet(Properties ctx, MAttributeSet copy, String trxName) Copy constructorMAttributeSet(MAttributeSet copy) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanafterSave(boolean newRecord, boolean success) Called after Save for Post-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.protected booleanbeforeSave(boolean newRecord) Called before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.booleanexcludeEntry(int AD_Column_ID, boolean isSOTrx) Check if mandatory checking is excluded for a tablebooleanexcludeTableEntry(int AD_Table_ID, boolean isSOTrx) Check if mandatory checking is excluded for a tablestatic MAttributeSetget(int M_AttributeSet_ID) Get MAttributeSet from Cache (Immutable)static MAttributeSetget(Properties ctx, int M_AttributeSet_ID) Get MAttributeSet from Cache (Immutable)static MAttributeSetgetCopy(Properties ctx, int M_AttributeSet_ID, String trxName) Get updateable copy of MAttributeSet from cacheGet Lot Char EndGet Lot Char StartgetMAttributes(boolean instanceAttributes) Get instance or product attributesGet SerNo Char EndGet SerNo Char StartbooleanisExcludeLot(int AD_Column_ID, boolean isSOTrx) Check if Lot creation is excluded for a tablebooleanisExcludeSerNo(int AD_Column_ID, boolean isSOTrx) Check if SerNo creation is excluded for a tablebooleanSomething is MandatorybooleanIs always mandatorybooleanIs Mandatory when Shippingmark PO as immutableMethods inherited from class org.compiere.model.X_M_AttributeSet
get_AccessLevel, getDescription, getEntityType, getGuaranteeDays, getKeyNamePair, getLotCharEOverwrite, getLotCharSOverwrite, getM_AttributeSet_ID, getM_AttributeSet_Type, getM_AttributeSet_UU, getM_LotCtl, getM_LotCtl_ID, getM_SerNoCtl, getM_SerNoCtl_ID, getMandatoryType, getName, getSerNoCharEOverwrite, getSerNoCharSOverwrite, initPO, isAutoGenerateLot, isGuaranteeDate, isGuaranteeDateMandatory, isInstanceAttribute, isLot, isLotMandatory, isSerNo, isSerNoMandatory, isUseGuaranteeDateForMPolicy, setDescription, setEntityType, setGuaranteeDays, setIsAutoGenerateLot, setIsGuaranteeDate, setIsGuaranteeDateMandatory, setIsInstanceAttribute, setIsLot, setIsLotMandatory, setIsSerNo, setIsSerNoMandatory, setLotCharEOverwrite, setLotCharSOverwrite, setM_AttributeSet_ID, setM_AttributeSet_Type, setM_AttributeSet_UU, setM_LotCtl_ID, setM_SerNoCtl_ID, setMandatoryType, setName, setSerNoCharEOverwrite, setSerNoCharSOverwrite, setUseGuaranteeDateForMPolicy, toStringMethods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, 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_TableAttribute, get_TableAttributeAsBoolean, get_TableAttributeAsInt, get_TableAttributes, 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, validForeignKeysExMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface org.compiere.model.I_M_AttributeSet
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActiveMethods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MAttributeSet
UUID based Constructor- Parameters:
ctx- ContextM_AttributeSet_UU- UUID keytrxName- Transaction
-
MAttributeSet
Standard constructor- Parameters:
ctx- contextM_AttributeSet_ID- idtrxName- transaction
-
MAttributeSet
Load constructor- Parameters:
ctx- contextrs- result settrxName- transaction
-
MAttributeSet
Copy constructor- Parameters:
copy-
-
MAttributeSet
Copy constructor- Parameters:
ctx-copy-
-
MAttributeSet
Copy constructor- Parameters:
ctx-copy-trxName-
-
-
Method Details
-
get
Get MAttributeSet from Cache (Immutable)- Parameters:
M_AttributeSet_ID- id- Returns:
- MAttributeSet
-
get
Get MAttributeSet from Cache (Immutable)- Parameters:
ctx- contextM_AttributeSet_ID- id- Returns:
- MAttributeSet
-
getCopy
Get updateable copy of MAttributeSet from cache- Parameters:
ctx-M_AttributeSet_ID-- Returns:
- MAttributeSet
-
getMAttributes
Get instance or product attributes- Parameters:
instanceAttributes- true for instance attributes, false for product attributes- Returns:
- instance or product attribute array
-
isMandatory
public boolean isMandatory()Something is Mandatory- Returns:
- true if something is mandatory
-
isMandatoryAlways
public boolean isMandatoryAlways()Is always mandatory- Returns:
- mandatory
-
isMandatoryShipping
public boolean isMandatoryShipping()Is Mandatory when Shipping- Returns:
- true if required for shipping
-
excludeEntry
public boolean excludeEntry(int AD_Column_ID, boolean isSOTrx) Check if mandatory checking is excluded for a table- Parameters:
AD_Column_ID- column of table to checkisSOTrx- true for sales transactions, false otherwise- Returns:
- true if excluded
-
excludeTableEntry
public boolean excludeTableEntry(int AD_Table_ID, boolean isSOTrx) Check if mandatory checking is excluded for a table- Parameters:
AD_Table_ID- columnisSOTrx- true for sales transactions, false otherwise- Returns:
- true if excluded
-
isExcludeLot
public boolean isExcludeLot(int AD_Column_ID, boolean isSOTrx) Check if Lot creation is excluded for a table- Parameters:
AD_Column_ID- column of table to checkisSOTrx- SO- Returns:
- true if excluded
-
isExcludeSerNo
public boolean isExcludeSerNo(int AD_Column_ID, boolean isSOTrx) Check if SerNo creation is excluded for a table- Parameters:
AD_Column_ID- column of table to checkisSOTrx- true for sales transactions, false otherwise- Returns:
- true if excluded
-
getLotCharStart
Get Lot Char Start- Returns:
- defined start character or «
-
getLotCharEnd
Get Lot Char End- Returns:
- defined end character or »
-
getSerNoCharStart
Get SerNo Char Start- Returns:
- defined start character or #
-
getSerNoCharEnd
Get SerNo Char End- Returns:
- defined end character or empty string
-
beforeSave
protected boolean beforeSave(boolean newRecord) Description copied from class:POCalled before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.- Overrides:
beforeSavein classPO- 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:POCalled after Save for Post-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it. -
markImmutable
Description copied from interface:ImmutablePOSupportmark PO as immutable- Specified by:
markImmutablein interfaceImmutablePOSupport- Returns:
- PO
-
getMAttributeUse
- Returns:
- Arrays of
MAttributeUse
-