Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Hibernate OGM, Domain model persistence for NoSQL datastores
   *
   * License: GNU Lesser General Public License (LGPL), version 2.1 or later
   * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
   */
  package org.hibernate.ogm.dialect.impl;
  
 import java.util.Map;
 
A org.hibernate.ogm.dialect.spi.GridDialect which delegates all the operations to another dialect implementation. Useful as base class for dialect wrappers which wish to override only a few methods of the GridDialect, while delegating all the others.

Note: This class implements all the dialect facet interfaces such as org.hibernate.ogm.dialect.query.spi.QueryableGridDialect, one therefore must not use instanceof to determine the capabilities of a dialect, but rather GridDialects.getDialectFacetOrNull(org.hibernate.ogm.dialect.spi.GridDialect,java.lang.Class) should be used.

Author(s):
Gunnar Morling
 
 
 	private final GridDialect gridDialect;
 
 	@SuppressWarnings("unchecked")
 	public ForwardingGridDialect(GridDialect gridDialect) {
 		Contracts.assertParameterNotNullgridDialect"gridDialect" );
 
 		this. = gridDialect;
 		this. = GridDialects.getDialectFacetOrNullgridDialectBatchableGridDialect.class );
 		this. = GridDialects.getDialectFacetOrNullgridDialectQueryableGridDialect.class );
 	}

Get the underlying grid dialect.

Returns:
the wrapped dialect implementation.
 
 	public GridDialect getGridDialect() {
 		return ;
 	}
 
 	/*
 	 * @see org.hibernate.ogm.dialect.spi.GridDialect
 	 */
 
 	public LockingStrategy getLockingStrategy(Lockable lockableLockMode lockMode) {
 		return .getLockingStrategylockablelockMode );
 	}
 
 	public Tuple getTuple(EntityKey keyTupleContext tupleContext) {
 		return .getTuplekeytupleContext );
 	}
	public Tuple createTuple(EntityKey keyTupleContext tupleContext) {
		return .createTuplekeytupleContext );
	}
	public void insertOrUpdateTuple(EntityKey keyTuple tupleTupleContext tupleContext) {
		.insertOrUpdateTuplekeytupletupleContext );
	}
	public void removeTuple(EntityKey keyTupleContext tupleContext) {
		.removeTuplekeytupleContext );
	}
	public Association getAssociation(AssociationKey keyAssociationContext associationContext) {
		return .getAssociationkeyassociationContext );
	}
	public Association createAssociation(AssociationKey keyAssociationContext associationContext) {
		return .createAssociationkeyassociationContext );
	}
	public void insertOrUpdateAssociation(AssociationKey keyAssociation associationAssociationContext associationContext) {
		.insertOrUpdateAssociationkeyassociationassociationContext );
	}
	public void removeAssociation(AssociationKey keyAssociationContext associationContext) {
		.removeAssociationkeyassociationContext );
	}
	public boolean isStoredInEntityStructure(AssociationKeyMetadata associationKeyMetadataAssociationTypeContext associationTypeContext) {
		return .isStoredInEntityStructureassociationKeyMetadataassociationTypeContext );
	}
	public Number nextValue(NextValueRequest request) {
		return .nextValuerequest );
	}
	public boolean supportsSequences() {
	}
	public GridType overrideType(Type type) {
		return .overrideTypetype );
	}
	public void forEachTuple(ModelConsumer consumerEntityKeyMetadata... entityKeyMetadatas) {
		.forEachTupleconsumerentityKeyMetadatas );
	}
		return .getDuplicateInsertPreventionStrategyentityKeyMetadata );
	}
	/*
	 * @see org.hibernate.ogm.dialect.batch.spi.BatchableGridDialect
	 */
	public void executeBatch(OperationsQueue queue) {
	}
	/*
	 * @see org.hibernate.ogm.dialect.queryable.spi.QueryableGridDialect
	 */
	public ClosableIterator<TupleexecuteBackendQuery(BackendQuery<T> queryQueryParameters queryParameters) {
		return .executeBackendQueryqueryqueryParameters );
	}
	}
	public T parseNativeQuery(String nativeQuery) {
		return .parseNativeQuerynativeQuery );
	}
	/*
	 * @see org.hibernate.ogm.dialect.optimisticlock.spi.OptimisticLockingAwareGridDialect
	 */
	public boolean updateTupleWithOptimisticLock(EntityKey entityKeyTuple oldLockStateTuple tupleTupleContext tupleContext) {
		return .updateTupleWithOptimisticLockentityKeyoldLockStatetupletupleContext );
	}
	public boolean removeTupleWithOptimisticLock(EntityKey entityKeyTuple oldLockStateTupleContext tupleContext) {
		return .removeTupleWithOptimisticLockentityKeyoldLockStatetupleContext );
	}
	/*
	 * @see org.hibernate.ogm.dialect.spi.SessionFactoryLifecycleAwareDialect
	 */
	public void sessionFactoryCreated(SessionFactoryImplementor sessionFactoryImplementor) {
		.sessionFactoryCreatedsessionFactoryImplementor );
	}
	/*
	 * @see org.hibernate.ogm.dialect.identitycolumnaware.IdentityColumnAwareGridDialect
	 */
	public Tuple createTuple(EntityKeyMetadata entityKeyMetadataTupleContext tupleContext) {
		return .createTupleentityKeyMetadatatupleContext );
	}
	public void insertTuple(EntityKeyMetadata entityKeyMetadataTuple tupleTupleContext tupleContext) {
		.insertTupleentityKeyMetadatatupletupleContext );
	}
	/*
	 * @see org.hibernate.service.spi.ServiceRegistryAwareService
	 */
	public void injectServices(ServiceRegistryImplementor serviceRegistry) {
		if (  instanceof ServiceRegistryAwareService ) {
		}
	}
	/*
	 * @see org.hibernate.service.spi.Configurable
	 */
	public void configure(Map configurationValues) {
		if (  instanceof Configurable ) {
			( (Configurable ).configureconfigurationValues );
		}
	}
	public String toString() {
		sb.append" -> " );
		GridDialect delegate = ;
		while ( delegate instanceof ForwardingGridDialect ) {
			sb.appenddelegate.getClass().getSimpleName() );
			sb.append" -> " );
			delegate = ( (ForwardingGridDialect<?>) delegate ).getGridDialect();
		}
		sb.appenddelegate.getClass().getSimpleName() );
		sb.append"]" );
		return sb.toString();
	}
New to GrepCode? Check out our FAQ X