org.mmbase.module.corebuilders
Class FieldDefs

Package class diagram package FieldDefs
java.lang.Object
  extended by org.mmbase.bridge.util.AbstractDescriptor
      extended by org.mmbase.bridge.util.AbstractField<Object>
          extended by org.mmbase.core.CoreField
              extended by org.mmbase.module.corebuilders.FieldDefs
All Implemented Interfaces:
Cloneable, Comparable<Field>, Descriptor, Field, Storable, PublicCloneable<AbstractDescriptor>

Deprecated. use CoreField

public class FieldDefs
extends CoreField

One of the core objects. It is not itself a builder, but is used by builders. Defines one field of a object type / builder.

Version:
$Id: FieldDefs.java 41871 2010-04-13 10:31:27Z michiel $
Author:
Daniel Ockeloen, Hans Speijer, Pierre van Rooden
See Also:
Field

Nested Class Summary
protected  class FieldDefs.LocaleToStringMap
          Deprecated. Temporary implementation for backwards-compatibility.
 
Field Summary
static int DBSTATE_PERSISTENT
          Deprecated.  
static int DBSTATE_SYSTEM
          Deprecated.  
static int DBSTATE_UNKNOWN
          Deprecated.  
static int DBSTATE_VIRTUAL
          Deprecated.  
static int ORDER_CREATE
          Deprecated.  
static int ORDER_EDIT
          Deprecated.  
static int ORDER_LIST
          Deprecated.  
static int ORDER_SEARCH
          Deprecated.  
 
Fields inherited from class org.mmbase.bridge.util.AbstractField
dataType, listItemType, readOnly, state, type
 
Fields inherited from class org.mmbase.bridge.util.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_DECIMAL, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LIST, TYPE_LONG, TYPE_NODE, TYPE_STRING, TYPE_UNKNOWN, TYPE_XML
 
Constructor Summary
FieldDefs(String name, int type, int listItemType, int state, DataType<? extends Object> dataType)
          Deprecated.  
FieldDefs(String guiName, String guiType, int searchPos, int listPos, String name, int type)
          Deprecated. Constructor for FieldDefs with partially initialized fields.
FieldDefs(String guiName, String guiType, int searchPos, int listPos, String name, int type, int guiPos, int state)
          Deprecated. Constructor for FieldDefs with partially initialized fields.
 
Method Summary
 String getDBName()
          Deprecated. use AbstractDescriptor.getName()
 boolean getDBNotNull()
          Deprecated. use AbstractField.isRequired()
 int getDBPos()
          Deprecated. use CoreField.getStoragePosition()
 int getDBSize()
          Deprecated. Use CoreField.getMaxLength()
 int getDBState()
          Deprecated. use AbstractField.getState()
 int getDBType()
          Deprecated. to access type constraints, use AbstractField.getDataType()
 String getDescription(String lang)
          Deprecated. use AbstractDescriptor.getDescription(Locale locale)
 Map<String,String> getDescriptions()
          Deprecated. use AbstractDescriptor.getDescription()
 int getGUIList()
          Deprecated. use CoreField.getListPosition()
 String getGUIName(String lang)
          Deprecated. use AbstractDescriptor.getGUIName(Locale locale)
 Map<String,String> getGUINames()
          Deprecated. use AbstractDescriptor.getGUIName()
 int getGUIPos()
          Deprecated. use CoreField.getEditPosition()
 int getGUISearch()
          Deprecated. use CoreField.getSearchPosition()
 boolean isKey()
          Deprecated. use AbstractField.isUnique() to determine if a field is unique, use getIndexes() to return set of Index objects to which this key belongs
 void setDBKey(boolean value)
          Deprecated. use CoreField.setUnique(boolean) to make a field unique.
 void setDBNotNull(boolean value)
          Deprecated. to access type constraints, use AbstractField.getDataType()
 void setDBPos(int value)
          Deprecated. use CoreField.setStoragePosition(int)
 void setDBSize(int value)
          Deprecated. use CoreField.setMaxLength(int)
 void setDBState(int i)
          Deprecated. use AbstractField.getState()
 void setDBState(String value)
          Deprecated. use CoreField.setState(int)
 void setDescription(String lang, String value)
          Deprecated. use AbstractDescriptor.getLocalizedDescription()
 void setGUIList(int value)
          Deprecated. use CoreField.setListPosition(int)
 void setGUIName(String lang, String value)
          Deprecated. to access type constraints, use AbstractField.getDataType()
 void setGUIPos(int value)
          Deprecated. use CoreField.setEditPosition(int)
 void setGUISearch(int value)
          Deprecated. use CoreField.setSearchPosition(int)
