|
||||||||||
| 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
| Field Summary | |
protected DataType |
dataType
|
protected int |
listItemType
|
protected boolean |
readOnly
|
protected int |
state
|
protected int |
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_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LIST, TYPE_LONG, TYPE_NODE, TYPE_STRING, TYPE_UNKNOWN, TYPE_XML |
| Constructor Summary | |
protected |
AbstractField(String name,
Field field)
Create a field object based on another field. |
protected |
AbstractField(String name,
Field field,
boolean cloneDataForRewrite)
Create a field object based on another field. |
protected |
AbstractField(String name,
int type,
int listItemType,
int state,
DataType dataType)
Create a field object |
| Method Summary | |
Object |
clone()
|
Object |
clone(String name,
boolean copyDataTypeForRewrite)
|
int |
compareTo(Object o)
|
boolean |
equals(Object o)
Whether data type equals to other data type. |
DataType |
getDataType()
Returns the data type this field contains. |
abstract int |
getEditPosition()
Retrieve the position of the field when editing. |
abstract String |
getGUIType()
Returns the GUI name for the data type this field contains. |
int |
getListItemType()
If the type of this field is TYPE_LIST, this method returns the MMBase base type for the list elements. |
abstract int |
getListPosition()
Retrieve the position of the field when listing. |
abstract int |
getMaxLength()
Returns the maximum length of data this field can contain. |
abstract NodeManager |
getNodeManager()
Returns the node manager this field belongs to. |
abstract int |
getSearchPosition()
Retrieve the position of the field when searching. |
int |
getState()
Returns this field's state identifier (virtual, persistent, system, systemvirtual). |
abstract 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. |
int |
hashCode()
|
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 |
isTemporary()
Returns whether a field is a temporary field. |
boolean |
isUnique()
Retrieve whether the field is a key and thus need be unique. |
boolean |
isVirtual()
A field's state is 'virtual' if it is not persistent in storage. |
void |
setDataType(DataType dataType)
Sets the datatype of a field. |
protected void |
setState(int state)
|
String |
toString()
Returns a description for this field. |
| 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.Field |
validate |
| Methods inherited from interface org.mmbase.bridge.Descriptor |
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName |
| Field Detail |
protected DataType dataType
protected int type
protected int state
protected int listItemType
protected boolean readOnly
| Constructor Detail |
protected AbstractField(String name,
Field field)
name - the name of the fieldfield - the parent field
protected AbstractField(String name,
Field field,
boolean cloneDataForRewrite)
name - the name of the fieldfield - the parent fieldcloneDataForRewrite - determines whether the datatype of the parent field is copied (which means it can be altered
without affecting the original datatype)
protected AbstractField(String name,
int type,
int listItemType,
int state,
DataType dataType)
name - the name of the fielddataType - the data type of the field| Method Detail |
public abstract NodeManager getNodeManager()
Field
getNodeManager in interface Fieldpublic int compareTo(Object o)
compareTo in interface Comparablepublic boolean equals(Object o)
public int hashCode()
public int getState()
Field
getState in interface Fieldint which identifies the state of this fieldprotected void setState(int state)
public int getType()
FieldgetDataType.getBaseType() instead.
getType in interface Fieldint which identifies the base typepublic int getListItemType()
Field
getListItemType in interface Fieldint which identifies the base typepublic DataType getDataType()
Field
getDataType in interface FieldDataType object describing the constraints on this field.
public void setDataType(DataType dataType)
throws IllegalArgumentException
IllegalArgumentExceptiongetType()public boolean hasIndex()
Field
hasIndex in interface Fieldtrue if the field has a key definedpublic abstract int getSearchPosition()
Field
getSearchPosition in interface Fieldpublic abstract int getListPosition()
Field
getListPosition in interface Fieldpublic abstract int getEditPosition()
Field
getEditPosition in interface Fieldpublic abstract int getStoragePosition()
Field
getStoragePosition in interface Fieldpublic boolean isUnique()
isUnique in interface Fieldtrue if the field is part of a unique keypublic abstract int getMaxLength()
Field
getMaxLength in interface Fieldpublic boolean isRequired()
Field
isRequired in interface Fieldtrue if the field is requiredField.isRequired()public boolean isVirtual()
Field
isVirtual in interface Fieldtrue when a field is virtualField.isVirtual()public boolean isTemporary()
public boolean isReadOnly()
Field
isReadOnly in interface Fieldtrue when a field is read onlyField.isVirtual()public abstract String getGUIType()
Field
getGUIType in interface FieldField.getDataType()public String toString()
toString in class AbstractDescriptorpublic Object clone()
clone in class AbstractDescriptor
public Object clone(String name,
boolean copyDataTypeForRewrite)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||