public final class ObjectValues
extends java.lang.Object
ObjectValues
must implement the
LifecycleSaveAware
interface and call the values.cleanAfterSave()
.Modifier and Type | Method and Description |
---|---|
java.util.Iterator<PromptSetDefinition> |
activePromptSetIterator()
Returns an iterator over
PromptSetDefinition , Iterates over
only non deleted entries. |
void |
addPromptSet(PromptSetDefinition def)
Adds a new PromptSet to this object.
|
void |
addValue(java.lang.String validityKeyword,
java.lang.String value,
boolean replace)
Adds a new key and value to this object.
|
void |
addValue(java.lang.String validityKeyword,
java.lang.String value,
java.lang.String ertUsage,
boolean replace)
Adds a new key,value and ErtUsage to this object.
|
void |
cleanAfterSave()
Clear the internal state after a save was performed
on the object.
|
ErtUsage |
getErtUsage(java.lang.String validityKeyword)
Returns the ertUsage for a given validity keyword
The method returns
ErtUsage.NONE if the validity keyword does not exist. |
int |
getInheritFromParent()
Returns an integer which describes how variable values are inherited from its parent.
|
java.lang.String |
getValue(java.lang.String validityKeyword)
Returns the value for a given validity keyword
The method returns
null if the validity keyword does not exist. |
java.util.Iterator<PromptSetDefinition> |
promptSetIterator()
Returns an iterator over
PromptSetDefinition . |
int |
promptSetSize() |
void |
rearrange(java.util.List<PromptSetDefinition> orderedPromptSets)
This method can be used to rearrange the prompt sets.
|
void |
removeAll()
Removes all entries (Values and PromptSets).
|
void |
removeAllVariablevalues()
Removes all the variables stored
|
void |
removePromptSets()
Removes all PromptSets.
|
boolean |
removeValue(java.lang.String validityKeyword)
Removes a variable entry
The method returns
false if the validity keyword was not found. |
void |
setInheritFromParent(int mode)
Sets the inherit mode for this
VariableValues instance. |
void |
updateDefinition(PromptSet set)
This method can be used to update the number of prompt elements based on a
PromptSet object. |
java.util.Iterator<java.lang.String> |
valueKeyIterator()
Returns an iterator over validity keywords.
|
int |
valueSize() |
public java.util.Iterator<java.lang.String> valueKeyIterator()
java.lang.String
public java.util.Iterator<PromptSetDefinition> promptSetIterator()
PromptSetDefinition
.public java.util.Iterator<PromptSetDefinition> activePromptSetIterator()
PromptSetDefinition
, Iterates over
only non deleted entries.public void addPromptSet(PromptSetDefinition def)
def
- PromptSetDefinitionpublic void addValue(java.lang.String validityKeyword, java.lang.String value, boolean replace)
replace
can be used to define if the value should
be replaced in case of an already existing validity keyword.validityKeyword
- Keyvalue
- Valuereplace
- If true the value will be replaced if a key with this name does already existpublic void addValue(java.lang.String validityKeyword, java.lang.String value, java.lang.String ertUsage, boolean replace)
replace
can be used to define if the value should
be replaced in case of an already existing validity keyword.
Created after addition of new column ErtUsage in v11 of AE.validityKeyword
- Keyvalue
- ValueertUsage
- Acceptable Ert usage Values are 0 to 5, otherwise ertUsage value will be set to 0 i.e its Default Valuereplace
- If true the value will be replaced if a key with this name does already existpublic java.lang.String getValue(java.lang.String validityKeyword)
null
if the validity keyword does not exist.validityKeyword
- Keypublic ErtUsage getErtUsage(java.lang.String validityKeyword)
ErtUsage.NONE
if the validity keyword does not exist.
ErtUsage.NONE
is default value of ERT Usage Value.validityKeyword
- Keypublic boolean removeValue(java.lang.String validityKeyword)
false
if the validity keyword was not found.validityKeyword
- Keypublic void removeAllVariablevalues()
public int valueSize()
public int promptSetSize()
public void removeAll()
public void removePromptSets()
public void cleanAfterSave()
public void setInheritFromParent(int mode)
VariableValues
instance.
Throws IllegalArgumentException if the parameter value is not 0,1 or 2
mode
- Inherit modepublic int getInheritFromParent()
public void updateDefinition(PromptSet set)
PromptSet
object.set
- PromptSetpublic void rearrange(java.util.List<PromptSetDefinition> orderedPromptSets)
orderedPromptSets
- prompt set List in desired order