org.hibernate.id.IncrementGenerator Java Examples
The following examples show how to use
org.hibernate.id.IncrementGenerator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultIdentifierGeneratorFactory.java From lams with GNU General Public License v2.0 | 6 votes |
/** * Constructs a new DefaultIdentifierGeneratorFactory. */ @SuppressWarnings("deprecation") public DefaultIdentifierGeneratorFactory() { register( "uuid2", UUIDGenerator.class ); register( "guid", GUIDGenerator.class ); // can be done with UUIDGenerator + strategy register( "uuid", UUIDHexGenerator.class ); // "deprecated" for new use register( "uuid.hex", UUIDHexGenerator.class ); // uuid.hex is deprecated register( "assigned", Assigned.class ); register( "identity", IdentityGenerator.class ); register( "select", SelectGenerator.class ); register( "sequence", SequenceStyleGenerator.class ); register( "seqhilo", SequenceHiLoGenerator.class ); register( "increment", IncrementGenerator.class ); register( "foreign", ForeignGenerator.class ); register( "sequence-identity", SequenceIdentityGenerator.class ); register( "enhanced-sequence", SequenceStyleGenerator.class ); register( "enhanced-table", TableGenerator.class ); }
Example #2
Source File: IdGeneratorInterpreterImpl.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public String determineGeneratorName(GenerationType generationType, GeneratorNameDeterminationContext context) { switch ( generationType ) { case IDENTITY: { return "identity"; } case SEQUENCE: { return "seqhilo"; } case TABLE: { return MultipleHiLoPerTableGenerator.class.getName(); } default: { // AUTO if ( "increment".equalsIgnoreCase( context.getGeneratedValueGeneratorName() ) ) { return IncrementGenerator.class.getName(); } final Class javaType = context.getIdType(); if ( UUID.class.isAssignableFrom( javaType ) ) { return UUIDGenerator.class.getName(); } return "native"; } } }
Example #3
Source File: IdGeneratorInterpreterImpl.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public String determineGeneratorName(GenerationType generationType, GeneratorNameDeterminationContext context) { switch ( generationType ) { case IDENTITY: { return "identity"; } case SEQUENCE: { return org.hibernate.id.enhanced.SequenceStyleGenerator.class.getName(); } case TABLE: { return org.hibernate.id.enhanced.TableGenerator.class.getName(); } default: { // AUTO if ( "increment".equalsIgnoreCase( context.getGeneratedValueGeneratorName() ) ) { return IncrementGenerator.class.getName(); } final Class javaType = context.getIdType(); if ( UUID.class.isAssignableFrom( javaType ) ) { return UUIDGenerator.class.getName(); } return org.hibernate.id.enhanced.SequenceStyleGenerator.class.getName(); } } }