public static interface EntityOperations.AdaptableEntity<T>
| Modifier and Type | Method and Description |
|---|---|
T |
getBean()
Returns the underlying bean.
|
Object |
getId()
Returns the identifier of the entity.
|
ElasticsearchPersistentEntity<?> |
getPersistentEntity()
Returns the
ElasticsearchPersistentEntity associated with this entity. |
default ElasticsearchPersistentEntity<?> |
getRequiredPersistentEntity()
Returns the required
ElasticsearchPersistentEntity. |
String |
getRouting()
returns the routing for the entity if it is available
|
SeqNoPrimaryTerm |
getSeqNoPrimaryTerm()
Returns SeqNoPropertyTerm for this entity.
|
Number |
getVersion()
Returns the current version value if the entity has a version property.
|
boolean |
hasSeqNoPrimaryTerm()
Returns whether there is a property with type SeqNoPrimaryTerm in this entity.
|
T |
incrementVersion()
Increments the value of the version property if available.
|
T |
initializeVersionProperty()
Initializes the version property of the of the current entity if available.
|
boolean |
isNew()
Returns whether the entity is considered to be new.
|
default boolean |
isVersionedEntity()
Returns whether the entity is versioned, i.e. if it contains a version property.
|
T |
populateIdIfNecessary(Object id)
Populates the identifier of the backing entity if it has an identifier property and there's no identifier
currently present.
|
@Nullable T populateIdIfNecessary(@Nullable Object id)
id - can be null.T initializeVersionProperty()
T incrementVersion()
@Nullable Number getVersion()
boolean hasSeqNoPrimaryTerm()
@Nullable SeqNoPrimaryTerm getSeqNoPrimaryTerm()
@Nullable String getRouting()
@Nullable Object getId()
default boolean isVersionedEntity()
T getBean()
boolean isNew()
@Nullable ElasticsearchPersistentEntity<?> getPersistentEntity()
ElasticsearchPersistentEntity associated with this entity.default ElasticsearchPersistentEntity<?> getRequiredPersistentEntity()
ElasticsearchPersistentEntity.IllegalStateException - if no ElasticsearchPersistentEntity is associated with this entity.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.