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 <>.
 package org.hibernate.ogm.dialect.impl;
A pseudo org.hibernate.dialect.Dialect implementation which exposes the current org.hibernate.ogm.dialect.spi.GridDialect.

Emmanuel Bernard
Gunnar Morling
public class OgmDialect extends Dialect {
	private final GridDialect gridDialect;
	public OgmDialect(GridDialect gridDialect) {
		this. = gridDialect;

Returns the current org.hibernate.ogm.dialect.spi.GridDialect.

Intended for usage in code interacting with ORM SPIs which only provide access to the org.hibernate.dialect.Dialect but not the service registry. Other code should obtain the grid dialect from the service registry.

the current grid dialect.
		return ;

Overridden in OGM in order to make things work when USE_NEW_ID_GENERATOR_MAPPINGS is set to false. If so, and if additionally the generation type is javax.persistence.GenerationType.AUTO, the ORM engine will invoke this method to obtain the "native" identifier generator. Depending on the store's capabilities, OGM's identity, sequence or table generator will be returned.

		if ( GridDialects.hasFacetIdentityColumnAwareGridDialect.class ) ) {
			return OgmIdentityGenerator.class;
		else if ( .supportsSequences() ) {
			return OgmSequenceGenerator.class;
		else {
			return OgmTableGenerator.class;
New to GrepCode? Check out our FAQ X