Class ProfileConditionValuePO

java.lang.Object
ro.sync.ecss.conditions.ProfileConditionValuePO
All Implemented Interfaces:
Serializable, Cloneable, Comparable<ProfileConditionValuePO>, PersistentObject
Direct Known Subclasses:
ProfileConditionGroupPO

@API(type=EXTENDABLE, src=PRIVATE) public class ProfileConditionValuePO extends Object implements PersistentObject, Comparable<ProfileConditionValuePO>
Profile condition attribute value representation.
See Also:
  • Constructor Details

    • ProfileConditionValuePO

      public ProfileConditionValuePO()
      Constructor.
    • ProfileConditionValuePO

      public ProfileConditionValuePO(String value, String description)
      Constructor.
      Parameters:
      value - Condition value.
      description - Condition value description.
  • Method Details

    • getValue

      public String getValue()
      Returns:
      Returns the value.
    • getDescription

      public String getDescription()
      Returns:
      Returns the description.
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - The description to set.
    • checkValid

      public void checkValid() throws InvalidPersistentObjException
      Description copied from interface: PersistentObject
      Check if object is valid to be used. Method is called after it is deserialized from options. If not then throw an InvalidPersistentObjException exception.
      Specified by:
      checkValid in interface PersistentObject
      Throws:
      InvalidPersistentObjException - Thrown when instance is not valid.
      See Also:
    • getNotPersistentFieldNames

      public String[] getNotPersistentFieldNames()
      Specified by:
      getNotPersistentFieldNames in interface PersistentObject
      Returns:
      The names of the field from this object which should not be serialized.
      See Also:
    • clone

      public Object clone()
      Description copied from interface: PersistentObject
      Forces all the persistent objects to be cloneable.
      Specified by:
      clone in interface PersistentObject
      Overrides:
      clone in class Object
      Returns:
      A clone of this object. The clone and the original are disjunct. They share only immutable objects, like Strings, Integers, etc.
      See Also:
    • compareTo

      public int compareTo(ProfileConditionValuePO other)
      Specified by:
      compareTo in interface Comparable<ProfileConditionValuePO>
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • setLevel

      public void setLevel(int level)
      Set the level in the hierarchy of Subject Scheme values this condition is located on.
      Parameters:
      level - the level in the hierarchy of Subject Scheme values this condition is located on.
    • getLevel

      public int getLevel()
      Get the level in the hierarchy of Subject Scheme values this condition is located on.
      Returns:
      Returns the level in the hierarchy of Subject Scheme values this condition is located on.
    • getComposeValue

      public String getComposeValue()
      Gets the composed value. If this value is part of a group, for example the value 'db1' from 'database(db1 db2)' then the composed value is 'database(db1)'.
      Returns:
      The composed value.
    • getRenderName

      public String getRenderName()
      Get the render name for the profiling condition. May be null.
      Returns:
      Returns the render name.
    • setRenderName

      public void setRenderName(String renderName)
      Set the render name.
      Parameters:
      renderName - The render name to be set in the dialog used to edit the profile condition value.
    • getValueDisplayLabel

      public String getValueDisplayLabel()
      Get the display label for the attribute's value.
      Returns:
      the display label if the render name is not null, empty otherwise.