public class ComplexMemberProperty extends MapProperty implements Adaptable
IS_READONLY, IS_VALIDATING, KEYED_DATA
DIRTY_MASK, IS_DIRTY, IS_MODIFIED, IS_MOVED, IS_NEW, IS_PHANTOM, IS_REMOVED, NONE
Constructor and Description |
---|
ComplexMemberProperty(ObjectAdapter adapter,
Property parent,
Field field) |
ComplexMemberProperty(ObjectAdapter adapter,
Property parent,
Field field,
int flags) |
Modifier and Type | Method and Description |
---|---|
ObjectAdapter |
getAdapter() |
Serializable |
getValueForWrite()
Gets the property normalized value for write.
|
void |
init(Serializable value)
Initializes the property with the given normalized value.
|
Serializable |
internalGetValue() |
void |
internalSetValue(Serializable value)
Sets the given normalized value.
|
boolean |
isContainer()
Whether this property is a container - this means the property value is a
map or a list.
|
boolean |
isSameAs(Property property)
Should be used by container properties.
|
void |
setValue(Object value)
Sets this property value.
|
accept, clone, getField, getName, getType
addEmpty, addValue, addValue, clear, containsKey, containsValue, entrySet, get, get, get, getChild, getChildren, getDirtyChildren, getNonPhantomChild, getNonPhantomChildren, isEmpty, isNormalized, keySet, normalize, put, putAll, remove, values, visitChildren
areFlagsSet, clearDirtyFlags, clearFlags, convertTo, getData, getData, getDirtyFlags, getParent, getPath, getRoot, getSchema, getValue, getValue, getValue, getValue, isComplex, isDirty, isList, isModified, isMoved, isNew, isPhantom, isReadOnly, isRemoved, isScalar, isValidating, iterator, moveTo, newInstance, remove, removePhantomFlag, resolvePath, resolvePath, setData, setData, setFlags, setIsModified, setReadOnly, setValidating, setValue, setValue, size, toString, validate, validateType
public ComplexMemberProperty(ObjectAdapter adapter, Property parent, Field field)
public ComplexMemberProperty(ObjectAdapter adapter, Property parent, Field field, int flags)
public ObjectAdapter getAdapter()
getAdapter
in interface Adaptable
public boolean isContainer()
Property
Container properties don't have a scalar values. Container values are
computed each time they are requested - by calling on of the
getValue
methods - by collecting the values of the child
properties.
isContainer
in interface Property
isContainer
in class MapProperty
public void setValue(Object value) throws PropertyException
Property
For complex or list properties the value will be set recursively (as a map or list value).
setValue
in interface Property
setValue
in class ComplexProperty
value
- the value to setPropertyException
public void init(Serializable value) throws PropertyException
Property
The given value must be normalized - note that no check is done on that.
The phantom flag is unset by this operation.
This method should be used to initialize properties.
init
in interface Property
init
in class ComplexProperty
value
- the normalized value to setPropertyException
public void internalSetValue(Serializable value) throws PropertyException
AbstractProperty
This applies only for nodes that physically store a value (that means non container nodes). Container nodes does nothing.
internalSetValue
in class MapProperty
PropertyException
public Serializable internalGetValue() throws PropertyException
internalGetValue
in class ComplexProperty
PropertyException
public Serializable getValueForWrite() throws PropertyException
Property
Can be different fropm Property.getValue()
in cases where the property
adapts the value it is given to store.
getValueForWrite
in interface Property
getValueForWrite
in class ComplexProperty
PropertyException
public boolean isSameAs(Property property) throws PropertyException
ComplexProperty
isSameAs
in interface Property
isSameAs
in class ComplexProperty
PropertyException
Copyright © 2013 Nuxeo SA. All Rights Reserved.