public class NodeDataType extends BasicDataType<Node>
| Modifier and Type | Class and Description |
|---|---|
protected class |
NodeDataType.MustExistRestriction |
BasicDataType.AbstractRestriction<D extends Serializable>, BasicDataType.DataTypeComparator<D>, BasicDataType.EnumerationRestriction, BasicDataType.RequiredRestriction, BasicDataType.RestrictedEnumerationIterator, BasicDataType.StaticAbstractRestriction<D extends Serializable>, BasicDataType.TypeRestriction, BasicDataType.UniqueRestrictionDataType.Restriction<D extends Serializable>| Modifier and Type | Field and Description |
|---|---|
protected NodeDataType.MustExistRestriction |
mustExistRestriction |
DATATYPE_BUNDLE, defaultValue, enumerationRestriction, origin, requiredRestriction, typeRestriction, uniqueRestrictiondescription, guiName, keyENFORCE_ABSOLUTE, ENFORCE_ALWAYS, ENFORCE_NEVER, ENFORCE_ONCHANGE, ENFORCE_ONCREATE, ENFORCE_ONVALIDATE, PROCESS_GET, PROCESS_SET, VALID, XMLNS| Constructor and Description |
|---|
NodeDataType(String name)
Constructor for node field.
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
castForSearch(Object value,
Node node,
Field field)
Sometimes the the representation of the value is a bit different in the database, or has a
different type.
|
protected Object |
castToValidate(Object value,
Node node,
Field field)
Before validating the value, the value will be 'cast', on default this will be to the
'correct' type, but it can be a more generic type sometimes.
|
protected void |
cloneRestrictions(BasicDataType origin)
If a datatype is cloned, the restrictions of it (normally implemented as inner classes), must be reinstantiated.
|
Comparator<Node> |
getComparator() |
int |
getEnforceStrength()
The maximum enforce strength of all restrictions on this datatype.
|
NodeDataType.MustExistRestriction |
getMustExistRestriction() |
protected void |
inheritRestrictions(BasicDataType origin)
If a datatype inherits from another datatype all its restrictions inherit too.
|
boolean |
mustExist()
Whether the Node of the value must exist
XXX MM: How can you have a non-existing node? I don't really get it.
|
protected Collection<LocalizedString> |
validateCastValue(Collection<LocalizedString> errors,
Object castValue,
Object value,
Node node,
Field field) |
addErrorDescription, addRestriction, addRestriction, addStyleClass, cast, cast, castAndValidate, castToPresent, checkType, clone, clone, compareTo, edit, equals, finish, finish, getBaseType, getBaseTypeIdentifier, getCloud, getCloud, getCommitProcessor, getDefaultProcessor, getDefaultValue, getDefaultValue, getDeleteProcessor, getElement, getElement, getEnforceString, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getHandler, getHandlers, getOrigin, getProcessor, getProcessor, getProcessorWithoutDefault, getRequiredRestriction, getRestrictions, getStyleClasses, getTypeAsClass, getUniqueRestriction, hashCode, inherit, inheritProperties, isCorrectType, isFinished, isRequired, isUnique, preCast, preCast, preCast, rewrite, setCommitProcessor, setDefaultProcessor, setDefaultValue, setDeleteProcessor, setProcessor, setProcessor, setRequired, setUnique, setXml, toString, toStringBuilder, toXml, toXml, validate, validate, validateCastValueOrNull, validateRequired, xmlValuegetDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUINamefinalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUINameprotected NodeDataType.MustExistRestriction mustExistRestriction
public NodeDataType(String name)
protected void inheritRestrictions(BasicDataType origin)
BasicDataTypeinheritRestrictions in class BasicDataType<Node>protected void cloneRestrictions(BasicDataType origin)
BasicDataTypecloneRestrictions in class BasicDataType<Node>protected Object castToValidate(Object value, Node node, Field field) throws CastException
BasicDataTypecastToValidate in class BasicDataType<Node>CastExceptionpublic Integer castForSearch(Object value, Node node, Field field)
DataTypeDataType.cast(Object, Node, Field).castForSearch in interface DataType<Node>castForSearch in class BasicDataType<Node>public boolean mustExist()
public NodeDataType.MustExistRestriction getMustExistRestriction()
public int getEnforceStrength()
DataTypeDataType.ENFORCE_ALWAYS, DataType.ENFORCE_ONCHANGE, DataType.ENFORCE_NEVER.getEnforceStrength in interface DataType<Node>getEnforceStrength in class BasicDataType<Node>protected Collection<LocalizedString> validateCastValue(Collection<LocalizedString> errors, Object castValue, Object value, Node node, Field field)
validateCastValue in class BasicDataType<Node>public Comparator<Node> getComparator()
getComparator in class BasicDataType<Node>MMBase 1.9-SNAPSHOT - ${javadoctimestamp}