Class EnumOption
java.lang.Object
com.polarion.platform.persistence.spi.EnumOption
- All Implemented Interfaces:
IEnumOption
,IImmutableEnumOption
- Author:
- POLARION SOFTWARE
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.polarion.platform.persistence.spi.IImmutableEnumOption
IImmutableEnumOption.IIdentityKey
-
Field Summary
Fields inherited from interface com.polarion.platform.persistence.IEnumOption
PROPERTY_KEY_COLOR, PROPERTY_KEY_DEFAULT, PROPERTY_KEY_DESCRIPTION, PROPERTY_KEY_HIDDEN, PROPERTY_KEY_ICON_URL, PROPERTY_KEY_UI_LINK, PROPERTY_KEY_URI
-
Constructor Summary
ConstructorDescriptionEnumOption
(String enumId, String id) Creates the phantom enum optionEnumOption
(String enumId, String id, String name, int number, boolean isDefault) Creates the option with empty propertiesEnumOption
(String enumId, String id, String name, int number, boolean isDefault, Properties props) EnumOption
(String enumId, String id, Properties props) Creates the phantom enum option with properties -
Method Summary
Modifier and TypeMethodDescriptionboolean
Two options are equal, if they have both the sameenumId
andid
.getId()
getName()
getProperty
(String key) This method allows the system to pass through some specific attributes for different enumerations, like colors of texts, or url of icons.int
int
hashCode()
boolean
boolean
isHidden()
Indicates that the option should be hidden from selectors in UIboolean
Phantom options represent values that are not part of the options available in the enumeration (but probably once were).toString()
-
Constructor Details
-
EnumOption
Creates the phantom enum option- Parameters:
enumId
-id
-
-
EnumOption
Creates the phantom enum option with properties- Since:
- 3.22.2
-
EnumOption
Creates the option with empty properties -
EnumOption
public EnumOption(String enumId, String id, String name, int number, boolean isDefault, Properties props)
-
-
Method Details
-
getEnumId
- Specified by:
getEnumId
in interfaceIEnumOption
- Returns:
- The ID of enumeration this option belongs to.
-
getId
- Specified by:
getId
in interfaceIEnumOption
-
getName
- Specified by:
getName
in interfaceIEnumOption
-
getSequenceNumber
public int getSequenceNumber()- Specified by:
getSequenceNumber
in interfaceIEnumOption
- Returns:
- The sequence number as defined or 0 if not defined.
-
equals
Two options are equal, if they have both the sameenumId
andid
. -
hashCode
public int hashCode() -
toString
-
getProperty
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 interfaceIEnumOption
- Returns:
- the
String
property value
-
getProperties
- Specified by:
getProperties
in interfaceIEnumOption
-
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 interfaceIEnumOption
-
isDefault
public boolean isDefault()- Specified by:
isDefault
in interfaceIEnumOption
-
isHidden
public boolean isHidden()Description copied from interface:IEnumOption
Indicates that the option should be hidden from selectors in UI- Specified by:
isHidden
in interfaceIEnumOption
- Since:
- 3.6.0
-
getIdentityKey
- Specified by:
getIdentityKey
in interfaceIImmutableEnumOption
- Returns:
- A key used for an option identity.
-