public class ElasticRefProperty extends BaseEntityRefProperty<String,ElasticEntity,ElasticRef<ElasticEntity>> implements SQLPropertyInfo, ESPropertyInfo
ElasticEntity
field within a Mixable
.Modifier and Type | Class and Description |
---|---|
static class |
ElasticRefProperty.Factory
Factory for generating properties based on their field type
|
entityRef, mixing, referencedDescriptor, referencedType
accessPath, alternativePropertyKey, defaultValue, descriptor, field, label, length, name, nameAsMapping, nullable, propertyKey, propertyName
Modifier | Constructor and Description |
---|---|
protected |
ElasticRefProperty(EntityDescriptor descriptor,
AccessPath accessPath,
Field field) |
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 Optional<ElasticEntity> |
find(Class<ElasticEntity> type,
sirius.kernel.commons.Value value)
Actually resolves the the type and value into an entity.
|
getEntityRef, getReferencedDescriptor, getReferencedType, getValueFromField, link, onBeforeSaveChecks, onDeleteCascade, onDeleteReject, onDeleteSetNull, setValueToField, transformFromDatasource, transformToDatasource, transformValue
checkNullability, checkUniqueness, determineDefaultValue, determineLengths, determineNullability, equals, getAnnotation, getDefaultValue, getDefinition, getDescriptor, getField, getLabel, getLength, getName, getPropertyName, getValue, getValueAsCopy, getValueForDatasource, hashCode, illegalFieldValue, isNullable, onAfterDelete, onAfterSave, onBeforeDelete, onBeforeSave, parseValue, setValue, setValueFromDatasource, toString, transformFromElastic, transformFromJDBC, transformFromMongo, transformToElastic, transformToJDBC, transformToMongo
is, makeNewInstance, tryAs
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
transferOption
protected ElasticRefProperty(EntityDescriptor descriptor, AccessPath accessPath, Field field)
public void contributeToTable(Table table)
SQLPropertyInfo
contributeToTable
in interface SQLPropertyInfo
table
- the table to add schema infos topublic void describeProperty(com.alibaba.fastjson.JSONObject description)
ESPropertyInfo
describeProperty
in interface ESPropertyInfo
description
- the target JSON to fillprotected Optional<ElasticEntity> find(Class<ElasticEntity> type, sirius.kernel.commons.Value value)
BaseEntityRefProperty
find
in class BaseEntityRefProperty<String,ElasticEntity,ElasticRef<ElasticEntity>>
type
- the type to resolvevalue
- the id to resolveCopyright © 2018. All rights reserved.