|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldDefinition
Information about a field from a makumba data definition as obtained from an MDD file. This class is provided for makumba programs to be able to introspect makumba data structures. Such introspection is not needed usually, as the application programmer knows the makumba data structure.
Field Summary | |
---|---|
static int |
_binary
|
static int |
_boolean
|
static int |
_char
|
static int |
_charEnum
|
static int |
_date
|
static int |
_dateCreate
|
static int |
_dateModify
|
static int |
_file
|
static int |
_int
|
static int |
_intEnum
|
static int |
_nil
|
static int |
_ptr
|
static int |
_ptrIndex
|
static int |
_ptrOne
|
static int |
_ptrRel
|
static int |
_real
|
static int |
_set
|
static int |
_setCharEnum
|
static int |
_setComplex
|
static int |
_setIntEnum
|
static int |
_text
|
static String |
ERROR_NOT_EMPTY
|
static String |
ERROR_NOT_NULL
|
static String |
ERROR_NOT_UNIQUE
|
Method Summary | |
---|---|
void |
addValidationRule(Collection<ValidationRule> rules)
adds several new validation rules to this field. |
void |
addValidationRule(ValidationRule rule)
Adds a new validation rule to this field. |
void |
checkInsert(Dictionary<String,Object> d)
check if the corresponding field from the dictionary can be inserted |
void |
checkUpdate(Dictionary<String,Object> d)
check if the corresponding field from the dictionary can be updated |
Object |
checkValue(Object value)
check if the value can be assigned |
DataDefinition |
getDataDefinition()
The data definition that contains this field definition |
String |
getDataType()
The data type of this field. |
Date |
getDefaultDate()
Get the default value as a Date. |
int |
getDefaultInt()
Get the default value as an integer. |
String |
getDefaultString()
Get the default value as a String. |
Object |
getDefaultValue()
returns the default value of this field |
Vector<String> |
getDeprecatedValues()
returns the deprecated values for intEnum |
String |
getDescription()
Returns field's description |
Object |
getEmptyValue()
The value returned in case there is no value in the database and no default value is indicated |
int |
getEnumeratorSize()
Get the number of the members of an enumerated field. |
DataDefinition |
getForeignTable()
The type with which the ptr or set relation is defined. |
int |
getIntAt(int i)
Get the integer at a certain position in an enumerated type. |
int |
getIntegerType()
returns the integer value associated with the field's internal makumba type. |
Class<?> |
getJavaType()
The Java type of this field. |
String |
getName()
The name of this field, normally the same with the name of the field |
String |
getNameAt(int i)
Get the name at a certain position in an enumerated field. |
String |
getNameFor(int i)
Get the name for a certain value of the enumerated field. |
Collection<String> |
getNames()
Get the names of an enumerated field. |
String |
getNotANumberErrorMessage()
gets the error message for the not a number field constraint, if specified |
String |
getNotBooleanErrorMessage()
gets the error message for the not a boolean field constraint, if specified |
String |
getNotEmptyErrorMessage()
gets the error message for the not empty field constraint, if specified |
String |
getNotIntErrorMessage()
gets the error message for the not an int field constraint, if specified |
String |
getNotNullErrorMessage()
gets the error message for not null field, if specified |
String |
getNotRealErrorMessage()
gets the error message for the not a real field constraint, if specified |
String |
getNotUniqueErrorMessage()
gets the error message for the not unique field constraint, if specified |
Object |
getNull()
The null value for this type |
FieldDefinition |
getOriginalFieldDefinition()
The original field definition this field definition was made of, used e.g. in form responders. |
DataDefinition |
getPointedType()
The type referred. |
DataDefinition |
getSubtable()
The subtype created by an immediate ptr or set definition. |
String |
getTitleField()
Get the alternative title field, if the title to be used is indicated specifically on a ptr or set. |
String |
getType()
Returns field's internal makumba type. |
Collection<ValidationRule> |
getValidationRules()
Returns all the validation rules connected to this field. |
Collection |
getValues()
Get the values of an enumerated field. |
int |
getWidth()
Get the maximum character width. |
boolean |
hasDescription()
Tells wether this field has a description in the MDD |
boolean |
isAssignableFrom(FieldDefinition fd)
check compatibility with the given type |
boolean |
isBinaryType()
returns whether this field is a binary type. |
boolean |
isBooleanType()
returns whether this field is a boolean type |
boolean |
isComplexSet()
returns whether this field is a setComplex. |
boolean |
isDateType()
returns whether this field is a date type, i.e. date, or the default fields dateCreate and dateModify. |
boolean |
isDefaultField()
returns whether this field is a default field generated by makumba. |
boolean |
isEnumType()
returns whether this field is a simple enum type, i.e. intEnum or charEnum. |
boolean |
isExternalSet()
returns whether this field is an external set, i.e. set ptr, but not setIntEnum, not setCharEnum nor setComplex. |
boolean |
isFileType()
returns whether this field is a file type. |
boolean |
isFixed()
tells whether this field is fixed |
boolean |
isIndexPointerField()
Indicates whether this field is the index pointer field of the DataDefinition it belongs to. |
boolean |
isIntegerType()
returns whether this field is an integer type. |
boolean |
isInternalSet()
returns whether this field is any kind of internal set type, i.e. set, setIntEnum, setCharEnum and setComplex, but not set. |
boolean |
isNotEmpty()
tells whether this field is not empty |
boolean |
isNotNull()
tells whether this field is not null |
boolean |
isNumberType()
returns whether this field is a number type, i.e. int or real. |
boolean |
isPointer()
returns whether this field is a pointer. |
boolean |
isRealType()
returns whether this field is a real type. |
boolean |
isSetEnumType()
returns whether this field is a set enum type, i.e. setIntEnum or setCharEnum. |
boolean |
isSetType()
returns whether this field is a set type, i.e. set, setIntEnum or setCharEnum or setComplex. |
boolean |
isStringType()
returns whether this field is a string type, i.e. char or text. |
boolean |
isUnique()
tells whether this field is unique |
boolean |
shouldEditBySingleInput()
Indicates whether this field should be edited by a simple mak:input, or needs it's own form. |
Field Detail |
---|
static final int _ptr
static final int _ptrRel
static final int _ptrOne
static final int _ptrIndex
static final int _int
static final int _intEnum
static final int _char
static final int _charEnum
static final int _text
static final int _date
static final int _dateCreate
static final int _dateModify
static final int _set
static final int _setComplex
static final int _nil
static final int _real
static final int _setCharEnum
static final int _setIntEnum
static final int _binary
static final int _boolean
static final int _file
static final String ERROR_NOT_NULL
static final String ERROR_NOT_EMPTY
static final String ERROR_NOT_UNIQUE
Method Detail |
---|
String getName()
DataDefinition getDataDefinition()
FieldDefinition getOriginalFieldDefinition()
boolean isIndexPointerField()
DataDefinition
it belongs to.
Object getEmptyValue()
Object getNull()
boolean hasDescription()
String getDescription()
String getType()
int getIntegerType()
String getDataType()
Class<?> getJavaType()
boolean isFixed()
boolean isNotNull()
boolean isNotEmpty()
boolean isUnique()
Object getDefaultValue()
String getDefaultString()
ClassCastException
- for other typesint getDefaultInt()
ClassCastException
- for other typesDate getDefaultDate()
ClassCastException
- for other typesCollection getValues()
ClassCastException
- for other typesCollection<String> getNames()
ClassCastException
- for other typesint getEnumeratorSize()
ClassCastException
- for other typesString getNameAt(int i)
ClassCastException
- for other typesString getNameFor(int i)
ClassCastException
- for other typesint getIntAt(int i)
ClassCastException
- for other typesint getWidth()
ClassCastException
- for other typesDataDefinition getForeignTable()
ClassCastException
- for other typesDataDefinition getSubtable()
ClassCastException
- for other typesDataDefinition getPointedType()
ClassCastException
- for other typesString getTitleField()
ClassCastException
- for other typesDataDefinition.getTitleFieldName()
boolean isAssignableFrom(FieldDefinition fd)
Object checkValue(Object value)
void checkInsert(Dictionary<String,Object> d)
void checkUpdate(Dictionary<String,Object> d)
Vector<String> getDeprecatedValues()
boolean isDefaultField()
boolean shouldEditBySingleInput()
boolean isDateType()
boolean isNumberType()
boolean isIntegerType()
boolean isRealType()
boolean isBinaryType()
boolean isBooleanType()
boolean isFileType()
boolean isSetType()
boolean isSetEnumType()
boolean isEnumType()
boolean isInternalSet()
boolean isExternalSet()
boolean isComplexSet()
boolean isPointer()
boolean isStringType()
Collection<ValidationRule> getValidationRules()
void addValidationRule(ValidationRule rule)
void addValidationRule(Collection<ValidationRule> rules)
String getNotNullErrorMessage()
String getNotANumberErrorMessage()
String getNotUniqueErrorMessage()
String getNotEmptyErrorMessage()
String getNotIntErrorMessage()
String getNotRealErrorMessage()
String getNotBooleanErrorMessage()
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |