org.makumba.providers.datadefinition.makumba
Class FieldInfo

java.lang.Object
  extended by org.makumba.providers.datadefinition.makumba.FieldInfo
All Implemented Interfaces:
Serializable, FieldDefinition

public class FieldInfo
extends Object
implements Serializable, FieldDefinition

This is a structure containing the elementary data about a field: name, type, attributes, description, and other type-specific extra info. All this information is available through the associated FieldHandler

See Also:
Serialized Form

Field Summary
(package private)  DataDefinition dd
           
(package private)  Object defaultValue
           
(package private)  String description
           
static Date emptyDate
           
(package private) static Object emptyInt
           
(package private) static Object emptyReal
           
(package private)  Object extra1
           
(package private)  Object extra2
           
(package private)  Object extra3
           
(package private)  boolean fixed
           
(package private) static org.apache.commons.collections.bidimap.DualHashBidiMap integerTypeMap
           
(package private)  String name
           
(package private)  boolean notEmpty
           
(package private)  boolean notNull
           
(package private)  String type
           
(package private)  boolean unique
           
 
Fields inherited from interface org.makumba.FieldDefinition
_binary, _boolean, _char, _charEnum, _date, _dateCreate, _dateModify, _file, _int, _intEnum, _nil, _ptr, _ptrIndex, _ptrOne, _ptrRel, _real, _set, _setCharEnum, _setComplex, _setIntEnum, _text, ERROR_NOT_EMPTY, ERROR_NOT_NULL, ERROR_NOT_UNIQUE
 
Constructor Summary
FieldInfo(DataDefinition ri, String name)
           
FieldInfo(FieldInfo fi)
           
FieldInfo(String name, FieldInfo fi)
          for temporary field info
FieldInfo(String name, String t)
           
 
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.
 Object base_checkValue(Object value)
          check if the value can be assigned
 boolean base_isAssignableFrom(FieldDefinition fi)
           
 Object check_binary_ValueImpl(Object value)
           
 Object check_boolean_ValueImpl(Object value)
           
 Object check_char_ValueImpl(Object value)
           
 Object check_charEnum_ValueImpl(Object value)
           
 Object check_date_ValueImpl(Object value)
           
 Object check_int_ValueImpl(Object value)
           
 Object check_intEnum_ValueImpl(Object value)
           
 Object check_ptrIndex_ValueImpl(Object value)
           
 Object check_real_ValueImpl(Object value)
           
 Object check_set_ValueImpl(Object value)
           
 Object check_setcharEnum_ValueImpl(Object value)
           
 Object check_setComplex_ValueImpl(Object value)
           
 Object check_setintEnum_Value(Object value)
           
 Object check_text_ValueImpl(Object value)
           
 void checkInsert(Dictionary<String,Object> d)
          check if the value can be assigned
 void checkUpdate(Dictionary<String,Object> d)
          check if the value can be assigned
 Object checkValue(Object value)
          check if the value can be assigned
 Object checkValueImpl(Object value)
           
 Vector<String> get_intEnum_DeprecatedValues()
           
 String get_intEnum_NameFor(int n)
           
 String get_ptr_TitleField()
           
 DataDefinition get_ptrIndex_PointedType()
           
 DataDefinition get_ptrOne_PointedType()
           
 DataDefinition get_ptrOne_Subtable()
           
 DataDefinition get_ptrRel_ForeignTable()
           
 DataDefinition get_ptrRel_PointedType()
           
 DataDefinition get_set_ForeignTable()
           
 DataDefinition get_set_Subtable()
           
 DataDefinition getDataDefinition()
          The data definition that contains this field definition
 String getDataName()
          the data field this handler is associated to
 String getDataType()
          The data type of this field.
 Date getDefaultDate()
          works only for date type
 int getDefaultInt()
          works only for int, intEnum, setintEnum types
 String getDefaultString()
          works only for char, text, binary, charEnum, setcharEnum types
 Object getDefaultValue()
          returns the default value of this field
 Vector<String> getDeprecatedValues()
          Get deprecated values of the enumerator, works only for intEnum type.
 String getDescription()
          returns field's description, if present.
 Object getEmptyValue()
          the value returned in case there is no value in the database and no default value is indicated
(package private)  FieldInfo getEnum()
           
 int getEnumeratorSize()
          works only for intEnum, charEnum, setintEnum, setcharEnum types
static FieldInfo getFieldInfo(String name, Object type, boolean typeSearch)
           
