Hibernate ORM DefaultIdentifierGeneratorFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM DefaultIdentifierGeneratorFactory class.

This code example shows how to use the following methods:register
 * @author Davide D'Alto 
 * @author Gunnar Morling 
 */ 
public class OgmMutableIdentifierGeneratorFactory extends DefaultIdentifierGeneratorFactory implements MutableIdentifierGeneratorFactory {
 
	public OgmMutableIdentifierGeneratorFactory() { 
		// override the generators when AvailableSettings#USE_NEW_ID_GENERATOR_MAPPINGS is false 
		register( "seqhilo", OgmSequenceGenerator.class );
		register( MultipleHiLoPerTableGenerator.class.getName(), OgmTableGenerator.class );
 
		// override the generators when AvailableSettings#USE_NEW_ID_GENERATOR_MAPPINGS is true 
		register( TableGenerator.class.getName(), OgmTableGenerator.class );
		register( SequenceStyleGenerator.class.getName(), OgmSequenceGenerator.class );
 
		register( "identity", OgmIdentityGenerator.class );
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java