static void sort(List<CoreField> fielddefs, int order)
          Deprecated. use Fields.sort(java.util.List, int)
static void sort(List<FieldDefs> fielddefs)
          Deprecated. use Collections.sort
 
Methods inherited from class org.mmbase.core.CoreField
clone, clone, compareTo, equals, finish, getEditPosition, getGUIType, getListPosition, getMaxLength, getNodeManager, getParent, getSearchPosition, getStorageIdentifier, getStoragePosition, getStorageType, hashCode, inStorage, isNotNull, rewrite, setDataType, setEditPosition, setListItemType, setListPosition, setMaxLength, setNotNull, setParent, setReadOnly, setSearchPosition, setState, setStoragePosition, setStorageType, setType, setUnique, storageEquals, toString, validate
 
Methods inherited from class org.mmbase.bridge.util.AbstractField
clone, getDataType, getListItemType, getState, getType, hasIndex, isReadOnly, isRequired, isTemporary, isUnique, isVirtual
 
Methods inherited from class org.mmbase.bridge.util.AbstractDescriptor
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
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

DBSTATE_VIRTUAL

public static final int DBSTATE_VIRTUAL
Deprecated. 
See Also:
Constant Field Values

DBSTATE_PERSISTENT

public static final int DBSTATE_PERSISTENT
Deprecated. 
See Also:
Constant Field Values

DBSTATE_SYSTEM

public static final int DBSTATE_SYSTEM
Deprecated. 
See Also:
Constant Field Values

DBSTATE_UNKNOWN

public static final int DBSTATE_UNKNOWN
Deprecated. 
See Also:
Constant Field Values

ORDER_CREATE

public static final int ORDER_CREATE
Deprecated. 
See Also:
Constant Field Values

ORDER_EDIT

public static final int ORDER_EDIT
Deprecated. 
See Also:
Constant Field Values

ORDER_LIST

public static final int ORDER_LIST
Deprecated. 
See Also:
Constant Field Values

ORDER_SEARCH

public static final int ORDER_SEARCH
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

FieldDefs

public FieldDefs(String name,
                 int type,
                 int listItemType,
                 int state,
                 DataType<? extends Object> dataType)
Deprecated. 

FieldDefs

public FieldDefs(String guiName,
                 String guiType,
                 int searchPos,
                 int listPos,
                 String name,
                 int type)
Deprecated. 
Constructor for FieldDefs with partially initialized fields.