static FieldInfo getFieldInfo(String name, Object type, boolean typeSearch, String description)
           
 DataDefinition getForeignTable()
          works only for ptr, ptrRel and set types
 int getIntAt(int i)
          works only for intEnum, setintEnum types
 int getIntegerType()
          returns field type's integer value
 Class<?> getJavaType()
          The Java type of this field.
 String getName()
          the name of this handler, normally the same with the name of the field
 String getNameAt(int i)
          works only for intEnum, charEnum, setintEnum, setcharEnum types
 String getNameFor(int i)
          works only for intEnum type
 Collection<String> getNames()
          works only for intEnum, charEnum, setintEnum, setcharEnum types FIXME this does not work, because of a ClassCastException when attempting to convert the extra2 informatino into a Vector of Strings
 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()
          works only for all pointer and set types
static String getStringType(int integerType)
           
 String getStructure()
           
 DataDefinition getSubtable()
          works only for ptrOne, set, setComplex, setcharEnum and setintEnum types
 String getTitleField()
          works only for ptr and set types
 String getType()
          returns field's type
 Collection<ValidationRule> getValidationRules()
          Returns all the validation rules connected to this field.
 Collection getValues()
          works only for intEnum, charEnum, setintEnum, setcharEnum types
 int getWidth()
          works only for char, charEnum, setcharEnum types
 boolean has_ptr_TitleFieldIndicated()
           
 boolean hasDescription()
          tells whether this field has a description originally
 boolean hasTitleFieldIndicated()
          works only for ptr and set types
 boolean is_int_AssignableFrom(FieldDefinition fi)
           
 boolean is_intEnum_AssignableFrom(FieldDefinition fi)
           
 boolean is_ptrRel_AssignableFrom(FieldDefinition fi)
           
 boolean is_real_AssignableFrom(FieldDefinition fi)
           
 boolean is_set_AssignableFrom(FieldDefinition fi)
           
 boolean isAssignableFrom(FieldDefinition fi)
          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
protected  Object normalCheck(Object value)
           
(package private)  FieldDefinition pointerToForeign()
           
 boolean shouldEditBySingleInput()
          Indicates whether this field should be edited by a simple mak:input, or needs it's own form.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dd

DataDefinition dd

integerTypeMap

static final org.apache.commons.collections.bidimap.DualHashBidiMap integerTypeMap

name

String name

type

String type

fixed

boolean fixed

notNull

boolean notNull

notEmpty

boolean notEmpty

unique

boolean unique

defaultValue

Object defaultValue

description

String description

extra1

Object extra1

extra2

Object extra2

extra3

Object extra3

emptyDate

public static final Date emptyDate

emptyInt

static final Object emptyInt

emptyReal

static final Object emptyReal
Constructor Detail

FieldInfo

public FieldInfo(DataDefinition ri,
                 String name)

FieldInfo

public FieldInfo(FieldInfo fi)

FieldInfo

public FieldInfo(String name,
                 FieldInfo fi)
for temporary field info


FieldInfo

public FieldInfo(String name,
                 String t)
Method Detail

getDataDefinition

public DataDefinition getDataDefinition()
Description copied from interface: FieldDefinition
The data definition that contains this field definition

Specified by:
getDataDefinition in interface FieldDefinition

getOriginalFieldDefinition

public FieldDefinition getOriginalFieldDefinition()
Description copied from interface: FieldDefinition
The original field definition this field definition was made of, used e.g. in form responders.

Specified by:
getOriginalFieldDefinition in interface FieldDefinition

getFieldInfo

public static FieldInfo getFieldInfo(String name,
                                     Object type,
                                     boolean typeSearch)

getFieldInfo

public static FieldInfo getFieldInfo(String name,
                                     Object type,
                                     boolean typeSearch,
                                     String description)

getStringType

public static String getStringType(int integerType)

isAssignableFrom

public boolean isAssignableFrom(FieldDefinition fi)
Description copied from interface: FieldDefinition
check compatibility with the given type

Specified by:
isAssignableFrom in interface FieldDefinition

base_isAssignableFrom

public boolean base_isAssignableFrom(FieldDefinition fi)

is_int_AssignableFrom

public boolean is_int_AssignableFrom(FieldDefinition fi)

is_intEnum_AssignableFrom

public boolean is_intEnum_AssignableFrom(FieldDefinition fi)

is_ptrRel_AssignableFrom

public boolean is_ptrRel_AssignableFrom(FieldDefinition fi)

is_real_AssignableFrom

public boolean is_real_AssignableFrom(FieldDefinition fi)

is_set_AssignableFrom

public boolean is_set_AssignableFrom(FieldDefinition fi)

toString

public String toString()
Overrides:
toString in class Object

