org.mmbase.bridge.implementation
Class BasicField

java.lang.Object
  extended byorg.mmbase.core.AbstractDescriptor
      extended byorg.mmbase.core.AbstractField
          extended byorg.mmbase.bridge.implementation.BasicField
All Implemented Interfaces:
Cloneable, Comparable, Descriptor, Field

public class BasicField
extends AbstractField
implements Field

Version:
$Id: BasicField.java,v 1.31 2006/07/11 09:30:26 michiel Exp $
Author:
Pierre van Rooden
Warning: No Java Documentation Available.

Field Summary
protected  CoreField coreField
           
 
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_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LIST, TYPE_LONG, TYPE_NODE, TYPE_STRING, TYPE_UNKNOWN, TYPE_XML
 
Constructor Summary
BasicField(Field field, NodeManager nodeManager)
           
 
Method Summary
protected  Locale getDefaultLocale()
          The locale wihch must be used if no locale is specified .
 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.
 Collection 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, isReadOnly, isRequired, isTemporary, isUnique, isVirtual, setDataType, setState, toString
 
Methods inherited from class org.mmbase.core.AbstractDescriptor
clone, 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
getDataType, getListItemType, getState, getType, hasIndex, isReadOnly, isRequired, isUnique, isVirtual
 
Methods inherited from interface org.mmbase.bridge.Descriptor
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName
 

Field Detail

coreField

protected final CoreField coreField
Constructor Detail

BasicField

public BasicField(Field field,
                  NodeManager nodeManager)
Method Detail

getNodeManager

public NodeManager getNodeManager()
Description copied from interface: Field
Returns the node manager this field belongs to.

Specified by:
getNodeManager in interface Field
Specified by:
getNodeManager in class AbstractField

getSearchPosition

public int getSearchPosition()
Description copied from interface: Field
Retrieve the position of the field when searching. A value of -1 indicates the field is unavailable during search.

Specified by:
getSearchPosition in interface Field
Specified by:
getSearchPosition in class AbstractField

getListPosition

public int getListPosition()
Description copied from interface: Field
Retrieve the position of the field when listing. A value of -1 indicates the field is unavailable in a list.

Specified by:
getListPosition in interface Field
Specified by:
getListPosition in class AbstractField

getEditPosition

public int getEditPosition()
Description copied from interface: Field
Retrieve the position of the field when editing. A value of -1 indicates the field cannot be edited.

Specified by:
getEditPosition in interface Field
Specified by:
getEditPosition in class AbstractField

getStoragePosition

public int getStoragePosition()
Description copied from interface: Field
Retrieve the position of the field in the database table.

Specified by:
getStoragePosition in interface Field
Specified by:
getStoragePosition in class AbstractField

validate

public Collection validate(Object value)
Description copied from interface: Field
Checks whether a given value is valid for this field.

Specified by:
validate in interface Field
Returns:
Collection of error-strings (describing the problem) in the current locale, or an empty collection if the value is ok.

getMaxLength

public int getMaxLength()
Description copied from interface: Field
Returns the maximum length of data this field can contain. For example if a field contains characters the size indicates the maximum number of characters it can contain. If the field is a numeric field (such as an integer), the result is -1.

Specified by:
getMaxLength in interface Field
Specified by:
getMaxLength in class AbstractField

getDefaultLocale

protected Locale getDefaultLocale()
Description copied from class: AbstractDescriptor
The locale wihch must be used if no locale is specified . Returns null for the defaul of this. This method can be overriden if another more logical default is available. E.g. in BasicField, where the locale of the current cloud is returned here.

Overrides:
getDefaultLocale in class AbstractDescriptor

getGUIType

public String getGUIType()
Description copied from interface: Field
Returns the GUI name for the data type this field contains.

Specified by:
getGUIType in interface Field
Specified by:
getGUIType in class AbstractField


MMBase build 1.8.1.20060716