Parameters:
guiName - the default GUIName for a field
guiType - the GUI type (i.e. "integer' or 'field')
searchPos - position in the editor for this field when searching
listPos - position in the editor for this field when listing
name - the actual name of the field in the database
type - the basic MMBase type of the field

FieldDefs

public FieldDefs(String guiName,
                 String guiType,
                 int searchPos,
                 int listPos,
                 String name,
                 int type,
                 int guiPos,
                 int state)
Deprecated. 
Constructor for FieldDefs with partially initialized fields.

Parameters:
guiName - the default GUIName for a field
guiType - the GUI type (i.e. "integer' or 'field')
searchPos - position in the editor for this field when searching
listPos - position in the editor for this field when listing
name - the actual name of the field in the database
type - the basic MMBase type of the field
guiPos - position in the editor for this field when editing
state - the state of the field (persistent, virtual, etc.)
Method Detail

getDBName

public String getDBName()
Deprecated. use AbstractDescriptor.getName()

Retrieve the database name of the field.


getDBType

public int getDBType()
Deprecated. to access type constraints, use AbstractField.getDataType()

Retrieves the basic MMBase type of the field.

Returns:
The type, this is one of the values defined in this class.

getDBSize

public int getDBSize()
Deprecated. Use CoreField.getMaxLength()

Retrieve size of the field. This may not be specified for some field types.


getDBNotNull

public boolean getDBNotNull()
Deprecated. use AbstractField.isRequired()

Retrieve whether the field can be left blank.


isKey

public boolean isKey()
Deprecated. use AbstractField.isUnique() to determine if a field is unique, use getIndexes() to return set of Index objects to which this key belongs

Retrieve whether the field is a key and thus need be 'unique'.


getGUIName

public String getGUIName(String lang)
Deprecated. use AbstractDescriptor.getGUIName(Locale locale)


getGUINames

public Map<String,String> getGUINames()
Deprecated. use AbstractDescriptor.getGUIName()


getDescriptions

public Map<String,String> getDescriptions()
Deprecated. use AbstractDescriptor.getDescription()


getDescription

public String getDescription(String lang)
Deprecated. use AbstractDescriptor.getDescription(Locale locale)


getDBState

public int getDBState()
Deprecated. use AbstractField.getState()


setGUIName

public void setGUIName(String lang,
                       String value)
Deprecated. to access type constraints, use AbstractField.getDataType()

SetUI the GUI name of the field for a specified langauge.

Parameters:
lang - the language to set the name for
value - the value to set

setDescription

public void setDescription(String lang,
                           String value)
Deprecated. use AbstractDescriptor.getLocalizedDescription()

Set the description of the field for a specified langauge.

Parameters:
lang - the language to set the description for
value - the value to set

setDBSize

public void setDBSize(int value)
Deprecated. use CoreField.setMaxLength(int)

Set size of the field.

Parameters:
value - the value to set

setDBPos

public void setDBPos(int value)
Deprecated. use CoreField.setStoragePosition(int)

Set the position of the field in the database table.

Parameters:
value - the value to set

getDBPos

public int getDBPos()
Deprecated. use CoreField.getStoragePosition()


setGUIList

public void setGUIList(int value)
Deprecated. use CoreField.setListPosition(int)

Set the position of the field when listing. A value of -1 indicates teh field is unavailable in a list.

Parameters:
value - the value to set

getGUIList

public int getGUIList()
Deprecated. use CoreField.getListPosition()


setGUIPos

public void setGUIPos(int value)
Deprecated. use CoreField.setEditPosition(int)

Set the position of the field when editing. A value of -1 indicates the field cannot be edited.

Parameters:
value - the value to set

getGUIPos

public int getGUIPos()
Deprecated. use CoreField.getEditPosition()


setGUISearch

public void setGUISearch(int value)
Deprecated. use CoreField.setSearchPosition(int)

Set the position of the field when searching. A value of -1 indicates teh field is unavailable during search.

Parameters:
value - the value to set

getGUISearch

public int getGUISearch()
Deprecated. use CoreField.getSearchPosition()


setDBState

public void setDBState(String value)
Deprecated. use CoreField.setState(int)

Set the basic MMBase state of the field, using the state description

Parameters:
value - the name of the state

setDBState

public void setDBState(int i)
Deprecated. use AbstractField.getState()


setDBKey

public void setDBKey(boolean value)
Deprecated. use CoreField.setUnique(boolean) to make a field unique.

Set whether the field is a key and thus needs to be 'unique'.

Parameters:
value - the value to set

setDBNotNull

public void setDBNotNull(boolean value)
Deprecated. to access type constraints, use AbstractField.getDataType()

Set whether the field can be left blank.

Parameters:
value - the value to set

sort

public static void sort(List<FieldDefs> fielddefs)
Deprecated. use Collections.sort

Sorts a list with FieldDefs objects, using the default order (ORDER_CREATE)

Parameters:
fielddefs - the list to sort

sort

public static void sort(List<CoreField> fielddefs,
                        int order)
Deprecated. use Fields.sort(java.util.List, int)

Sorts a list with FieldDefs objects, using the specified order

Parameters:
fielddefs - the list to sort
order - one of ORDER_CREATE, ORDER_EDIT, ORDER_LIST,ORDER_SEARCH


MMBase2 Core 2.0-SNAPSHOT - 2013-05-29T22:08