|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.core.AbstractDescriptor
org.mmbase.datatypes.BasicDataType
org.mmbase.datatypes.ComparableDataType
Comparable datatypes have values which are Comparable, so can be ordered, and
therefore can have a minimum and a maximum value.
| Nested Class Summary | |
protected class |
ComparableDataType.MaxRestriction
|
protected class |
ComparableDataType.MinRestriction
|
| Nested classes inherited from class org.mmbase.datatypes.BasicDataType |
BasicDataType.AbstractRestriction, BasicDataType.EnumerationRestriction, BasicDataType.RequiredRestriction, BasicDataType.RestrictedEnumerationIterator, BasicDataType.StaticAbstractRestriction, BasicDataType.TypeRestriction, BasicDataType.UniqueRestriction |
| Nested classes inherited from class org.mmbase.datatypes.DataType |
DataType.Restriction |
| Field Summary | |
protected ComparableDataType.MaxRestriction |
maxRestriction
|
protected ComparableDataType.MinRestriction |
minRestriction
|
| Fields inherited from class org.mmbase.datatypes.BasicDataType |
DATATYPE_BUNDLE, enumerationRestriction, origin, requiredRestriction, typeRestriction, uniqueRestriction |
| Fields inherited from class org.mmbase.core.AbstractDescriptor |
description, guiName, key |
| Fields inherited from interface org.mmbase.datatypes.DataType |
ENFORCE_ABSOLUTE, ENFORCE_ALWAYS, ENFORCE_NEVER, ENFORCE_ONCHANGE, ENFORCE_ONCREATE, PROCESS_GET, PROCESS_SET, VALID, XMLNS |
| Constructor Summary | |
protected |
ComparableDataType(String name,
Class classType)
|
| Method Summary | |
Object |
clone(String name)
Besides super.clone, it calls BasicDataType.inheritProperties(BasicDataType) and BasicDataType.cloneRestrictions(BasicDataType). A clone is not finished. See BasicDataType.isFinished().
Besides super.clone, it calls BasicDataType.inheritProperties(BasicDataType) and cloneRestrictions(BasicDataType). |
protected void |
cloneRestrictions(BasicDataType origin)
If a datatype is cloned, the restrictions of it (normally implemented as inner classes), must be reinstantiated. |
Object |
getDefaultValue()
Returns the default value of this data type. |
DataType.Restriction |
getMaxRestriction()
|
DataType.Restriction |
getMinRestriction()
|
protected void |
inheritRestrictions(BasicDataType origin)
If a datatype inherits from another datatype all its restrictions inherit too. |
boolean |
isMaxInclusive()
Returns whether the maximum value for this data type is inclusive or not. |
boolean |
isMinInclusive()
Returns whether the minimum value for this data type is inclusive or not. |
void |
setMax(Comparable value,
boolean inclusive)
Sets the maximum Date value for this data type. |
void |
setMin(Comparable value,
boolean inclusive)
Sets the minimum Date value for this data type. |
protected StringBuffer |
toStringBuffer()
|
void |
toXml(Element parent)
Fills this datatype in another XML (for example in the xml of BasicDataType.getOrigin(), to make one XML, fully describing the DataType). |
protected Collection |
validateCastedValue(Collection errors,
Object castedValue,
Object value,
Node node,
Field field)
|
| Methods inherited from class org.mmbase.datatypes.BasicDataType |
cast, cast, castToValidate, checkType, clone, compareTo, edit, equals, finish, finish, getBaseType, getBaseTypeIdentifier, getCloud, getCommitProcessor, getElement, getElement, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getOrigin, getProcessor, getProcessor, getRequiredRestriction, getTypeAsClass, getUniqueRestriction, hashCode, inherit, inheritProperties, isCorrectType, isFinished, isRequired, isUnique, preCast, preCast, preCast, rewrite, setCommitProcessor, setDefaultValue, setProcessor, setProcessor, setRequired, setUnique, setXml, toString, toXml, validate, validate |
| Methods inherited from class org.mmbase.core.AbstractDescriptor |
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mmbase.bridge.Descriptor |
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName |
| Field Detail |
protected ComparableDataType.MinRestriction minRestriction
protected ComparableDataType.MaxRestriction maxRestriction
| Constructor Detail |
protected ComparableDataType(String name,
Class classType)
| Method Detail |
protected void inheritRestrictions(BasicDataType origin)
BasicDataType
inheritRestrictions in class BasicDataTypeprotected void cloneRestrictions(BasicDataType origin)
BasicDataType
cloneRestrictions in class BasicDataTypepublic DataType.Restriction getMinRestriction()
public boolean isMinInclusive()
true if the minimum value if inclusive, false if it is not, or if there is no minimum.public DataType.Restriction getMaxRestriction()
public boolean isMaxInclusive()
true if the maximum value if inclusive, false if it is not, or if there is no minimum.public final Object getDefaultValue()
BasicDataType
getDefaultValue in interface DataTypegetDefaultValue in class BasicDataType
public void setMin(Comparable value,
boolean inclusive)
value - the minimum as an Comparable (and Serializable), or null if there is no minimum.inclusive - whether the minimum value is inclusive or not
Class - Identifier: java.lang.UnsupportedOperationException if this data type is read-only (i.e. defined by MMBase)
public void setMax(Comparable value,
boolean inclusive)
value - the maximum as an Comparable (and Serializable), or null if there is no maximum.inclusive - whether the maximum value is inclusive or not
Class - Identifier: java.lang.UnsupportedOperationException if this data type is read-only (i.e. defined by MMBase)public void toXml(Element parent)
DataTypeDataType.getOrigin(), to make one XML, fully describing the DataType).
The implementation of this method is unfinished!
toXml in interface DataTypetoXml in class BasicDataType
protected Collection validateCastedValue(Collection errors,
Object castedValue,
Object value,
Node node,
Field field)
validateCastedValue in class BasicDataTypepublic Object clone(String name)
BasicDataTypeBasicDataType.inheritProperties(BasicDataType) and BasicDataType.cloneRestrictions(BasicDataType). A clone is not finished. See BasicDataType.isFinished().
clone in interface DataTypeclone in class BasicDataTypeprotected StringBuffer toStringBuffer()
toStringBuffer in class BasicDataType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||