Class Attribute

All Implemented Interfaces:
Serializable, Comparable<PerunBean>

public class Attribute extends AttributeDefinition implements Serializable
This class represents attribute (with value) of some object (VO, member). TODO
Author:
Slavek Licehammer
See Also:
Serialized Form
  • Constructor Details

    • Attribute

      public Attribute()
    • Attribute

      public Attribute(Attribute attribute, boolean copyValue)
    • Attribute

      public Attribute(AttributeDefinition attributeDefinition)
      Creates Attribute instance from an AttributeDefinition with null value.
    • Attribute

      public Attribute(AttributeDefinition attributeDefinition, Object value)
      Creates Attribute instance from an AttributeDefinition and a value.
  • Method Details

    • getValue

      public Object getValue()
    • valueAsString

      public String valueAsString()
    • valueAsInteger

      public Integer valueAsInteger()
    • valueAsBoolean

      public Boolean valueAsBoolean()
    • valueAsList

      public ArrayList<String> valueAsList()
    • valueAsMap

      public LinkedHashMap<String,​String> valueAsMap()
    • getValueCreatedAt

      public String getValueCreatedAt()
    • getValueCreatedBy

      public String getValueCreatedBy()
    • getValueModifiedAt

      public String getValueModifiedAt()
    • getValueModifiedBy

      public String getValueModifiedBy()
    • setValue

      public void setValue(Object value)
    • setValueCreatedAt

      public void setValueCreatedAt(String valueCreatedAt)
    • setValueCreatedBy

      public void setValueCreatedBy(String valueCreatedBy)
    • setValueModifiedAt

      public void setValueModifiedAt(String valueModifiedAt)
    • setValueModifiedBy

      public void setValueModifiedBy(String valueModifiedBy)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AttributeDefinition
    • valueContains

      public boolean valueContains(String value)
      Check if the attribute value contains value. In case of list, it uses method contains. In case of array it searches in both keys and values.
      Parameters:
      value - value
      Returns:
      true if the attribute value contains value.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AttributeDefinition
    • serializeToString

      public String serializeToString()
      Overrides:
      serializeToString in class AttributeDefinition
    • toString

      public String toString()
      Overrides:
      toString in class AttributeDefinition