Class MAttribute

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

public class MAttribute extends X_M_Attribute implements ImmutablePOSupport
Product Attribute
Version:
$Id: MAttribute.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MAttribute

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

      public MAttribute(Properties ctx, int M_Attribute_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      M_Attribute_ID - id
      trxName - transaction
    • MAttribute

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

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

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

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

      public MAttribute(Properties ctx, int M_Attribute_ID, String trxName, String... virtualColumns)
  • Method Details

    • getOfClient

      public static MAttribute[] getOfClient(Properties ctx, boolean onlyProductAttributes, boolean onlyListAttributes)
      Get Attributes Of Client
      Parameters:
      ctx - Properties
      onlyProductAttributes - only Product Attributes
      onlyListAttributes - only List Attributes
      Returns:
      array of attributes
    • getMAttributeValues

      public MAttributeValue[] getMAttributeValues()
      Get Values List
      Returns:
      Values or null if not of type list
    • get

      public static MAttribute get(Properties ctx, int M_Attribute_ID)
      Parameters:
      ctx -
      M_Attribute_ID -
      Returns:
      MAttribute
    • getMAttributeInstance

      public MAttributeInstance getMAttributeInstance(int M_AttributeSetInstance_ID)
      Get Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - attribute set instance
      Returns:
      Attribute Instance or null
    • setMAttributeInstance

      public void setMAttributeInstance(int M_AttributeSetInstance_ID, MAttributeValue value)
      Update or create new Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - id
      value - attribute value
    • setMAttributeInstance

      public void setMAttributeInstance(int M_AttributeSetInstance_ID, String value)
      Update or create new Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - id
      value - string value
    • setMAttributeInstance

      public void setMAttributeInstance(int M_AttributeSetInstance_ID, BigDecimal value)
      Update or create new Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - id
      value - numeric value
    • setMAttributeInstance

      public void setMAttributeInstance(int M_AttributeSetInstance_ID, int value)
      Update or create new Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - id
      value - integer value
    • setMAttributeInstance

      public void setMAttributeInstance(int M_AttributeSetInstance_ID, KeyNamePair value)
      Update or create new Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - id
      value - KeyNamePair
    • setMAttributeInstance

      public void setMAttributeInstance(int M_AttributeSetInstance_ID, Timestamp value)
      Update or create new Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - id
      value - Timestamp
    • setMAttributeInstanceMultiSelection

      public void setMAttributeInstanceMultiSelection(int M_AttributeSetInstance_ID, String multiSelectionValue, String multiSelectionDisplayValue)
      Update or create new Attribute Instance
      Parameters:
      M_AttributeSetInstance_ID - id
      multiSelectionValue -
      multiSelectionDisplayValue -
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_M_Attribute
      Returns:
      info
    • 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
    • isAttributeValueTypeReference

      public boolean isAttributeValueTypeReference()
      Returns:
      true if it is of type reference
    • markImmutable

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