public interface Field extends Descriptor, Comparable<Field>
| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_PERSISTENT
A field's state is 'persistent' if it is persistent in storage, and editable.
|
static int |
STATE_SYSTEM
A field's state is 'system' if it is persistent in storage, but not editable by users.
|
static int |
STATE_SYSTEM_VIRTUAL
A field's state is 'system virtual' if it is not persistent in storage, nor editable by users.
|
static int |
STATE_UNKNOWN
The field's state when it is not (yet) known.
|
static int |
STATE_VIRTUAL
A field's state is 'virtual' if it is not persistent in storage.
|
static int |
TYPE_BINARY
MMBase base type identifier for the binary (byte[]) data type
|
static int |
TYPE_BOOLEAN
MMBase base type identifier for the Boolean data type
|
static int |
TYPE_BYTE
Deprecated.
use
TYPE_BINARY |
static int |
TYPE_DATETIME
MMBase base type identifier for the Date data type
|
static int |
TYPE_DECIMAL |
static int |
TYPE_DOUBLE
MMBase base type identifier for the Double data type
|
static int |
TYPE_FLOAT
MMBase base type identifier for the Float data type
|
static int |
TYPE_INTEGER
MMBase base type identifier for the Integer data type
|
static int |
TYPE_LIST
MMBase base type identifier for the List data type
|
static int |
TYPE_LONG
MMBase base type identifier for the Long data type
|
static int |
TYPE_NODE
MMBase base type identifier for the Node data type
|
static int |
TYPE_STRING
MMBase base type identifier for the String data type
|
static int |
TYPE_UNKNOWN
MMBase base type identifier for data types whose type is unknown
|
static int |
TYPE_XML
MMBase base type identifier for the DOM Document data type
|
| Modifier and Type | Method and Description |
|---|---|
DataType |
getDataType()
Returns the data type this field contains.
|
int |
getEditPosition()
Retrieve the position of the field when editing.
|
String |
getGUIType()
Deprecated.
use
getDataType() and Descriptor.getName() |
int |
getListItemType()
If the type of this field is TYPE_LIST, this method returns the MMBase base type for the list elements.
|
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 |
getState()
Returns this field's state identifier (virtual, persistent, system, systemvirtual).
|
int |
getStoragePosition()
Retrieve the position of the field in the database table.
|
int |
getType()
Returns the identifier for the MMBase base type for this field.
|
boolean |
hasIndex()
Returns whether this field is a key field, meaning that the storage layer should define an index for it, allowing
optimization with search and sort actions.
|
boolean |
isReadOnly()
Returns whether a field is 'read only' - that is, a user cannot edit it.
|
boolean |
isRequired()
Returns whether this field is required (should have content).
|
boolean |
isUnique()
Returns whether this field is part of a unique key (a set of fields whose combined content should
occur only once).
|
boolean |
isVirtual()
A field's state is 'virtual' if it is not persistent in storage.
|
Collection<String> |
validate(Object value)
Checks whether a given value is valid for this field.
|
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUINamecompareTostatic final int TYPE_STRING
static final int TYPE_INTEGER
static final int TYPE_BINARY
@Deprecated static final int TYPE_BYTE
TYPE_BINARYstatic final int TYPE_FLOAT
static final int TYPE_DOUBLE
static final int TYPE_LONG
static final int TYPE_XML
static final int TYPE_NODE
static final int TYPE_DATETIME
static final int TYPE_BOOLEAN
static final int TYPE_LIST
static final int TYPE_DECIMAL
static final int TYPE_UNKNOWN
static final int STATE_VIRTUAL
static final int STATE_PERSISTENT
static final int STATE_SYSTEM
static final int STATE_SYSTEM_VIRTUAL
static final int STATE_UNKNOWN
NodeManager getNodeManager()
int getState()
int which identifies the state of this fieldDataType getDataType()
DataType object describing the constraints on this field.boolean isUnique()
true if the field is part of a unique keyboolean hasIndex()
true if the field has a key definedint getType()
getDataType.getBaseType() instead.int which identifies the base typeint getListItemType()
int which identifies the base typeint getSearchPosition()
int getListPosition()
int getEditPosition()
int getStoragePosition()
@Deprecated String getGUIType()
getDataType() and Descriptor.getName()getDataType()boolean isRequired()
true if the field is requiredint getMaxLength()
Collection<String> validate(Object value)
value - value to validateboolean isVirtual()
true when a field is virtualboolean isReadOnly()
true when a field is read onlyMMBase 1.9-SNAPSHOT - ${javadoctimestamp}