Class AbstractObjectEnumeration
java.lang.Object
com.polarion.platform.persistence.spi.AbstractObjectEnumeration
- All Implemented Interfaces:
IEnumeration
,IObjectEnumeration
- Since:
- 3.6.3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IEnumOption
createPhantomOption
(String enumId, String optionId) getAvailableOptions
(Object controlValue) Currently, the control value can be onlyString
orIEnumOption
.getDefaultOption
(Object controlValue) wrapOption
(String optionId, IPObject pobject) Wraps any given ID into a valid option of this enumeration.wrapOption
(String optionId, Object controlValue) Wraps any given ID into a valid option of this enumeration.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.polarion.platform.persistence.IEnumeration
getAvailableOptions, wrapOption
Methods inherited from interface com.polarion.platform.persistence.spi.IObjectEnumeration
wrapObject
-
Constructor Details
-
AbstractObjectEnumeration
-
-
Method Details
-
wrapOption
Description copied from interface:IEnumeration
Wraps any given ID into a valid option of this enumeration.This method checks only the option definition for given controlValue (even if
null
). If no definition is found, then phantom option is created.- Specified by:
wrapOption
in interfaceIEnumeration
- Parameters:
optionId
- option id (notnull
)controlValue
- control value- Returns:
- the option wrapped as an
IEnumOption
(notnull
) - See Also:
-
wrapOption
Description copied from interface:IEnumeration
Wraps any given ID into a valid option of this enumeration.This method checks only the option definition applicable to given object. If no definition is found, then phantom option is created.
If pobject is not specified then it acts as
IEnumeration.wrapOption(String, Object)
withnull
control value.- Specified by:
wrapOption
in interfaceIEnumeration
- Parameters:
optionId
- option id (notnull
)pobject
- persistence object- Returns:
- the option wrapped as an
IEnumOption
(notnull
) - See Also:
-
getAvailableOptions
Description copied from interface:IEnumeration
Currently, the control value can be onlyString
orIEnumOption
. Passing in something else will result inUnsupportedOperationException
- Specified by:
getAvailableOptions
in interfaceIEnumeration
- Parameters:
controlValue
- Can benull
.- Returns:
- Sorted list of all the valid options for given control key value.
-
getControlKey
- Specified by:
getControlKey
in interfaceIEnumeration
- Returns:
- Name of the key on the object, which controls the option set of this enumeration.
-
getAllOptions
- Specified by:
getAllOptions
in interfaceIEnumeration
- Returns:
- Sorted list of all IEnumOptions across all the control key values.
-
getDefaultOption
- Specified by:
getDefaultOption
in interfaceIEnumeration
- Parameters:
controlValue
- The control value, since the default value might depend on it.- Returns:
- the default option from the enumeration
-
createPhantomOption
-