public abstract class AbstractTypeMapping<Type,Id> extends GenericTypeMapping<Type,Id>
GenericTypeMapping that adds setters for ID and
version and a read method implementation that takes care of ID and version
settingFIELD_ID, FIELD_INDEX, FIELD_TYPE, FIELD_VERSION| Constructor and Description |
|---|
AbstractTypeMapping(String typeAlias,
Class<Type> typeClass,
Class<Id> idClass) |
| Modifier and Type | Method and Description |
|---|---|
Type |
read(Map<String,Object> source)
only public for testing.
|
protected abstract Type |
readObject(Map<String,Object> source) |
protected abstract void |
setId(Type o,
Id id) |
Id |
setIdString(Type o,
String idString)
sets id on object after converting elasticsearch id to suitable type
|
protected abstract void |
setVersion(Type o,
Long version) |
buildMapping, cast, castId, filter, getContentBuilder, getId, getIdClass, getMappingSource, getObjectSource, getSource, getSource, getTypeClass, getVersion, id, isDynamicMapping, isFiltered, meta, read, read, toId, toIdString, toString, version, write, writeObjectdeleteBuilderRequest, deleteBuilderRequest, deleteRequest, deleteRequest, getIdString, getTypeAlias, indexBuilderRequest, indexRequest, isVersioned@CheckForNull public final Type read(Map<String,Object> source)
read in class GenericTypeMapping<Type,Id>public final Id setIdString(@Nonnull Type o, @Nonnull String idString)
@CheckForNull protected abstract Type readObject(Map<String,Object> source)
Copyright © 2015 Molindo GmbH. All Rights Reserved.