checkValue

public Object checkValue(Object value)
check if the value can be assigned

Specified by:
checkValue in interface FieldDefinition

base_checkValue

public Object base_checkValue(Object value)
check if the value can be assigned


check_setintEnum_Value

public Object check_setintEnum_Value(Object value)

checkInsert

public void checkInsert(Dictionary<String,Object> d)
check if the value can be assigned

Specified by:
checkInsert in interface FieldDefinition

checkUpdate

public void checkUpdate(Dictionary<String,Object> d)
check if the value can be assigned

Specified by:
checkUpdate in interface FieldDefinition

getDeprecatedValues

public Vector<String> getDeprecatedValues()
Get deprecated values of the enumerator, works only for intEnum type.

Specified by:
getDeprecatedValues in interface FieldDefinition
Returns:
Vector, or null if called on other types

get_intEnum_DeprecatedValues

public Vector<String> get_intEnum_DeprecatedValues()

getEmptyValue

public Object getEmptyValue()
the value returned in case there is no value in the database and no default value is indicated

Specified by:
getEmptyValue in interface FieldDefinition

getNull

public Object getNull()
Description copied from interface: FieldDefinition
The null value for this type

Specified by:
getNull in interface FieldDefinition

getName

public String getName()
the name of this handler, normally the same with the name of the field

Specified by:
getName in interface FieldDefinition

getDataName

public final String getDataName()
the data field this handler is associated to


hasDescription

public boolean hasDescription()
tells whether this field has a description originally

Specified by:
hasDescription in interface FieldDefinition

getDescription

public String getDescription()
returns field's description, if present. If not present (null or "") it returns field name.

Specified by:
getDescription in interface FieldDefinition

getType

public String getType()
returns field's type

Specified by:
getType in interface FieldDefinition

isIndexPointerField

public boolean isIndexPointerField()
Description copied from interface: FieldDefinition
Indicates whether this field is the index pointer field of the DataDefinition it belongs to.

Specified by:
isIndexPointerField in interface FieldDefinition

getIntegerType

public int getIntegerType()
returns field type's integer value

Specified by:
getIntegerType in interface FieldDefinition

getDataType

public String getDataType()
Description copied from interface: FieldDefinition
The data type of this field. For example, intEnum and int both have int as data type

Specified by:
getDataType in interface FieldDefinition

getJavaType

public Class<?> getJavaType()
Description copied from interface: FieldDefinition
The Java type of this field. For example, intEnum and int both have java.lang.Integer as data type

Specified by:
getJavaType in interface FieldDefinition

isFixed

public boolean isFixed()
tells whether this field is fixed

Specified by:
isFixed in interface FieldDefinition

isNotNull

public boolean isNotNull()
tells whether this field is not null

Specified by:
isNotNull in interface FieldDefinition

isNotEmpty

public boolean isNotEmpty()
Description copied from interface: FieldDefinition
tells whether this field is not empty

Specified by:
isNotEmpty in interface FieldDefinition

isUnique

public boolean isUnique()
tells whether this field is unique

Specified by:
isUnique in interface FieldDefinition

getDefaultValue

public Object getDefaultValue()
returns the default value of this field

Specified by:
getDefaultValue in interface FieldDefinition

getValues

public Collection getValues()
works only for intEnum, charEnum, setintEnum, setcharEnum types

Specified by:
getValues in interface FieldDefinition

getNames

public Collection<String> getNames()
works only for intEnum, charEnum, setintEnum, setcharEnum types FIXME this does not work, because of a ClassCastException when attempting to convert the extra2 informatino into a Vector of Strings

Specified by:
getNames in interface FieldDefinition

getEnumeratorSize

public int getEnumeratorSize()
works only for intEnum, charEnum, setintEnum, setcharEnum types

Specified by:
getEnumeratorSize in interface FieldDefinition

getNameFor

public String getNameFor(int i)
works only for intEnum type

Specified by:
getNameFor in interface FieldDefinition

get_intEnum_NameFor

public String get_intEnum_NameFor(int n)

getNameAt

public String getNameAt(int i)
works only for intEnum, charEnum, setintEnum, setcharEnum types

Specified by:
getNameAt in interface FieldDefinition

getDefaultInt

public int getDefaultInt()
works only for int, intEnum, setintEnum types

Specified by:
getDefaultInt in interface FieldDefinition

getIntAt

public int getIntAt(int i)
works only for intEnum, setintEnum types

Specified by:
getIntAt in interface FieldDefinition

getDefaultString

public String getDefaultString()
works only for char, text, binary, charEnum, setcharEnum types

