|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.tatool.core.data.GenericProperty<T>
T - the type of the property valuepublic abstract class GenericProperty<T>
Generic property data object. You can use this class to define your own property objects without having to write too much.
| Constructor Summary | |
|---|---|
GenericProperty(String propertyName,
Class<T> propertyType)
Creates a new property object. |
|
| Method Summary | |
|---|---|
void |
clearValue(DataContainer dataContainer,
PropertyHolder holder)
|
void |
clearValue(DataContainer dataContainer,
String nodeId)
|
void |
clearValue(PropertyHolder holder)
|
boolean |
copyValue(DataContainer dataContainer,
Node fromNode,
Node toNode,
T defaultValue)
Copy a property from one to another nodeId. |
boolean |
copyValue(DataContainer dataContainer,
String fromId,
String toId,
T defaultValue)
|
T |
ensureValue(DataContainer dataContainer,
PropertyHolder holder)
Ensure a value, using whatever default should be used for this property. |
T |
ensureValue(DataContainer dataContainer,
PropertyHolder holder,
T defaultValue)
|
T |
ensureValue(DataContainer dataContainer,
String nodeId)
Ensures a value, using the default value defined by this property. |
T |
ensureValue(DataContainer dataContainer,
String nodeId,
T defaultValue)
Ensure a value is set. |
String |
getPropertyName()
|
Class<?> |
getPropertyType()
|
String |
getStringValue(DataContainer dataContainer,
PropertyHolder holder)
|
String |
getStringValue(DataContainer dataContainer,
PropertyHolder holder,
String defaultValue)
|
String |
getStringValue(DataContainer dataContainer,
String nodeId)
|
String |
getStringValue(DataContainer dataContainer,
String nodeId,
String defaultValue)
|
T |
getValue(DataContainer dataContainer,
PropertyHolder holder)
Default implementation throws an Exception. |
T |
getValue(DataContainer dataContainer,
PropertyHolder holder,
T defaultValue)
|
T |
getValue(DataContainer dataContainer,
String nodeId)
Default implementation throws an Exception. |
T |
getValue(DataContainer dataContainer,
String nodeId,
T defaultValue)
|
T |
getValue(PropertyHolder holder)
|
T |
getValue(PropertyHolder holder,
T defaultValue)
|
boolean |
isSet(DataContainer dataContainer,
PropertyHolder propertyHolder)
|
boolean |
isSet(DataContainer dataContainer,
String nodeId)
|
boolean |
isSet(PropertyHolder holder)
|
void |
restoreValue(DataContainer dataContainer,
PropertyHolder holder)
|
void |
restoreValue(DataContainer dataContainer,
PropertyHolder holder,
T defaultValue)
Restore a value from the dataContainer to the element. |
void |
setStringValue(DataContainer dataContainer,
PropertyHolder holder,
String value)
|
void |
setStringValue(DataContainer dataContainer,
String nodeId,
String value)
|
void |
setValue(DataContainer dataContainer,
PropertyHolder holder)
|
void |
setValue(DataContainer dataContainer,
PropertyHolder holder,
T value)
|
void |
setValue(DataContainer dataContainer,
String nodeId,
T value)
|
void |
setValue(PropertyHolder holder,
T value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericProperty(String propertyName,
Class<T> propertyType)
| Method Detail |
|---|
public String getPropertyName()
getPropertyName in interface Property<T>public Class<?> getPropertyType()
getPropertyType in interface Property<T>public boolean isSet(PropertyHolder holder)
public boolean isSet(DataContainer dataContainer,
PropertyHolder propertyHolder)
public boolean isSet(DataContainer dataContainer,
String nodeId)
public T getValue(PropertyHolder holder)
getValue in interface Property<T>
public T getValue(PropertyHolder holder,
T defaultValue)
getValue in interface Property<T>
public String getStringValue(DataContainer dataContainer,
PropertyHolder holder)
getStringValue in interface Property<T>
public String getStringValue(DataContainer dataContainer,
String nodeId)
getStringValue in interface Property<T>
public String getStringValue(DataContainer dataContainer,
PropertyHolder holder,
String defaultValue)
getStringValue in interface Property<T>
public String getStringValue(DataContainer dataContainer,
String nodeId,
String defaultValue)
getStringValue in interface Property<T>
public void setValue(PropertyHolder holder,
T value)
setValue in interface Property<T>
public void setValue(DataContainer dataContainer,
PropertyHolder holder)
setValue in interface Property<T>
public void setValue(DataContainer dataContainer,
PropertyHolder holder,
T value)
setValue in interface Property<T>
public void setValue(DataContainer dataContainer,
String nodeId,
T value)
setValue in interface Property<T>
public void setStringValue(DataContainer dataContainer,
PropertyHolder holder,
String value)
setStringValue in interface Property<T>
public void setStringValue(DataContainer dataContainer,
String nodeId,
String value)
setStringValue in interface Property<T>public void clearValue(PropertyHolder holder)
clearValue in interface Property<T>
public void clearValue(DataContainer dataContainer,
PropertyHolder holder)
clearValue in interface Property<T>
public void clearValue(DataContainer dataContainer,
String nodeId)
clearValue in interface Property<T>
public T getValue(DataContainer dataContainer,
PropertyHolder holder)
getValue in interface Property<T>
public T getValue(DataContainer dataContainer,
String nodeId)
getValue in interface Property<T>
public T getValue(DataContainer dataContainer,
PropertyHolder holder,
T defaultValue)
getValue in interface Property<T>
public T getValue(DataContainer dataContainer,
String nodeId,
T defaultValue)
getValue in interface Property<T>
public void restoreValue(DataContainer dataContainer,
PropertyHolder holder)
restoreValue in interface Property<T>
public void restoreValue(DataContainer dataContainer,
PropertyHolder holder,
T defaultValue)
restoreValue in interface Property<T>
public T ensureValue(DataContainer dataContainer,
PropertyHolder holder)
public T ensureValue(DataContainer dataContainer,
String nodeId)
UnsupportedOperationException
public T ensureValue(DataContainer dataContainer,
PropertyHolder holder,
T defaultValue)
public T ensureValue(DataContainer dataContainer,
String nodeId,
T defaultValue)
public boolean copyValue(DataContainer dataContainer,
Node fromNode,
Node toNode,
T defaultValue)
defaultValue - the value to use if fromNode does not contain a value for given property.
If defaultValue is null and fromNode does not contain a value then nothing
will be copied.
public boolean copyValue(DataContainer dataContainer,
String fromId,
String toId,
T defaultValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||