public class RedisJsonDialect extends AbstractRedisDialect implements org.hibernate.ogm.dialect.multiget.spi.MultigetGridDialect, org.hibernate.ogm.dialect.batch.spi.GroupingByEntityDialect
Tuples are stored in Redis as a JSON serialization of a Entity object. Associations are stored in Redis obtained as a
JSON serialization of a Association object either within the entity or external.
See DocumentStoreProperties.ASSOCIATIONS_STORE on how to configure
entity or external storage.
| Modifier and Type | Field and Description |
|---|---|
protected JsonEntityStorageStrategy |
entityStorageStrategy |
ASSOCIATIONS, clusterMode, connection, IDENTIFIERS, strategy| Constructor and Description |
|---|
RedisJsonDialect(RedisDatastoreProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
org.hibernate.ogm.model.spi.Association |
createAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key,
org.hibernate.ogm.dialect.spi.AssociationContext associationContext) |
org.hibernate.ogm.model.spi.Tuple |
createTuple(org.hibernate.ogm.model.key.spi.EntityKey key,
org.hibernate.ogm.dialect.spi.OperationContext operationContext) |
void |
executeGroupedChangesToEntity(org.hibernate.ogm.dialect.batch.spi.GroupedChangesToEntityOperation groupedOperation) |
void |
forEachTuple(org.hibernate.ogm.dialect.spi.ModelConsumer consumer,
org.hibernate.ogm.dialect.spi.TupleTypeContext tupleTypeContext,
org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata) |
org.hibernate.ogm.model.spi.Association |
getAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key,
org.hibernate.ogm.dialect.spi.AssociationContext associationContext) |
protected Object |
getAssociationRows(org.hibernate.ogm.model.spi.Association association,
org.hibernate.ogm.model.key.spi.AssociationKey key,
org.hibernate.ogm.dialect.spi.AssociationContext associationContext)
Returns the rows of the given association as to be stored in the database.
|
JsonEntityStorageStrategy |
getEntityStorageStrategy() |
org.hibernate.ogm.model.spi.Tuple |
getTuple(org.hibernate.ogm.model.key.spi.EntityKey key,
org.hibernate.ogm.dialect.spi.OperationContext operationContext) |
List<org.hibernate.ogm.model.spi.Tuple> |
getTuples(org.hibernate.ogm.model.key.spi.EntityKey[] keys,
org.hibernate.ogm.dialect.spi.TupleContext tupleContext) |
boolean |
isStoredInEntityStructure(org.hibernate.ogm.model.key.spi.AssociationKeyMetadata keyMetadata,
org.hibernate.ogm.dialect.spi.AssociationTypeContext associationTypeContext) |
org.hibernate.ogm.type.spi.GridType |
overrideType(org.hibernate.type.Type type) |
addIdToEntity, addKeyValuesFromKeyName, associationId, entityId, getAssociation, getAssociationRow, getEmbeddingEntityTuplePointer, getKeyWithoutTablePrefix, getObjectTTL, identifierId, isClusterMode, keyStringToMap, keyToMap, nextValue, remove, removeAssociations, removeTuple, scan, setObjectTTL, storeAssociation, supportsSequencesexecuteBatch, flushPendingOperations, insertOrUpdateAssociation, insertOrUpdateTuple, removeAssociationgetDuplicateInsertPreventionStrategy, getLockingStrategy, isInTheInsertionQueue, usesNavigationalInformationForInverseSideOfAssociationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected final JsonEntityStorageStrategy entityStorageStrategy
public RedisJsonDialect(RedisDatastoreProvider provider)
public org.hibernate.ogm.type.spi.GridType overrideType(org.hibernate.type.Type type)
overrideType in interface org.hibernate.ogm.dialect.spi.GridDialectoverrideType in class org.hibernate.ogm.dialect.spi.BaseGridDialectpublic org.hibernate.ogm.model.spi.Tuple getTuple(org.hibernate.ogm.model.key.spi.EntityKey key,
org.hibernate.ogm.dialect.spi.OperationContext operationContext)
getTuple in interface org.hibernate.ogm.dialect.spi.GridDialectpublic org.hibernate.ogm.model.spi.Tuple createTuple(org.hibernate.ogm.model.key.spi.EntityKey key,
org.hibernate.ogm.dialect.spi.OperationContext operationContext)
createTuple in interface org.hibernate.ogm.dialect.spi.GridDialectpublic void executeGroupedChangesToEntity(org.hibernate.ogm.dialect.batch.spi.GroupedChangesToEntityOperation groupedOperation)
executeGroupedChangesToEntity in class org.hibernate.ogm.dialect.impl.AbstractGroupingByEntityDialectpublic boolean isStoredInEntityStructure(org.hibernate.ogm.model.key.spi.AssociationKeyMetadata keyMetadata,
org.hibernate.ogm.dialect.spi.AssociationTypeContext associationTypeContext)
isStoredInEntityStructure in interface org.hibernate.ogm.dialect.spi.GridDialectpublic org.hibernate.ogm.model.spi.Association getAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key,
org.hibernate.ogm.dialect.spi.AssociationContext associationContext)
getAssociation in interface org.hibernate.ogm.dialect.spi.GridDialectpublic org.hibernate.ogm.model.spi.Association createAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key,
org.hibernate.ogm.dialect.spi.AssociationContext associationContext)
createAssociation in interface org.hibernate.ogm.dialect.spi.GridDialectprotected Object getAssociationRows(org.hibernate.ogm.model.spi.Association association, org.hibernate.ogm.model.key.spi.AssociationKey key, org.hibernate.ogm.dialect.spi.AssociationContext associationContext)
Strings, ints etc. in case there is exactly one row key column which is
not part of the association key (in this case we don't need to persist the key name as it can be restored from
the association key upon loading) orEntitys with keys/values for all row key columns which are not part of the association keypublic void forEachTuple(org.hibernate.ogm.dialect.spi.ModelConsumer consumer,
org.hibernate.ogm.dialect.spi.TupleTypeContext tupleTypeContext,
org.hibernate.ogm.model.key.spi.EntityKeyMetadata entityKeyMetadata)
forEachTuple in interface org.hibernate.ogm.dialect.spi.GridDialectpublic JsonEntityStorageStrategy getEntityStorageStrategy()
public List<org.hibernate.ogm.model.spi.Tuple> getTuples(org.hibernate.ogm.model.key.spi.EntityKey[] keys, org.hibernate.ogm.dialect.spi.TupleContext tupleContext)
getTuples in interface org.hibernate.ogm.dialect.multiget.spi.MultigetGridDialectCopyright © 2010–2017 Hibernate. All rights reserved.