public class GridDialectLogger extends ForwardingGridDialect<Serializable>
GridDialectInitiator,
Serialized Form| Constructor and Description |
|---|
GridDialectLogger(GridDialect gridDialect) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
activationNeeded()
Returns true if this grid dialect logger should wrap the real grid dialect
|
Association |
createAssociation(AssociationKey key,
AssociationContext associationContext)
Creates a new (empty) association for storing the tuples representing the rows corresponding to the given key.
|
Tuple |
createTuple(EntityKey key,
TupleContext tupleContext)
Creates a new tuple for the given entity key.
|
ClosableIterator<Tuple> |
executeBackendQuery(BackendQuery<Serializable> query,
QueryParameters queryParameters)
Returns the result of a native query executed on the backend.
|
void |
executeBatch(OperationsQueue queue)
Executes the batched operations using the mechanism provided by the db
|
Association |
getAssociation(AssociationKey key,
AssociationContext associationContext)
Return the list of tuples corresponding to a given association and the given context
|
Tuple |
getTuple(EntityKey key,
TupleContext tupleContext)
Return the tuple with the given column for a given key
|
List<Tuple> |
getTuples(EntityKey[] keys,
TupleContext tupleContext)
Return the list of tuples with the given columns for a given list of keys.
|
void |
insertOrUpdateAssociation(AssociationKey key,
Association association,
AssociationContext associationContext)
Inserts or updates the given association in the datastore.
|
void |
insertOrUpdateTuple(EntityKey key,
Tuple tuple,
TupleContext tupleContext)
Inserts or updates the tuple corresponding to the given entity key.
|
boolean |
isStoredInEntityStructure(AssociationKeyMetadata associationKeyMetadata,
AssociationTypeContext associationTypeContext)
Whether the specified association is stored within an entity structure or not.
|
Number |
nextValue(NextValueRequest request)
Returns the next value from the specified id generator with the specified increment.
|
void |
removeAssociation(AssociationKey key,
AssociationContext associationContext)
Remove the list of tuples corresponding to a given association
|
void |
removeTuple(EntityKey key,
TupleContext tupleContext)
Remove the tuple for a given key
|
configure, createTuple, executeBackendUpdateQuery, forEachTuple, getDuplicateInsertPreventionStrategy, getGridDialect, getLockingStrategy, getParameterMetadataBuilder, injectServices, insertTuple, overrideType, parseNativeQuery, removeTupleWithOptimisticLock, sessionFactoryCreated, supportsSequences, toString, updateTupleWithOptimisticLockpublic GridDialectLogger(GridDialect gridDialect)
public static boolean activationNeeded()
public Tuple getTuple(EntityKey key, TupleContext tupleContext)
GridDialectgetTuple in interface GridDialectgetTuple in class ForwardingGridDialect<Serializable>key - The tuple identifiertupleContext - Contains additional information that might be used to create the tuplepublic List<Tuple> getTuples(EntityKey[] keys, TupleContext tupleContext)
MultigetGridDialect
All the keys provided will have the same EntityKeyMetadata.
In other words they target the same "table".
getTuples in interface MultigetGridDialectgetTuples in class ForwardingGridDialect<Serializable>keys - The array of tuple identifiertupleContext - Contains additional information that might be used to create the tuplespublic Tuple createTuple(EntityKey key, TupleContext tupleContext)
GridDialect
Only invoked if no tuple is present yet for the given key. Implementations should not perform a round-trip to the
datastore but rather return a transient instance. The OGM engine will invoke
GridDialect.insertOrUpdateTuple(EntityKey, Tuple, TupleContext) subsequently.
Columns in the tuple may represent properties of the corresponding entity as well as *-to-one associations to other entities. Implementations may choose to persist the latter e.g. in form of fields or as actual links/relationships to the element representing the associated entity. In case of multi-column keys, the corresponding association role for a given column can be obtained from the passed tuple context.
createTuple in interface GridDialectcreateTuple in class ForwardingGridDialect<Serializable>key - The tuple identifiertupleContext - Contains additional information that might be used to create the tuplepublic void insertOrUpdateTuple(EntityKey key, Tuple tuple, TupleContext tupleContext)
GridDialectinsertOrUpdateTuple in interface GridDialectinsertOrUpdateTuple in class ForwardingGridDialect<Serializable>key - The tuple identifiertuple - The list of operations to executetupleContext - Contains additional information that might be used to create or update the tuplepublic void removeTuple(EntityKey key, TupleContext tupleContext)
GridDialectremoveTuple in interface GridDialectremoveTuple in class ForwardingGridDialect<Serializable>key - The tuple identifiertupleContext - Contains additional information that might be used to remove the tuplepublic Association getAssociation(AssociationKey key, AssociationContext associationContext)
GridDialectgetAssociation in interface GridDialectgetAssociation in class ForwardingGridDialect<Serializable>key - Identifies the associationassociationContext - Contains additional information that might be used to get the associationpublic Association createAssociation(AssociationKey key, AssociationContext associationContext)
GridDialect
Only invoked if the association does not yet exist in the datastore. Implementations should not perform a
round-trip to the datastore but rather return a transient instance. The OGM engine will invoke
GridDialect.insertOrUpdateAssociation(AssociationKey, Association, AssociationContext) subsequently.
createAssociation in interface GridDialectcreateAssociation in class ForwardingGridDialect<Serializable>key - Identifies the associationassociationContext - Contains additional information that might be used to create the associationpublic void insertOrUpdateAssociation(AssociationKey key, Association association, AssociationContext associationContext)
GridDialectinsertOrUpdateAssociation in interface GridDialectinsertOrUpdateAssociation in class ForwardingGridDialect<Serializable>key - Identifies the associationassociation - The list of operations to executeassociationContext - Contains additional information that might be used to create the associationpublic void removeAssociation(AssociationKey key, AssociationContext associationContext)
GridDialectremoveAssociation in interface GridDialectremoveAssociation in class ForwardingGridDialect<Serializable>key - Identifies the associationassociationContext - Contains additional information that might be used to remove an associationpublic Number nextValue(NextValueRequest request)
GridDialectnextValue in interface GridDialectnextValue in class ForwardingGridDialect<Serializable>request - Identifies a specific id generatorpublic boolean isStoredInEntityStructure(AssociationKeyMetadata associationKeyMetadata, AssociationTypeContext associationTypeContext)
GridDialecttrue if this is the
case for a given association.isStoredInEntityStructure in interface GridDialectisStoredInEntityStructure in class ForwardingGridDialect<Serializable>associationKeyMetadata - identifies the association of interestassociationTypeContext - provides additional contextual information about the represented association type,
such as the options effectively applying for ittrue if the specified association is stored within an entity structure, false otherwise.public void executeBatch(OperationsQueue queue)
BatchableGridDialectexecuteBatch in interface BatchableGridDialectexecuteBatch in class ForwardingGridDialect<Serializable>queue - The batched operationspublic ClosableIterator<Tuple> executeBackendQuery(BackendQuery<Serializable> query, QueryParameters queryParameters)
QueryableGridDialectexecuteBackendQuery in interface QueryableGridDialect<Serializable>executeBackendQuery in class ForwardingGridDialect<Serializable>query - the query to execute in a representation understood by the underlying datastore. May have been
created by converting a JP-QL query or from a (named) native query.queryParameters - parameters passed for this queryClosableIterator with the result of the queryCopyright © 2010-2017 Red Hat, Inc., Emmanuel Bernard and various contributors. All Rights Reserved.