Package net.officefloor.nosql.cosmosdb
Class PartitionKeyMetaData
- java.lang.Object
-
- net.officefloor.nosql.cosmosdb.PartitionKeyMetaData
-
public class PartitionKeyMetaData extends java.lang.Object
Meta-data for thePartitionKey
.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static PartitionKeyMetaData
DEFAULT
DefaultPartitionKeyMetaData
being the identifier of the entity.static java.util.function.Function<java.lang.Object,com.azure.cosmos.models.PartitionKey>
DEFAULT_FACTORY
DefaultPartitionKey
factory that uses the entity's identifier.
-
Constructor Summary
Constructors Constructor Description PartitionKeyMetaData(java.lang.String path, java.util.function.Function<java.lang.Object,com.azure.cosmos.models.PartitionKey> factory)
Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Function<java.lang.Object,com.azure.cosmos.models.PartitionKey>
getFactory()
Obtains the factory to createPartitionKey
from entity.static PartitionKeyMetaData
getPartitionKeyMetaData(java.lang.Class<?> entityType)
Obtains thePartitionKeyMetaData
for the entity type.java.lang.String
getPath()
Obtains thePartitionKey
path.
-
-
-
Field Detail
-
DEFAULT_FACTORY
public static final java.util.function.Function<java.lang.Object,com.azure.cosmos.models.PartitionKey> DEFAULT_FACTORY
DefaultPartitionKey
factory that uses the entity's identifier.
-
DEFAULT
public static final PartitionKeyMetaData DEFAULT
DefaultPartitionKeyMetaData
being the identifier of the entity.
-
-
Method Detail
-
getPartitionKeyMetaData
public static PartitionKeyMetaData getPartitionKeyMetaData(java.lang.Class<?> entityType)
Obtains thePartitionKeyMetaData
for the entity type.- Parameters:
entityType
- Entity type.- Returns:
PartitionKeyMetaData
for the entity type.
-
getPath
public java.lang.String getPath()
Obtains thePartitionKey
path.- Returns:
PartitionKey
path.
-
getFactory
public java.util.function.Function<java.lang.Object,com.azure.cosmos.models.PartitionKey> getFactory()
Obtains the factory to createPartitionKey
from entity.- Returns:
- Factory to create
PartitionKey
from entity.
-
-