|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.corebuilders.FieldDefs
One of the core objects. It is not itself a builder, but is used by builders. Defines one field of a object type / builder.
Field| 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 FieldDefs. |
|
FieldDefs(java.lang.String guiName,
java.lang.String guiType,
int search,
int list,
java.lang.String name,
int type)
Constructor for FieldDefs with partially initialized fields. |
|
FieldDefs(java.lang.String guiName,
java.lang.String guiType,
int guiSearch,
int guiList,
java.lang.String name,
int type,
int guiPos,
int state)
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) |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getDBDocType()
Retrieve the doctype MM: I think this is odd that this is on a field-type because, this can only be defined for XML fields. |
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()
Retrieves 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 |
java.lang.Object |
getStorageIdentifier()
Returns a storage identifier for this object. This should return:
StorageManagerFactory.getStorageIdentifier() when it is first instantiated. |
int |
getStorageType()
Retrieves the storage type. The meaning of this type is dependent on the storage implementation. |
boolean |
inStorage()
Returns whether an object is (or, for a new object, should be) defined in the storage. Virtual fields or builders should return false. |
boolean |
isKey()
Retrieve whether the field is a key and thus need be unique. |
void |
setDBDocType(java.lang.String dt)
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 |
void |
setStorageType(int value)
Sets the storage type. This method is called by the storage layer when first loading a builder. The meaning of this type is dependent on the storage implementation. |
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 |
boolean |
storageEquals(FieldDefs f)
Whether this FieldDefs object is equal to another for storage purposes (so, ignoring gui and documentation fields) |
java.lang.String |
toString()
Returns a description for this field. |
| Methods inherited from class java.lang.Object |
clone, 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 search,
int list,
java.lang.String name,
int type)
guiName - the default GUIName for a fieldguiType - the GUI type (i.e. "integer' or 'field')name - the actual name of the field in the databasetype - the basic MMBase type of the field
public FieldDefs(java.lang.String guiName,
java.lang.String guiType,
int guiSearch,
int guiList,
java.lang.String name,
int type,
int guiPos,
int state)
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 listingname - the actual name of the field in the databasetype - the basic MMBase type of the fieldguiPos - position in the editor for this field when editingstate - 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 of
public static java.lang.String getDBStateDescription(int state)
state - the state to get the description of
public static int getDBTypeId(java.lang.String type)
type - the type description to get the id of
public static int getDBStateId(java.lang.String state)
public 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 in
public java.lang.String getGUIName()
public java.lang.String getDescription(java.lang.String lang)
lang - the language to return the name in
public 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 dt)
public MMObjectBuilder getParent()
public void setParent(MMObjectBuilder parent)
parent - the fielddefs parentpublic java.lang.String toString()
public boolean equals(java.lang.Object o)
public boolean storageEquals(FieldDefs f)
public java.lang.Object getStorageIdentifier()
throws StorageException
StorageManagerFactory.getStorageIdentifier() when it is first instantiated.
getStorageIdentifier in interface StorableStorageExceptionpublic boolean inStorage()
false.
inStorage in interface Storabletrue if the object is kept in the storagepublic int getStorageType()
getStorageType in interface Storablepublic void setStorageType(int value)
setStorageType in interface Storablevalue - the value to setpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic 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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||