| java.lang.Object org.mmbase.core.util.Fields
Fields | public class Fields (Code) | | since: MMBase-1.8 |
Method Summary | |
public static int | classToType(Class classType) Determines the MMBase type of a specified class. | public static CoreField | createField(String name, int type, int listItemType, int state, DataType dataType) Returns an instance of a CoreField based on the type and state.
Parameters: name - The name of the field Parameters: type - the MMBase basic field type, one of the Field TYPE constants. Parameters: listItemType - the MMBase type for items of a list (if type is Field.TYPE_LIST). Parameters: state - the MMBase field state, one of the Field STATE constants. Parameters: dataType - the dataType to use for validating the field data. | public static CoreField | createSystemField(String name, int type) Returns an instance of a CoreField based on the type, with state 'SYSTEM', and a basic datatype assigned.
Parameters: name - The name of the field Parameters: type - the MMBase basic field type, one of the Field TYPE constants. | public static int | getState(String state) Provide an id for the specified mmbase state description. | public static String | getStateDescription(int state) Provide a description for the specified state. | public static int | getType(String type) | public static String | getTypeDescription(int type) Provide a description for the specified type. | public static void | sort(List<CoreField> fields, int order) | public static Class | typeToClass(int type) Determines the class for a specified MMBase base type. |
STATE_MAXVALUE | final public static int STATE_MAXVALUE(Code) | | |
STATE_MINVALUE | final public static int STATE_MINVALUE(Code) | | |
TYPE_MAXVALUE | final public static int TYPE_MAXVALUE(Code) | | |
TYPE_MINVALUE | final public static int TYPE_MINVALUE(Code) | | |
classToType | public static int classToType(Class classType)(Code) | | Determines the MMBase type of a specified class. The MMBase base type is sue by the storage layer to
determine how to store a field.
If the base type cannot be determined from the class, the value returned is
Field.TYPE_UNKNOWN .
Parameters: classType - an MMBase base type constant |
createField | public static CoreField createField(String name, int type, int listItemType, int state, DataType dataType)(Code) | | Returns an instance of a CoreField based on the type and state.
Parameters: name - The name of the field Parameters: type - the MMBase basic field type, one of the Field TYPE constants. Parameters: listItemType - the MMBase type for items of a list (if type is Field.TYPE_LIST). Parameters: state - the MMBase field state, one of the Field STATE constants. Parameters: dataType - the dataType to use for validating the field data. If null , a default datatype is assigned |
createSystemField | public static CoreField createSystemField(String name, int type)(Code) | | Returns an instance of a CoreField based on the type, with state 'SYSTEM', and a basic datatype assigned.
Parameters: name - The name of the field Parameters: type - the MMBase basic field type, one of the Field TYPE constants. Specifying Field.TYPE_LIST,may give unpredictable results. |
getState | public static int getState(String state)(Code) | | Provide an id for the specified mmbase state description.
Parameters: state - the state description to get the id of the id of the state. |
getStateDescription | public static String getStateDescription(int state)(Code) | | Provide a description for the specified state.
Useful for debugging, errors or presenting GUI info.
Parameters: state - the state to get the description of the description of the state. |
getType | public static int getType(String type)(Code) | | Provide an id for the specified mmbase type description
Parameters: type - the type description to get the id of the id of the type. |
getTypeDescription | public static String getTypeDescription(int type)(Code) | | Provide a description for the specified type.
Useful for debugging, errors or presenting GUI info.
Parameters: type - the type to get the description of the description of the type. |
typeToClass | public static Class typeToClass(int type)(Code) | | Determines the class for a specified MMBase base type.
If the value is
Field.TYPE_UNKNOWN ), the method returns null .
Parameters: type - an MMBase base type constant |
|
|