public abstract class TypeMapping extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_ID |
static String |
FIELD_INDEX |
static String |
FIELD_TYPE |
static String |
FIELD_VERSION |
| Constructor and Description |
|---|
TypeMapping(String typeAlias)
creates a
TypeMapping for given alias and class. |
| Modifier and Type | Method and Description |
|---|---|
org.elasticsearch.action.delete.DeleteRequest |
deleteBuilderRequest(org.elasticsearch.client.Client client,
String indexName,
Object o) |
org.elasticsearch.action.delete.DeleteRequest |
deleteBuilderRequest(org.elasticsearch.client.Client client,
String indexName,
String id,
Long version) |
org.elasticsearch.action.delete.DeleteRequestBuilder |
deleteRequest(org.elasticsearch.client.Client client,
String indexName,
Object o) |
org.elasticsearch.action.delete.DeleteRequestBuilder |
deleteRequest(org.elasticsearch.client.Client client,
String indexName,
String id,
Long version) |
abstract Object |
getId(Object o) |
abstract Class<?> |
getIdClass() |
String |
getIdString(Object o) |
abstract MappingSource |
getMappingSource(org.elasticsearch.common.settings.Settings indexSettings) |
abstract ObjectWriteSource |
getObjectSource(Object o) |
String |
getTypeAlias() |
abstract Class<?> |
getTypeClass() |
abstract Long |
getVersion(Object o)
gets version from object or null if not versioned
|
org.elasticsearch.action.index.IndexRequest |
indexBuilderRequest(org.elasticsearch.client.Client client,
String indexName,
Object o) |
org.elasticsearch.action.index.IndexRequestBuilder |
indexRequest(org.elasticsearch.client.Client client,
String indexName,
Object o) |
boolean |
isFiltered(Object o)
Simple filtering of entities.
|
abstract boolean |
isVersioned() |
abstract Object |
read(ObjectReadSource source) |
abstract Object |
toId(String id) |
abstract String |
toIdString(Object id) |
public static final String FIELD_INDEX
public static final String FIELD_TYPE
public static final String FIELD_ID
public static final String FIELD_VERSION
public TypeMapping(String typeAlias)
TypeMapping for given alias and class. Both, alias and class must be unique per index.public String getTypeAlias()
public abstract Class<?> getTypeClass()
public abstract Class<?> getIdClass()
public boolean isFiltered(@Nonnull Object o)
true if entity must not be persisted to indexpublic abstract boolean isVersioned()
true if all object's of mapped type are supposed to be versioned. Note that it isn't
required to call this method before getVersion(Object)public abstract Object getId(@Nonnull Object o)
#setId(Object, Object)public final String getIdString(@Nonnull Object o)
getId(Object),
toIdString(Object)public abstract String toIdString(@Nonnull Object id)
toId(String)public abstract Object toId(@Nonnull String id)
toIdString(Object)public abstract Long getVersion(Object o)
public abstract MappingSource getMappingSource(org.elasticsearch.common.settings.Settings indexSettings)
MappingSource for this typepublic abstract ObjectWriteSource getObjectSource(Object o)
ObjectWriteSource for this object@CheckForNull public abstract Object read(ObjectReadSource source)
ObjectReadSource or null if not applicable or doc doesn't exist@CheckForNull public final org.elasticsearch.action.index.IndexRequestBuilder indexRequest(org.elasticsearch.client.Client client, String indexName, Object o)
@CheckForNull public final org.elasticsearch.action.index.IndexRequest indexBuilderRequest(org.elasticsearch.client.Client client, String indexName, Object o)
@CheckForNull public final org.elasticsearch.action.delete.DeleteRequest deleteBuilderRequest(org.elasticsearch.client.Client client, String indexName, Object o)
@CheckForNull public final org.elasticsearch.action.delete.DeleteRequest deleteBuilderRequest(org.elasticsearch.client.Client client, String indexName, String id, Long version)
@CheckForNull public final org.elasticsearch.action.delete.DeleteRequestBuilder deleteRequest(org.elasticsearch.client.Client client, String indexName, Object o)
@CheckForNull public final org.elasticsearch.action.delete.DeleteRequestBuilder deleteRequest(org.elasticsearch.client.Client client, String indexName, String id, Long version)
Copyright © 2016 Molindo GmbH. All Rights Reserved.