org.mmbase.bridge
Interface Field

All Known Implementing Classes:
BasicField

public interface Field

This interface represents a node's field type information object.

Version:
$Id: Field.java,v 1.11 2002/10/24 12:56:06 pierre Exp $
Author:
Pierre van Rooden, Jaco de Groot

Field Summary
static int STATE_PERSISTENT
           
static int STATE_SYSTEM
           
static int STATE_UNKNOWN
           
static int STATE_VIRTUAL
           
static int TYPE_BYTE
           
static int TYPE_DOUBLE
           
static int TYPE_FLOAT
           
static int TYPE_INTEGER
           
static int TYPE_LONG
           
static int TYPE_NODE
           
static int TYPE_STRING
           
static int TYPE_UNKNOWN
           
static int TYPE_XML
           
 
Method Summary
 java.lang.String getDescription()
          Returns the description for this field.
 java.lang.String getGUIName()
          Returns the GUI name for this field.
 java.lang.String getGUIType()
          Returns the GUI name for the data type this field contains.
 int getMaxLength()
          Returns the maximum length of data this field can contain.
 java.lang.String getName()
          Returns the name of this field.
 NodeManager getNodeManager()
          Returns the node manager this field belongs to.
 int getState()
          Returns this field's state identifier.
 int getType()
          Returns the identifier for the data type this field contains.
 boolean isRequired()
          Returns whether this field is required (should have content).
 boolean isUnique()
          Returns whether this field is unique (should have content that occurs only once).
 

Field Detail

STATE_VIRTUAL

public static final int STATE_VIRTUAL

STATE_PERSISTENT

public static final int STATE_PERSISTENT

STATE_SYSTEM

public static final int STATE_SYSTEM

STATE_UNKNOWN

public static final int STATE_UNKNOWN

TYPE_STRING

public static final int TYPE_STRING

TYPE_INTEGER

public static final int TYPE_INTEGER

TYPE_BYTE

public static final int TYPE_BYTE

TYPE_FLOAT

public static final int TYPE_FLOAT

TYPE_DOUBLE

public static final int TYPE_DOUBLE

TYPE_LONG

public static final int TYPE_LONG

TYPE_XML

public static final int TYPE_XML

TYPE_NODE

public static final int TYPE_NODE

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
Method Detail

getNodeManager

public NodeManager getNodeManager()
Returns the node manager this field belongs to.
Returns:
the node manager this field belongs to

getName

public java.lang.String getName()
Returns the name of this field.
Returns:
the name of this field

getGUIType

public java.lang.String getGUIType()
Returns the GUI name for the data type this field contains.
Returns:
the GUI name for the data type this field contains

getGUIName

public java.lang.String getGUIName()
Returns the GUI name for this field.
Returns:
the GUI name for this field

getDescription

public java.lang.String getDescription()
Returns the description for this field.
Returns:
the description for this field

getType

public int getType()
Returns the identifier for the data type this field contains.
Returns:
an int which identifies the type of data this field contains

getState

public int getState()
Returns this field's state identifier.
Returns:
an int which identifies the state of this field

isRequired

public boolean isRequired()
Returns whether this field is required (should have content). Note that MMBase does not generally enforce required fields to be filled - If not provided, a default value (generally an empty string or the integer value -1) is filled in by the system. As such, isRequired will mostly be used as an indicator for (generic) editors.
Returns:
true if the field is required
Since:
MMBase-1.6

isUnique

public boolean isUnique()
Returns whether this field is unique (should have content that occurs only once). Note that MMBase lets the database layer handle this. If your database or configuration does not support this the uniqueness may not be enforced.
Returns:
true if the field is unique
Since:
MMBase-1.6

getMaxLength

public int getMaxLength()
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.
Returns:
the maximum length of data this field can contain


MMBase build 1.6.5.20030923