|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

public interface Field
This interface represents a node's field type information object.
| Field Summary | |
|---|---|
static int |
STATE_PERSISTENT
A field's state is 'persistent' if it is persistent in storage. |
static int |
STATE_SYSTEM
A field's state is 'system' if it is persistent in storage, but probably not editable by users (The default value
of isReadOnly() is true). |
static int |
STATE_SYSTEM_VIRTUAL
A field's state is 'system virtual' if it is not persistent in storage, and probably used for administration
purposes only. |
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 |
| Method Summary | |
|---|---|
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 ( STATE_VIRTUAL, STATE_PERSISTENT, STATE_SYSTEM or
STATE_SYSTEM_VIRTUAL, in erroneous situations it may return STATE_UNKNOWN) |
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. |
| Methods inherited from interface org.mmbase.bridge.Descriptor |
|---|
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
static final int TYPE_STRING
static final int TYPE_INTEGER
static final int TYPE_BINARY
@Deprecated static final int TYPE_BYTE
TYPE_BINARY
static 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
state is 'virtual' if it is not persistent in storage. The value of such a field may be implicitely
calculated from the values of other fields. This can e.g. be done with Processor's which are associated
with the DataType of this field.
static final int STATE_PERSISTENT
state is 'persistent' if it is persistent in storage. Most normal fields are this.
static final int STATE_SYSTEM
state is 'system' if it is persistent in storage, but probably not editable by users (The default value
of isReadOnly() is true). It is used to
(automatically) administrate special properties of a Node, like its number, owner and type (these fields are
available always), but also e.g. 'created' and 'lastmodified' fields can be marked as 'system' fields.
static final int STATE_SYSTEM_VIRTUAL
state is 'system virtual' if it is not persistent in storage, and probably used for administration
purposes only. In other words the field is both STATE_SYSTEM and STATE_VIRTUAL.
STATE_VIRTUAL,
STATE_SYSTEM,
Constant Field Valuesstatic final int STATE_UNKNOWN
state when it is not (yet) known.
| Method Detail |
|---|
NodeManager getNodeManager()
int getState()
STATE_VIRTUAL, STATE_PERSISTENT, STATE_SYSTEM or
STATE_SYSTEM_VIRTUAL, in erroneous situations it may return STATE_UNKNOWN)
int which identifies the state of this fieldisReadOnly();DataType 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 validate
boolean isVirtual()
true when a field is virtualboolean isReadOnly()
true when a field is read only
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||