Specified by:
getDefaultString in interface FieldDefinition

getWidth

public int getWidth()
works only for char, charEnum, setcharEnum types

Specified by:
getWidth in interface FieldDefinition

checkValueImpl

public Object checkValueImpl(Object value)

check_char_ValueImpl

public Object check_char_ValueImpl(Object value)

check_charEnum_ValueImpl

public Object check_charEnum_ValueImpl(Object value)

check_date_ValueImpl

public Object check_date_ValueImpl(Object value)

check_int_ValueImpl

public Object check_int_ValueImpl(Object value)

check_intEnum_ValueImpl

public Object check_intEnum_ValueImpl(Object value)

check_ptrIndex_ValueImpl

public Object check_ptrIndex_ValueImpl(Object value)

check_real_ValueImpl

public Object check_real_ValueImpl(Object value)

check_set_ValueImpl

public Object check_set_ValueImpl(Object value)

check_setcharEnum_ValueImpl

public Object check_setcharEnum_ValueImpl(Object value)

check_setComplex_ValueImpl

public Object check_setComplex_ValueImpl(Object value)

check_text_ValueImpl

public Object check_text_ValueImpl(Object value)

check_binary_ValueImpl

public Object check_binary_ValueImpl(Object value)

check_boolean_ValueImpl

public Object check_boolean_ValueImpl(Object value)

getEnum

FieldInfo getEnum()

get_ptrOne_Subtable

public DataDefinition get_ptrOne_Subtable()

getDefaultDate

public Date getDefaultDate()
works only for date type

Specified by:
getDefaultDate in interface FieldDefinition

getForeignTable

public DataDefinition getForeignTable()
works only for ptr, ptrRel and set types

Specified by:
getForeignTable in interface FieldDefinition
Returns:
the foreign type indicated in set or ptr definition

get_ptrRel_ForeignTable

public DataDefinition get_ptrRel_ForeignTable()

get_set_ForeignTable

public DataDefinition get_set_ForeignTable()

pointerToForeign

FieldDefinition pointerToForeign()

getSubtable

public DataDefinition getSubtable()
works only for ptrOne, set, setComplex, setcharEnum and setintEnum types

Specified by:
getSubtable in interface FieldDefinition
Returns:
the subtable indicated in set or ptr definition

get_set_Subtable

public DataDefinition get_set_Subtable()

getPointedType

public DataDefinition getPointedType()
works only for all pointer and set types

Specified by:
getPointedType in interface FieldDefinition
Returns:
the subtype indicated in set or ptr definition

get_ptrIndex_PointedType

public DataDefinition get_ptrIndex_PointedType()

get_ptrOne_PointedType

public DataDefinition get_ptrOne_PointedType()

get_ptrRel_PointedType

public DataDefinition get_ptrRel_PointedType()

getTitleField

public String getTitleField()
works only for ptr and set types

Specified by:
getTitleField in interface FieldDefinition
Returns:
title field of the record in the foreign table, as indicated in this field definition or in the respective foreign table record definition
See Also:
hasTitleFieldIndicated()

get_ptr_TitleField

public String get_ptr_TitleField()

hasTitleFieldIndicated

public boolean hasTitleFieldIndicated()
works only for ptr and set types

Returns:
wether the definition indicates a title field
Throws:
ClassCastException - for other types

has_ptr_TitleFieldIndicated

public boolean has_ptr_TitleFieldIndicated()

normalCheck

protected Object normalCheck(Object value)

isDefaultField

public boolean isDefaultField()
Description copied from interface: FieldDefinition
returns whether this field is a default field generated by makumba.

Specified by:
isDefaultField in interface FieldDefinition

shouldEditBySingleInput

public boolean shouldEditBySingleInput()
Description copied from interface: FieldDefinition
Indicates whether this field should be edited by a simple mak:input, or needs it's own form.

Specified by:
shouldEditBySingleInput in interface FieldDefinition

isDateType

public boolean isDateType()
Description copied from interface: FieldDefinition
returns whether this field is a date type, i.e. date, or the default fields dateCreate and dateModify.

Specified by:
isDateType in interface FieldDefinition

isIntegerType

public boolean isIntegerType()
Description copied from interface: FieldDefinition
returns whether this field is an integer type.

Specified by:
isIntegerType in interface FieldDefinition

isRealType

public boolean isRealType()
Description copied from interface: FieldDefinition
returns whether this field is a real type.

Specified by:
isRealType in interface FieldDefinition

isNumberType

public boolean isNumberType()
Description copied from interface: FieldDefinition
returns whether this field is a number type, i.e. int or real.

