public class DataObjectPropertyContainer extends uk.ac.ed.epcc.webapp.model.data.DataObject implements PropertyContainer, ExpressionTarget
| Constructor and Description |
|---|
DataObjectPropertyContainer(DataObjectPropertyFactory<?> fac,
uk.ac.ed.epcc.webapp.model.data.Repository.Record r) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
evaluateExpression(PropExpression<T> expr)
Evaluate an expression on the target object
|
<T> T |
evaluateExpression(PropExpression<T> expr,
T def)
Evaluate expression with default.
|
java.util.Set<PropertyTag> |
getDefinedProperties()
Generate a set of all the properties defined in this container
|
ExpressionTargetFactory |
getExpressionTargetFactory() |
protected DataObjectPropertyFactory |
getFac() |
Parser |
getParser()
Get a
Parser used to parse expressions for
this target. |
<T> T |
getProperty(PropertyTag<T> tag)
Get the specified property from the container.
|
<T> T |
getProperty(PropertyTag<T> tag,
T def)
Get property with default.
|
uk.ac.ed.epcc.webapp.model.data.reference.IndexedReference |
getReference() |
void |
setAll(PropertyContainer source)
Copy all compatible properties from one container to another;
|
<T> void |
setOptionalProperty(PropertyTag<? super T> tag,
T value)
Set the specified property if it is supported
|
<T> void |
setProperty(PropertyTag<? super T> tag,
T value)
Set the specified property
|
<T> void |
setProperty(PropertyTag<T> tag,
PropertyContainer map) |
boolean |
supports(PropertyTag<?> tag)
Is the specified property supported by the container.
|
boolean |
writable(PropertyTag<?> tag)
Is the specified property supported for write.
|
addToMap, addToMap, addToMap, commit, delete, empty, equals, formUpdate, getContext, getFactoryTag, getID, getIdentifier, getIdentifier, getLogger, getMap, getRecord, getRecord, getRecord, getSQLContext, getUniqueIdName, hashCode, post_commit, postCreate, pre_commit, release, setContents, setDirty, setMap, toStringpublic DataObjectPropertyContainer(DataObjectPropertyFactory<?> fac, uk.ac.ed.epcc.webapp.model.data.Repository.Record r)
public uk.ac.ed.epcc.webapp.model.data.reference.IndexedReference getReference()
public final <T> T getProperty(PropertyTag<T> tag) throws InvalidPropertyException
PropertyContainergetProperty in interface PropertyContainerInvalidPropertyExceptionT - type of propertytag - PropertyTag identifying propertypublic final <T> T getProperty(PropertyTag<T> tag, T def)
PropertyTargetgetProperty in interface PropertyTargetT - Type of propertytag - PropertTag identifying propertydef - default valuepublic final <T> T evaluateExpression(PropExpression<T> expr) throws InvalidPropertyException
ExpressionTargetevaluateExpression in interface ExpressionTargetInvalidPropertyExceptionT - type of expressionexpr - expressionpublic final <T> T evaluateExpression(PropExpression<T> expr, T def)
ExpressionTargetevaluateExpression in interface ExpressionTargetT - type of expressionexpr - expressiondef - default valuepublic final <T> void setProperty(PropertyTag<? super T> tag, T value) throws InvalidPropertyException
PropertyContainersetProperty in interface PropertyContainerInvalidPropertyExceptionT - type of propertytag - PropertyTag identifying propertypublic final <T> void setOptionalProperty(PropertyTag<? super T> tag, T value)
PropertyContainersetOptionalProperty in interface PropertyContainerT - type of propertytag - PropertyTag identifying propertypublic final <T> void setProperty(PropertyTag<T> tag, PropertyContainer map) throws InvalidPropertyException
InvalidPropertyExceptionpublic final boolean supports(PropertyTag<?> tag)
PropertyContainersupports in interface PropertyContainerpublic final boolean writable(PropertyTag<?> tag)
PropertyContainerwritable in interface PropertyContainerpublic ExpressionTargetFactory getExpressionTargetFactory()
protected DataObjectPropertyFactory getFac()
public java.util.Set<PropertyTag> getDefinedProperties()
PropertyContainergetDefinedProperties in interface PropertyContainerpublic void setAll(PropertyContainer source)
PropertyContainersetAll in interface PropertyContainersource - PropertyContainerpublic Parser getParser()
ExpressionTargetParser used to parse expressions for
this target.getParser in interface ExpressionTarget