public class CosmosEntityInformation<T,ID>
extends org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
| Constructor and Description |
|---|
CosmosEntityInformation(Class<T> domainType)
Initialization
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContainerName()
Get container name
|
ID |
getId(T entity)
Get the field represented by the supplied id field on the
specified entity.
|
Field |
getIdField()
Get id field
|
String |
getIdFieldName()
Get id field name
|
Class<ID> |
getIdType()
Get id type
|
IndexingPolicy |
getIndexingPolicy()
Get indexing policy
|
static CosmosEntityInformation<?,?> |
getInstance(Class<?> domainClass)
Static Factory
|
String |
getPartitionKeyFieldName() |
Object |
getPartitionKeyFieldValue(T entity)
Get the field value represented by the supplied partitionKeyField object on the
specified entity object.
|
String |
getPartitionKeyPath()
Get the computed partition key path for container
|
Integer |
getRequestUnit()
Get request unit value
|
Integer |
getTimeToLive()
Get timeToLive value
|
String |
getVersionFieldName()
Get name of field annotated with @Version if any
|
String |
getVersionFieldValue(Object entity)
Get the value of the field marked as the version field
|
boolean |
isAutoCreateContainer()
Check if auto creating container is allowed
|
boolean |
isAutoScale()
Check if container should use autoscale for resource units
|
boolean |
isIndexingPolicySpecified() |
boolean |
isNew(T entity) |
boolean |
isVersioned()
Check if is versioned
|
boolean |
shouldGenerateId()
Should generate Id field value
|
getJavaTypepublic static CosmosEntityInformation<?,?> getInstance(Class<?> domainClass)
domainClass - to specify id fieldpublic boolean isNew(T entity)
public ID getId(T entity)
entity - the target object from which to get the fieldpublic Field getIdField()
public String getIdFieldName()
public boolean shouldGenerateId()
public String getContainerName()
public Integer getRequestUnit()
public Integer getTimeToLive()
@NonNull public IndexingPolicy getIndexingPolicy()
public boolean isVersioned()
public String getVersionFieldName()
public String getPartitionKeyPath()
public String getVersionFieldValue(Object entity)
entity - the object to get the value frompublic Object getPartitionKeyFieldValue(T entity)
entity - the target object from which to get the fieldpublic String getPartitionKeyFieldName()
public boolean isAutoCreateContainer()
public boolean isAutoScale()
public boolean isIndexingPolicySpecified()
Copyright © 2021 Microsoft Corporation. All rights reserved.