Specified by:
isNumberType in interface FieldDefinition

isBinaryType

public boolean isBinaryType()
Description copied from interface: FieldDefinition
returns whether this field is a binary type.

Specified by:
isBinaryType in interface FieldDefinition

isBooleanType

public boolean isBooleanType()
Description copied from interface: FieldDefinition
returns whether this field is a boolean type

Specified by:
isBooleanType in interface FieldDefinition

isFileType

public boolean isFileType()
Description copied from interface: FieldDefinition
returns whether this field is a file type.

Specified by:
isFileType in interface FieldDefinition

isSetType

public boolean isSetType()
Description copied from interface: FieldDefinition
returns whether this field is a set type, i.e. set, setIntEnum or setCharEnum or setComplex.

Specified by:
isSetType in interface FieldDefinition

isEnumType

public boolean isEnumType()
Description copied from interface: FieldDefinition
returns whether this field is a simple enum type, i.e. intEnum or charEnum.

Specified by:
isEnumType in interface FieldDefinition

isSetEnumType

public boolean isSetEnumType()
Description copied from interface: FieldDefinition
returns whether this field is a set enum type, i.e. setIntEnum or setCharEnum.

Specified by:
isSetEnumType in interface FieldDefinition

isStringType

public boolean isStringType()
Description copied from interface: FieldDefinition
returns whether this field is a string type, i.e. char or text.

Specified by:
isStringType in interface FieldDefinition

isInternalSet

public boolean isInternalSet()
Description copied from interface: FieldDefinition
returns whether this field is any kind of internal set type, i.e. set, setIntEnum, setCharEnum and setComplex, but not set.

Specified by:
isInternalSet in interface FieldDefinition

isPointer

public boolean isPointer()
Description copied from interface: FieldDefinition
returns whether this field is a pointer.

Specified by:
isPointer in interface FieldDefinition

isExternalSet

public boolean isExternalSet()
Description copied from interface: FieldDefinition
returns whether this field is an external set, i.e. set ptr, but not setIntEnum, not setCharEnum nor setComplex.

Specified by:
isExternalSet in interface FieldDefinition

isComplexSet

public boolean isComplexSet()
Description copied from interface: FieldDefinition
returns whether this field is a setComplex.

Specified by:
isComplexSet in interface FieldDefinition

addValidationRule

public void addValidationRule(Collection<ValidationRule> rules)
Description copied from interface: FieldDefinition
adds several new validation rules to this field.

Specified by:
addValidationRule in interface FieldDefinition

addValidationRule

public void addValidationRule(ValidationRule rule)
Description copied from interface: FieldDefinition
Adds a new validation rule to this field.

Specified by:
addValidationRule in interface FieldDefinition

getValidationRules

public Collection<ValidationRule> getValidationRules()
Description copied from interface: FieldDefinition
Returns all the validation rules connected to this field.

Specified by:
getValidationRules in interface FieldDefinition

getStructure

public String getStructure()

getNotANumberErrorMessage

public String getNotANumberErrorMessage()
Description copied from interface: FieldDefinition
gets the error message for the not a number field constraint, if specified

Specified by:
getNotANumberErrorMessage in interface FieldDefinition

getNotNullErrorMessage

public String getNotNullErrorMessage()
Description copied from interface: FieldDefinition
gets the error message for not null field, if specified

Specified by:
getNotNullErrorMessage in interface FieldDefinition

getNotUniqueErrorMessage

public String getNotUniqueErrorMessage()
Description copied from interface: FieldDefinition
gets the error message for the not unique field constraint, if specified

Specified by:
getNotUniqueErrorMessage in interface FieldDefinition

getNotEmptyErrorMessage

public String getNotEmptyErrorMessage()
Description copied from interface: FieldDefinition
gets the error message for the not empty field constraint, if specified

Specified by:
getNotEmptyErrorMessage in interface FieldDefinition

getNotIntErrorMessage

public String getNotIntErrorMessage()
Description copied from interface: FieldDefinition
gets the error message for the not an int field constraint, if specified

Specified by:
getNotIntErrorMessage in interface FieldDefinition

getNotRealErrorMessage

public String getNotRealErrorMessage()
Description copied from interface: FieldDefinition
gets the error message for the not a real field constraint, if specified

Specified by:
getNotRealErrorMessage in interface FieldDefinition

getNotBooleanErrorMessage

public String getNotBooleanErrorMessage()
Description copied from interface: FieldDefinition
gets the error message for the not a boolean field constraint, if specified

Specified by:
getNotBooleanErrorMessage in interface FieldDefinition