public class EnumProperty extends Property implements SQLPropertyInfo, ESPropertyInfo
| Modifier and Type | Class and Description |
|---|---|
static class |
EnumProperty.Factory
Factory for generating properties based on their field type
|
accessPath, alternativePropertyKey, defaultValue, descriptor, field, label, length, name, nameAsMapping, nullable, propertyKey, propertyName| Modifier and Type | Method and Description |
|---|---|
void |
contributeToTable(Table table)
Appends columns, keys and foreign keys to the given table to match the settings specified by
this property
|
void |
describeProperty(com.alibaba.fastjson.JSONObject description)
Creates the mapping description for this property into the given JSON.
|
protected void |
determineLengths()
Determines the column length by checking for a
Length annotation on the field. |
protected Object |
transformFromDatasource(Class<? extends BaseMapper<?,?,?>> mapperType,
sirius.kernel.commons.Value data)
Converts the database value to the appropriate field value.
|
protected Object |
transformToDatasource(Class<? extends BaseMapper<?,?,?>> mapperType,
Object object)
Converts the Java object which resides in the associated field to the database value which is to be
written into the database.
|
Object |
transformValue(sirius.kernel.commons.Value value)
Converts the given value, which most probably contains user input as string into the target type of this
property.
|
checkNullability, checkUniqueness, determineDefaultValue, determineNullability, equals, getAnnotation, getDefaultValue, getDefinition, getDescriptor, getField, getLabel, getLength, getName, getPropertyName, getValue, getValueAsCopy, getValueForDatasource, getValueFromField, hashCode, illegalFieldValue, isNullable, link, onAfterDelete, onAfterSave, onBeforeDelete, onBeforeSave, onBeforeSaveChecks, parseValue, setValue, setValueFromDatasource, setValueToField, toString, transformFromElastic, transformFromJDBC, transformFromMongo, transformToElastic, transformToJDBC, transformToMongois, makeNewInstance, tryAsclone, finalize, getClass, notify, notifyAll, wait, wait, waittransferOptionpublic Object transformValue(sirius.kernel.commons.Value value)
PropertytransformValue in class Propertyvalue - the value to convertprotected void determineLengths()
PropertyLength annotation on the field.determineLengths in class Propertyprotected Object transformFromDatasource(Class<? extends BaseMapper<?,?,?>> mapperType, sirius.kernel.commons.Value data)
PropertytransformFromDatasource in class PropertymapperType - the mapper which is currently active. This can be used to determine which kind of database is
active and therefore which data format will be available.data - the database valueprotected Object transformToDatasource(Class<? extends BaseMapper<?,?,?>> mapperType, Object object)
PropertytransformToDatasource in class PropertymapperType - the mapper which is currently active. This can be used to determine which kind of database is
active and therefore which data format will be required.object - the current field valuepublic void contributeToTable(Table table)
SQLPropertyInfocontributeToTable in interface SQLPropertyInfotable - the table to add schema infos topublic void describeProperty(com.alibaba.fastjson.JSONObject description)
ESPropertyInfodescribeProperty in interface ESPropertyInfodescription - the target JSON to fillCopyright © 2018. All rights reserved.