org.mmbase.datatypes
Class ListDataType
java.lang.Object
org.mmbase.bridge.util.AbstractDescriptor
org.mmbase.datatypes.BasicDataType<E>
org.mmbase.datatypes.AbstractLengthDataType<List>
org.mmbase.datatypes.ListDataType
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<DataType<List>>, Descriptor, DataType<List>, LengthDataType<List>, PublicCloneable<AbstractDescriptor>
public class ListDataType
- extends AbstractLengthDataType<List>
- Since:
- MMBase-1.8
- Version:
- $Id: ListDataType.java 45316 2011-02-18 20:47:28Z michiel $
- Author:
- Pierre van Rooden, Michiel Meeuwissen
- See Also:
- Serialized Form
- Javadoc:
| Methods inherited from class org.mmbase.datatypes.BasicDataType |
addErrorDescription, addRestriction, addRestriction, addStyleClass, cast, cast, castAndValidate, castForSearch, castOrException, castToPresent, castToValidate, checkType, clone, clone, compareTo, edit, equals, finish, finish, getBaseType, getBaseTypeIdentifier, getCloud, getCloud, getCommitProcessor, getComparator, 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, toXml, validate, validate, validateRequired, xmlValue |
| Methods inherited from class org.mmbase.bridge.util.AbstractDescriptor |
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName |
| Methods inherited from interface org.mmbase.datatypes.DataType |
cast, castAndValidate, castForSearch, castOrException, checkType, clone, clone, finish, getBaseType, getBaseTypeIdentifier, getCommitProcessor, getDefaultValue, getDefaultValue, getDeleteProcessor, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getHandler, getHandlers, getOrigin, getProcessor, getProcessor, getRequiredRestriction, getStyleClasses, getTypeAsClass, getUniqueRestriction, isFinished, isRequired, isUnique, preCast, rewrite, setCommitProcessor, setDefaultValue, setProcessor, setProcessor, setRequired, setUnique, toXml, validate, validate |
| Methods inherited from interface org.mmbase.bridge.Descriptor |
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName |
itemRestriction
protected ListDataType.ItemRestriction itemRestriction
ListDataType
public ListDataType(String name)
- Constructor for List field.
inheritRestrictions
protected void inheritRestrictions(BasicDataType origin)
- Description copied from class:
BasicDataType
- If a datatype inherits from another datatype all its restrictions inherit too.
- Overrides:
inheritRestrictions in class AbstractLengthDataType<List>
cloneRestrictions
protected void cloneRestrictions(BasicDataType origin)
- Description copied from class:
BasicDataType
- If a datatype is cloned, the restrictions of it (normally implemented as inner classes), must be reinstantiated.
- Overrides:
cloneRestrictions in class AbstractLengthDataType<List>
getLength
public long getLength(Object value)
- Description copied from class:
AbstractLengthDataType
- In this method should be implemented how to calculate such a length for a certain value of
this datatype. There does not exist a generic interface for this, so the implementation
will cast to the expected type (String, byte[]..)
- Specified by:
getLength in interface LengthDataType<List>- Specified by:
getLength in class AbstractLengthDataType<List>
getItemDataType
public DataType getItemDataType()
- Returns the datatype of items in this list.
- Returns:
- the datatype as a DataType object,
null if there are no restrictions
getItemDataTypeRestriction
public DataType.Restriction getItemDataTypeRestriction()
- Returns the 'itemDataType' restriction, containing the value, errormessages, and fixed status of this attribute.
- Returns:
- the restriction as a
DataType.Restriction
setItemDataType
public void setItemDataType(DataType value)
- Sets the datatype of items in this list.
- Parameters:
value - the datatype as a DataType object, null if there are no restrictions
getEnforceStrength
public int getEnforceStrength()
- Description copied from interface:
DataType
- The maximum enforce strength of all restrictions on this datatype.
See
DataType.ENFORCE_ALWAYS, DataType.ENFORCE_ONCHANGE, DataType.ENFORCE_NEVER.
- Specified by:
getEnforceStrength in interface DataType<List>- Overrides:
getEnforceStrength in class AbstractLengthDataType<List>
- Returns:
- maximum enforce strength
validateCastValue
protected Collection<LocalizedString> validateCastValue(Collection<LocalizedString> errors,
Object castValue,
Object value,
Node node,
Field field)
- Overrides:
validateCastValue in class AbstractLengthDataType<List>
toStringBuilder
protected StringBuilder toStringBuilder()
- Overrides:
toStringBuilder in class AbstractLengthDataType<List>
MMBase2 Bridge 2.0-SNAPSHOT - 2013-03-30T06:34