public abstract class ElasticEntity extends BaseEntity<String>
Elastic
and stored in Elasticsearch.Modifier and Type | Field and Description |
---|---|
protected static Elastic |
elastic |
static Mapping |
ID
Contains the ID which is auto-generated when inserting a new entity into Elasticsearch.
|
mixing, NEW, persistedData, version
Constructor and Description |
---|
ElasticEntity() |
Modifier and Type | Method and Description |
---|---|
String |
getId()
Returns the id of the entity.
|
<E extends BaseEntity<?>,C extends Constraint,Q extends Query<Q,E,C>> |
getMapper()
Provides the
mapper which is used to actually manage the entity. |
protected boolean |
isUnique(Mapping field,
Object value,
Mapping... within)
Determines if the given value in the given field is unique within the given side constraints.
|
protected void |
setId(String id)
Note that only the framework must use this to specify the ID of the entity.
|
assertUnique, equals, getDescriptor, getIdAsString, getTypeName, getUniqueName, getVersion, hashCode, isAnyMappingChanged, isChanged, isNew, setVersion, toString
is, makeNewInstance, tryAs
protected static Elastic elastic
public static final Mapping ID
It is NullAllowed
as it is filled during the update but after the save checkes have completed.
protected boolean isUnique(Mapping field, Object value, Mapping... within)
BaseEntity
isUnique
in class BaseEntity<String>
field
- the field to checkvalue
- the value to be uniquewithin
- the side constraints within the value must be uniquepublic <E extends BaseEntity<?>,C extends Constraint,Q extends Query<Q,E,C>> BaseMapper<E,C,Q> getMapper()
BaseEntity
mapper
which is used to actually manage the entity.getMapper
in class BaseEntity<String>
E
- the entity type of the mapperQ
- the query type of the mapperpublic String getId()
BaseEntity
getId
in class BaseEntity<String>
protected void setId(String id)
id
- the id of this entityCopyright © 2018. All rights reserved.