public class StringMapProperty extends BaseMapProperty implements ESPropertyInfo
StringMap field within an ElasticEntity or a MongoEntity.
Note that maps are stored as a list of nested objects which contain a key and
a value. This is used to prevent a mapping explosion within ES while still permitting to
search and filter using nested queries. Use IndexMode.indexed() (set to FALSE) to
set the type to object - which will still create key/value pairs but stored as objects.
| Modifier and Type | Class and Description |
|---|---|
static class |
StringMapProperty.Factory
Factory for generating properties based on their field type
|
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY
Contains the name of the field used to store the map key
|
static String |
VALUE
Contains the name of the field used to store the map value
|
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 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.
|
getMap, getValueAsCopy, getValueFromField, setValueToField, transformValuecheckNullability, checkUniqueness, determineDefaultValue, determineLengths, determineNullability, equals, getAnnotation, getDefaultValue, getDefinition, getDescriptor, getField, getLabel, getLength, getName, getPropertyName, getValue, getValueForDatasource, hashCode, illegalFieldValue, isNullable, link, onAfterDelete, onAfterSave, onBeforeDelete, onBeforeSave, onBeforeSaveChecks, parseValue, setValue, setValueFromDatasource, toString, transformFromDatasource, transformFromJDBC, transformToDatasource, transformToJDBCis, makeNewInstance, tryAsclone, finalize, getClass, notify, notifyAll, wait, wait, waittransferOptionpublic static final String KEY
public static final String VALUE
protected Object transformFromElastic(sirius.kernel.commons.Value object)
PropertytransformFromElastic in class Propertyobject - the database valueprotected Object transformFromMongo(sirius.kernel.commons.Value object)
PropertytransformFromMongo in class Propertyobject - the database valueprotected Object transformToElastic(Object object)
PropertytransformToElastic in class Propertyobject - the database valueprotected Object transformToMongo(Object object)
PropertytransformToMongo in class Propertyobject - the database valuepublic void describeProperty(com.alibaba.fastjson.JSONObject description)
ESPropertyInfodescribeProperty in interface ESPropertyInfodescription - the target JSON to fillCopyright © 2018. All rights reserved.