public class BaseEntityRefListProperty extends Property implements ESPropertyInfo
BaseEntityRefList
field within a Mixable
.Modifier and Type | Class and Description |
---|---|
static class |
BaseEntityRefListProperty.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 |
describeProperty(com.alibaba.fastjson.JSONObject description)
Creates the mapping description for this property into the given JSON.
|
protected BaseEntityRefList<?,?> |
getEntityRefList(Object entity) |
protected EntityDescriptor |
getReferencedDescriptor()
Returns the
EntityDescriptor of the referenced entity. |
protected BaseEntityRefList<?,?> |
getReferenceEntityRefList() |
Object |
getValueAsCopy(Object entity)
For modifyable datatypes like collections, this returns the value as copy so that further modifications
will not change the returned value.
|
protected Object |
getValueFromField(Object target)
Obtains the value from the field in the given target object
|
void |
link()
Links this property.
|
protected void |
onDeleteCascade(Object e) |
protected void |
onDeleteReject(Object e) |
protected void |
onDeleteSetNull(Object e) |
protected void |
setValueToField(Object value,
Object target)
Applies the given value to the field in the given target object
|
protected Object |
transformFromElastic(sirius.kernel.commons.Value object)
Loads a value from an Elasticsearch database.
|
protected Object |
transformFromMongo(sirius.kernel.commons.Value object)
Loads a value from a MongoDB datasource.
|
protected Object |
transformToElastic(Object object)
Generates a value for an Elasticsearch database.
|
protected Object |
transformToMongo(Object object)
Generates a value for a MongoDB datasource.
|
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, determineLengths, determineNullability, equals, getAnnotation, getDefaultValue, getDefinition, getDescriptor, getField, getLabel, getLength, getName, getPropertyName, getValue, getValueForDatasource, hashCode, illegalFieldValue, isNullable, onAfterDelete, onAfterSave, onBeforeDelete, onBeforeSave, onBeforeSaveChecks, parseValue, setValue, setValueFromDatasource, toString, transformFromDatasource, transformFromJDBC, transformToDatasource, transformToJDBC
is, makeNewInstance, tryAs
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
transferOption
protected BaseEntityRefList<?,?> getEntityRefList(Object entity)
protected Object getValueFromField(Object target)
Property
getValueFromField
in class Property
target
- the target object determined by the access pathpublic Object getValueAsCopy(Object entity)
Property
getValueAsCopy
in class Property
entity
- the entity to fetch the value frompublic Object transformValue(sirius.kernel.commons.Value value)
Property
transformValue
in class Property
value
- the value to convertprotected Object transformToElastic(Object object)
Property
transformToElastic
in class Property
object
- the database valueprotected Object transformToMongo(Object object)
Property
transformToMongo
in class Property
object
- the database valueprotected Object transformFromElastic(sirius.kernel.commons.Value object)
Property
transformFromElastic
in class Property
object
- the database valueprotected Object transformFromMongo(sirius.kernel.commons.Value object)
Property
transformFromMongo
in class Property
object
- the database valueprotected void setValueToField(Object value, Object target)
Property
setValueToField
in class Property
value
- the database value to storetarget
- the target object determined by the access pathpublic void describeProperty(com.alibaba.fastjson.JSONObject description)
ESPropertyInfo
describeProperty
in interface ESPropertyInfo
description
- the target JSON to fillprotected BaseEntityRefList<?,?> getReferenceEntityRefList()
protected EntityDescriptor getReferencedDescriptor()
EntityDescriptor
of the referenced entity.public void link()
Property
This is invoked once all EntityDescriptors are loaded and can be used to build references to other descriptors / properties.
protected void onDeleteSetNull(Object e)
protected void onDeleteCascade(Object e)
protected void onDeleteReject(Object e)
Copyright © 2018. All rights reserved.