public abstract class ParameterValueData<T> extends BasicData
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
description |
private java.lang.String |
label |
private boolean |
masked |
static int |
MAX_DESCRIPTION_LENGTH
The maximum length of the description of the parameter that can be
stored in the database.
|
static int |
MAX_LABEL_LENGTH
The maximum length of the label of the parameter that can be
stored in the database.
|
private java.util.List<T> |
oldValues |
Constructor and Description |
---|
ParameterValueData() |
ParameterValueData(T... values) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Get the description of the parameter.
|
java.lang.String |
getLabel()
Get the label of the parameter.
|
java.util.List<T> |
getOldValues()
Get the old values that has been replaced by new values in this session.
|
abstract java.util.List<T> |
getValues()
Get values of this parameter.
|
abstract int |
getValueType()
Get the type of parameter values that are store in this parameter.
|
boolean |
isMasked()
A flag indicating if the value should be masked when
displayed in client applications (eg. since it may be a password)
NOTE!
|
boolean |
replaceValuesIfDifferent(java.util.List<?> values,
boolean checkOnly)
Replace the values in the database with the new
values in the specified list.
|
void |
setDescription(java.lang.String description) |
void |
setLabel(java.lang.String label) |
void |
setMasked(boolean masked) |
(package private) abstract void |
setValues(java.util.List<T> values)
Set values of this parameter.
|
protected void |
storeCurrentValuesAsOld(java.util.List<T> current)
Store the current values as old values, except
if there are no current values or if old values
have already been stored.
|
equals, getId, getVersion, hashCode, setId, setVersion, toString
private transient java.util.List<T> oldValues
public static final int MAX_LABEL_LENGTH
setLabel(String)
,
Constant Field Valuesprivate java.lang.String label
public static final int MAX_DESCRIPTION_LENGTH
setDescription(String)
,
Constant Field Valuesprivate java.lang.String description
private boolean masked
ParameterValueData()
@SafeVarargs ParameterValueData(T... values)
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public boolean isMasked()
public void setMasked(boolean masked)
public abstract int getValueType()
Type.getValue()
values, or 0 if the parameter has no corresponding type.Type
enumeration
or 0public abstract java.util.List<T> getValues()
abstract void setValues(java.util.List<T> values)
NOTE! Used by Hibernate to initialize the object. Do not
call AnnotationData.setLastUpdate(java.util.Date)
!
values
- Collection of values.public boolean replaceValuesIfDifferent(java.util.List<?> values, boolean checkOnly)
NOTE! When this method is called to set annotation values
for an AnnotationData
, don't forget to also update
the last update timestamp: AnnotationData.setLastUpdate(java.util.Date)
.
and to invalidate the annotation set snapshot: AnnotationSet.setSnapshotInvalid()
checkOnly
- Only check the values, do not replace them even if they are differentprotected void storeCurrentValuesAsOld(java.util.List<T> current)
public java.util.List<T> getOldValues()