|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.core.AbstractDescriptor
org.mmbase.core.AbstractField
org.mmbase.bridge.util.DataTypeField
public class DataTypeField
Wraps a DataType object into a (virtual) Field object. It can be instantiated with DataTypeField(Cloud, DataType) to have a 'virtual field with a Virtual NodeManager with only one field
(itself). The constructor DataTypeField(Field, DataType), produces a new field object,
that is very similar to the one wrapped, only with a different DataType.
This also a way to associate a Cloud object with a DataType (it is actually possible to see that
as the essence of being a Field).
| Field Summary | |
|---|---|
protected Field |
field
|
protected NodeManager |
nodeManager
|
| Fields inherited from class org.mmbase.core.AbstractField |
|---|
dataType, listItemType, readOnly, state, type |
| Fields inherited from class org.mmbase.core.AbstractDescriptor |
|---|
description, guiName, key |
| Fields inherited from interface org.mmbase.bridge.Field |
|---|
STATE_PERSISTENT, STATE_SYSTEM, STATE_SYSTEM_VIRTUAL, STATE_UNKNOWN, STATE_VIRTUAL, TYPE_BINARY, TYPE_BOOLEAN, TYPE_BYTE, TYPE_DATETIME, TYPE_DECIMAL, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LIST, TYPE_LONG, TYPE_NODE, TYPE_STRING, TYPE_UNKNOWN, TYPE_XML |
| Constructor Summary | |
|---|---|
DataTypeField(Cloud cloud,
DataType<? extends Object> dataType)
|
|
DataTypeField(Field field,
DataType<? extends Object> dataType)
This constructor only wraps the given field to have another datatype. |
|
DataTypeField(NodeManager nm,
Field f)
|
|
DataTypeField(String name,
NodeManager nm,
DataType<? extends Object> dataType)
|
|
| Method Summary | |
|---|---|
int |
getEditPosition()
Retrieve the position of the field when editing. |
String |
getGUIType()
Returns the GUI name for the data type this field contains. |
int |
getListPosition()
Retrieve the position of the field when listing. |
int |
getMaxLength()
Returns the maximum length of data this field can contain. |
NodeManager |
getNodeManager()
Returns the node manager this field belongs to. |
int |
getSearchPosition()
Retrieve the position of the field when searching. |
int |
getStoragePosition()
Retrieve the position of the field in the database table. |
boolean |
isReadOnly()
Returns whether a field is a read only. |
Collection<String> |
validate(Object value)
Checks whether a given value is valid for this field. |
| Methods inherited from class org.mmbase.core.AbstractField |
|---|
clone, clone, compareTo, equals, getDataType, getListItemType, getState, getType, hashCode, hasIndex, isRequired, isTemporary, isUnique, isVirtual, setDataType, setState, toString |
| Methods inherited from class org.mmbase.core.AbstractDescriptor |
|---|
clone, 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 final NodeManager nodeManager
protected final Field field
| Constructor Detail |
|---|
public DataTypeField(Cloud cloud,
DataType<? extends Object> dataType)
public DataTypeField(NodeManager nm,
Field f)
public DataTypeField(String name,
NodeManager nm,
DataType<? extends Object> dataType)
public DataTypeField(Field field,
DataType<? extends Object> dataType)
| Method Detail |
|---|
public NodeManager getNodeManager()
Field
getNodeManager in interface FieldgetNodeManager in class AbstractFieldpublic int getSearchPosition()
Field
getSearchPosition in interface FieldgetSearchPosition in class AbstractFieldpublic int getListPosition()
Field
getListPosition in interface FieldgetListPosition in class AbstractFieldpublic int getEditPosition()
Field
getEditPosition in interface FieldgetEditPosition in class AbstractFieldpublic int getStoragePosition()
Field
getStoragePosition in interface FieldgetStoragePosition in class AbstractFieldpublic int getMaxLength()
Field
getMaxLength in interface FieldgetMaxLength in class AbstractFieldpublic boolean isReadOnly()
AbstractField
isReadOnly in interface FieldisReadOnly in class AbstractFieldtrue when read onlyField.isVirtual()public String getGUIType()
Field
getGUIType in interface FieldgetGUIType in class AbstractFieldField.getDataType()public Collection<String> validate(Object value)
Field
value - value to validate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||