Class UnitModel

All Implemented Interfaces:
Serializable

public class UnitModel extends ItemModel
Generated model class for type Unit first defined at extension core.
See Also:
  • Field Details

    • _TYPECODE

      public static final String _TYPECODE
      Generated model type code constant.
      See Also:
    • CODE

      public static final String CODE
      Generated constant - Attribute key of Unit.code attribute defined at extension core.
      See Also:
    • CONVERSION

      public static final String CONVERSION
      Generated constant - Attribute key of Unit.conversion attribute defined at extension core.
      See Also:
    • NAME

      public static final String NAME
      Generated constant - Attribute key of Unit.name attribute defined at extension core.
      See Also:
    • UNITTYPE

      public static final String UNITTYPE
      Generated constant - Attribute key of Unit.unitType attribute defined at extension core.
      See Also:
  • Constructor Details

    • UnitModel

      public UnitModel()
      Generated constructor - Default constructor for generic creation.
    • UnitModel

      public UnitModel(ItemModelContext ctx)
      Generated constructor - Default constructor for creation with existing context
      Parameters:
      ctx - the model context to be injected, must not be null
    • UnitModel

      @Deprecated(since="4.1.1", forRemoval=true) public UnitModel(String _code, String _unitType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 4.1.1 Please use the default constructor without parameters
      Generated constructor - Constructor with all mandatory attributes.
      Parameters:
      _code - initial attribute declared by type Unit at extension core
      _unitType - initial attribute declared by type Unit at extension core
    • UnitModel

      @Deprecated(since="4.1.1", forRemoval=true) public UnitModel(String _code, ItemModel _owner, String _unitType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 4.1.1 Please use the default constructor without parameters
      Generated constructor - for all mandatory and initial attributes.
      Parameters:
      _code - initial attribute declared by type Unit at extension core
      _owner - initial attribute declared by type Item at extension core
      _unitType - initial attribute declared by type Unit at extension core
  • Method Details

    • getCode

      @Accessor(qualifier="code", type=GETTER) public String getCode()
      Generated method - Getter of the Unit.code attribute defined at extension core.
      Returns:
      the code
    • getConversion

      @Accessor(qualifier="conversion", type=GETTER) public Double getConversion()
      Generated method - Getter of the Unit.conversion attribute defined at extension core.
      Returns:
      the conversion
    • getName

      @Accessor(qualifier="name", type=GETTER) public String getName()
      Generated method - Getter of the Unit.name attribute defined at extension core.
      Returns:
      the name
    • getName

      @Accessor(qualifier="name", type=GETTER) public String getName(Locale loc)
      Generated method - Getter of the Unit.name attribute defined at extension core.
      Parameters:
      loc - the value localization key
      Returns:
      the name
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • getUnitType

      @Accessor(qualifier="unitType", type=GETTER) public String getUnitType()
      Generated method - Getter of the Unit.unitType attribute defined at extension core.
      Returns:
      the unitType
    • setCode

      @Accessor(qualifier="code", type=SETTER) public void setCode(String value)
      Generated method - Setter of Unit.code attribute defined at extension core.
      Parameters:
      value - the code
    • setConversion

      @Accessor(qualifier="conversion", type=SETTER) public void setConversion(Double value)
      Generated method - Setter of Unit.conversion attribute defined at extension core.
      Parameters:
      value - the conversion
    • setName

      @Accessor(qualifier="name", type=SETTER) public void setName(String value)
      Generated method - Setter of Unit.name attribute defined at extension core.
      Parameters:
      value - the name
    • setName

      @Accessor(qualifier="name", type=SETTER) public void setName(String value, Locale loc)
      Generated method - Setter of Unit.name attribute defined at extension core.
      Parameters:
      value - the name
      loc - the value localization key
      Throws:
      IllegalArgumentException - if localization key cannot be mapped to data language
    • setUnitType

      @Accessor(qualifier="unitType", type=SETTER) public void setUnitType(String value)
      Generated method - Setter of Unit.unitType attribute defined at extension core.
      Parameters:
      value - the unitType