Class EnumOption

java.lang.Object
com.polarion.platform.persistence.spi.EnumOption
All Implemented Interfaces:
IEnumOption, IImmutableEnumOption

public class EnumOption extends Object implements IEnumOption, IImmutableEnumOption
Author:
POLARION SOFTWARE
  • Constructor Details

    • EnumOption

      public EnumOption(String enumId, String id)
      Creates the phantom enum option
      Parameters:
      enumId -
      id -
    • EnumOption

      public EnumOption(@NotNull String enumId, @NotNull String id, @NotNull Properties props)
      Creates the phantom enum option with properties
      Since:
      3.22.2
    • EnumOption

      public EnumOption(String enumId, String id, String name, int number, boolean isDefault)
      Creates the option with empty properties
    • EnumOption

      public EnumOption(String enumId, String id, String name, int number, boolean isDefault, Properties props)
  • Method Details

    • getEnumId

      public String getEnumId()
      Specified by:
      getEnumId in interface IEnumOption
      Returns:
      The ID of enumeration this option belongs to.
    • getId

      public String getId()
      Specified by:
      getId in interface IEnumOption
    • getName

      public String getName()
      Specified by:
      getName in interface IEnumOption
    • getSequenceNumber

      public int getSequenceNumber()
      Specified by:
      getSequenceNumber in interface IEnumOption
      Returns:
      The sequence number as defined or 0 if not defined.
    • equals

      public boolean equals(Object obj)
      Two options are equal, if they have both the same enumId and id.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProperty

      public String getProperty(String key)
      Description copied from interface: IEnumOption
      This method allows the system to pass through some specific attributes for different enumerations, like colors of texts, or url of icons.
      Specified by:
      getProperty in interface IEnumOption
      Returns:
      the String property value
    • getProperties

      public Properties getProperties()
      Specified by:
      getProperties in interface IEnumOption
    • isPhantom

      public boolean isPhantom()
      Description copied from interface: IEnumOption
      Phantom options represent values that are not part of the options available in the enumeration (but probably once were). They usually contain no other data than the ID.
      Specified by:
      isPhantom in interface IEnumOption
    • isDefault

      public boolean isDefault()
      Specified by:
      isDefault in interface IEnumOption
    • isHidden

      public boolean isHidden()
      Description copied from interface: IEnumOption
      Indicates that the option should be hidden from selectors in UI
      Specified by:
      isHidden in interface IEnumOption
      Since:
      3.6.0
    • getIdentityKey

      @NotNull public IImmutableEnumOption.IIdentityKey getIdentityKey()
      Specified by:
      getIdentityKey in interface IImmutableEnumOption
      Returns:
      A key used for an option identity.