|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.module.corebuilders.FieldDefs
One of the core objects, Defines one field of a object type / builder, has its own builder called FieldDef (hitlisted)
| Field Summary | |
static int |
DBSTATE_MAXVALUE
|
static int |
DBSTATE_MINVALUE
|
static int |
DBSTATE_PERSISTENT
|
static int |
DBSTATE_SYSTEM
|
static int |
DBSTATE_UNKNOWN
|
static int |
DBSTATE_VIRTUAL
|
static int |
ORDER_CREATE
|
static int |
ORDER_EDIT
|
static int |
ORDER_LIST
|
static int |
ORDER_SEARCH
|
static int |
TYPE_BYTE
|
static int |
TYPE_DOUBLE
|
static int |
TYPE_FLOAT
|
static int |
TYPE_INTEGER
|
static int |
TYPE_LONG
|
static int |
TYPE_MAXVALUE
|
static int |
TYPE_MINVALUE
|
static int |
TYPE_NODE
|
static int |
TYPE_STRING
|
static int |
TYPE_UNKNOWN
|
static int |
TYPE_XML
|
| Constructor Summary | |
FieldDefs()
Constructor for default FieldDef. |
|
FieldDefs(java.lang.String GUIName,
java.lang.String GUIType,
int GUISearch,
int GUIList,
java.lang.String DBName,
int DBType)
Constructor for FieldDefs with partially initialized fields. |
|
FieldDefs(java.lang.String GUIName,
java.lang.String GUIType,
int GUISearch,
int GUIList,
java.lang.String DBName,
int DBType,
int GUIPos,
int DBState)
Constructor for FieldDefs with partially initialized fields. |
|
| Method Summary | |
int |
compareTo(java.lang.Object o)
Compare this object to the supplied one (should be a FieldDefs) |
java.lang.String |
getDBDocType()
Retrieve the doctype |
java.lang.String |
getDBName()
Retrieve the database name of the field. |
boolean |
getDBNotNull()
Retrieve whether the field can be left blank. |
int |
getDBPos()
Retrieve the position of the field in the database table. |
int |
getDBSize()
Retrieve size of the field. |
int |
getDBState()
Retrieve the state of the field (persistent, system, or virtual). |
java.lang.String |
getDBStateDescription()
Provide a description for the current state. |
static java.lang.String |
getDBStateDescription(int state)
Provide a description for the specified state. |
static int |
getDBStateId(java.lang.String state)
Provide an id for the specified mmbase state description. |
int |
getDBType()
Retrieve the basic MMBase type of the field. |
java.lang.String |
getDBTypeDescription()
Provide a description for the current type. |
static java.lang.String |
getDBTypeDescription(int type)
Provide a description for the specified type. |
static int |
getDBTypeId(java.lang.String type)
Provide an id for the specified mmbase type description |
java.lang.String |
getDescription()
Retrieve the GUI name of the field. |
java.lang.String |
getDescription(java.lang.String lang)
Retrieve the description of the field depending on specified langauge. |
java.util.Map |
getDescriptions()
Retrieve a Map with all descriptions for this field, accessible by language. |
int |
getGUIList()
Retrieve the position of the field when listing. |
java.lang.String |
getGUIName()
Retrieve the GUI name of the field. |
java.lang.String |
getGUIName(java.lang.String lang)
Retrieve the GUI name of the field depending on specified langauge. |
java.util.Map |
getGUINames()
Retrieve a Map with all GUI names for this field, accessible by language. |
int |
getGUIPos()
Retrieve the position of the field when editing. |
int |
getGUISearch()
Retrieve the position of the field when searching. |
java.lang.String |
getGUIType()
Retrieve the GUI type of the field. |
MMObjectBuilder |
getParent()
Retrieves the parent builder for this field |
boolean |
isKey()
Retrieve whether the field is a key and thus need be unique. |
void |
setDBDocType(java.lang.String doctype)
Set whether the field has an doctype to validate |
void |
setDBKey(boolean value)
Set whether the field is a key and thus need be unique. |
void |
setDBName(java.lang.String value)
Set the database name of the field. |
void |
setDBNotNull(boolean value)
Set whether the field can be left blank. |
void |
setDBPos(int value)
Set the position of the field in the database table. |
void |
setDBSize(int value)
Set size of the field. |
void |
setDBState(int value)
Set the state of the field (persistent, system, or virtual). |
void |
setDBState(java.lang.String value)
Set the basic MMBase state of the field, using the state description |
void |
setDBType(int value)
Set the basic MMBase type of the field. |
void |
setDBType(java.lang.String value)
Set the basic MMBase type of the field, using the type description |
void |
setDescription(java.lang.String lang,
java.lang.String value)
Set the description of the field for a specified langauge. |
void |
setGUIList(int value)
Set the position of the field when listing. |
void |
setGUIName(java.lang.String lang,
java.lang.String value)
Set the GUI name of the field for a specified langauge. |
void |
setGUIPos(int value)
Set the position of the field when editing. |
void |
setGUISearch(int value)
Set the position of the field when searching. |
void |
setGUIType(java.lang.String value)
Set the GUI type of the field. |
void |
setParent(MMObjectBuilder parent)
Set the parent builder for this field |
static void |
sort(java.util.List fielddefs)
Sorts a list with FieldDefs objects, using the default order (ORDER_CREATE) |
static void |
sort(java.util.List fielddefs,
int order)
Sorts a list with FieldDefs objects, using the specified order |
java.lang.String |
toString()
Returns a description for this field. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DBSTATE_MINVALUE
public static final int DBSTATE_VIRTUAL
public static final int DBSTATE_PERSISTENT
public static final int DBSTATE_SYSTEM
public static final int DBSTATE_MAXVALUE
public static final int DBSTATE_UNKNOWN
public static final int TYPE_MINVALUE
public static final int TYPE_STRING
public static final int TYPE_INTEGER
public static final int TYPE_BYTE
public static final int TYPE_FLOAT
public static final int TYPE_DOUBLE
public static final int TYPE_LONG
public static final int TYPE_XML
public static final int TYPE_NODE
public static final int TYPE_MAXVALUE
public static final int TYPE_UNKNOWN
public static final int ORDER_CREATE
public static final int ORDER_EDIT
public static final int ORDER_LIST
public static final int ORDER_SEARCH
| Constructor Detail |
public FieldDefs()
public FieldDefs(java.lang.String GUIName,
java.lang.String GUIType,
int GUISearch,
int GUIList,
java.lang.String DBName,
int DBType)
GUIName - the default GUIName for a fieldGUIType - the GUI type (i.e. "integer' or 'field')GUISearch - position in the editor for this field when searchingGUIList - position in the editor for this field when listingDBName - the actual name of the field in the databaseDBType - the basic MMBase type of the field
public FieldDefs(java.lang.String GUIName,
java.lang.String GUIType,
int GUISearch,
int GUIList,
java.lang.String DBName,
int DBType,
int GUIPos,
int DBState)
GUIName - the default GUIName for a fieldGUIType - the GUI type (i.e. "integer' or 'field')GUISearch - position in the editor for this field when searchingGUIList - position in the editor for this field when listingDBName - the actual name of the field in the databaseDBType - the basic MMBase type of the fieldGUIPos - position in the editor for this field when editingDBState - the state of the field (persistent, virtual, etc.)| Method Detail |
public static java.lang.String getDBTypeDescription(int type)
type - the type to get the description ofpublic static java.lang.String getDBStateDescription(int state)
state - the state to get the description ofpublic static int getDBTypeId(java.lang.String type)
type - the type description to get the id ofpublic static int getDBStateId(java.lang.String state)
type - the state description to get the id ofpublic java.lang.String getDBTypeDescription()
public java.lang.String getDBStateDescription()
public java.lang.String getGUIName(java.lang.String lang)
lang - the language to return the name inpublic java.lang.String getGUIName()
public java.lang.String getDescription(java.lang.String lang)
lang - the language to return the name inpublic java.lang.String getDescription()
public java.util.Map getGUINames()
public java.util.Map getDescriptions()
public java.lang.String getGUIType()
public java.lang.String getDBName()
public int getDBType()
public int getDBSize()
public boolean getDBNotNull()
public java.lang.String getDBDocType()
public int getDBState()
public boolean isKey()
public int getGUISearch()
public int getGUIList()
public int getGUIPos()
public int getDBPos()
public void setGUIName(java.lang.String lang,
java.lang.String value)
lang - the language to set the name forvalue - the value to set
public void setDescription(java.lang.String lang,
java.lang.String value)
lang - the language to set the description forvalue - the value to setpublic void setGUIType(java.lang.String value)
value - the value to setpublic void setDBName(java.lang.String value)
value - the value to setpublic void setGUIList(int value)
value - the value to setpublic void setGUIPos(int value)
value - the value to setpublic void setGUISearch(int value)
value - the value to setpublic void setDBSize(int value)
value - the value to setpublic void setDBType(int value)
value - the id of the typepublic void setDBType(java.lang.String value)
value - the name of the typepublic void setDBPos(int value)
value - the value to setpublic void setDBState(int value)
value - the value to setpublic void setDBState(java.lang.String value)
value - the name of the statepublic void setDBKey(boolean value)
value - the value to setpublic void setDBNotNull(boolean value)
value - the value to setpublic void setDBDocType(java.lang.String doctype)
doctype - the doctype, which has to be used for the fieldpublic MMObjectBuilder getParent()
public void setParent(MMObjectBuilder parent)
parent - the fielddefs parentpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablethe - object to compare topublic static void sort(java.util.List fielddefs)
fielddefs - the list to sort
public static void sort(java.util.List fielddefs,
int order)
fielddefs - the list to sortorder - one of ORDER_CREATE, ORDER_EDIT, ORDER_LIST,ORDER_SEARCH
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||