@SuppressWarnings("WeakerAccess") protected DatabaseStructure buildTableStructure( Type type, Properties params, JdbcEnvironment jdbcEnvironment, QualifiedName sequenceName, int initialValue, int incrementSize) { final Identifier valueColumnName = determineValueColumnName( params, jdbcEnvironment ); return new TableStructure( jdbcEnvironment, sequenceName, valueColumnName, initialValue, incrementSize, type.getReturnedClass() ); }
@SuppressWarnings("WeakerAccess") protected DatabaseStructure buildTableStructure( JavaTypeDescriptor javaTypeDescriptor, Properties params, JdbcEnvironment jdbcEnvironment, QualifiedName sequenceName, int initialValue, int incrementSize) { final Identifier valueColumnName = determineValueColumnName( params, jdbcEnvironment ); return new TableStructure( jdbcEnvironment, sequenceName, valueColumnName, initialValue, incrementSize, javaTypeDescriptor.getJavaType() ); }
/** * Build the database structure. * * @param type The Hibernate type of the identifier property * @param params The params supplied in the generator config (plus some standard useful extras). * @param dialect The dialect being used. * @param forceTableUse Should a table be used even if the dialect supports sequences? * @param sequenceName The name to use for the sequence or table. * @param initialValue The initial value. * @param incrementSize the increment size to use (after any adjustments). * * @return An abstraction for the actual database structure in use (table vs. sequence). */ protected DatabaseStructure buildDatabaseStructure( Type type, Properties params, Dialect dialect, boolean forceTableUse, String sequenceName, int initialValue, int incrementSize) { boolean useSequence = dialect.supportsSequences() && !forceTableUse; if ( useSequence ) { return new SequenceStructure( dialect, sequenceName, initialValue, incrementSize, type.getReturnedClass() ); } else { String valueColumnName = determineValueColumnName( params, dialect ); return new TableStructure( dialect, sequenceName, valueColumnName, initialValue, incrementSize, type.getReturnedClass() ); } }
/** * Build the database structure. * * @param type The Hibernate type of the identifier property * @param params The params supplied in the generator config (plus some standard useful extras). * @param dialect The dialect being used. * @param forceTableUse Should a table be used even if the dialect supports sequences? * @param sequenceName The name to use for the sequence or table. * @param initialValue The initial value. * @param incrementSize the increment size to use (after any adjustments). * * @return An abstraction for the actual database structure in use (table vs. sequence). */ protected DatabaseStructure buildDatabaseStructure( Type type, Properties params, Dialect dialect, boolean forceTableUse, String sequenceName, int initialValue, int incrementSize) { boolean useSequence = dialect.supportsSequences() && !forceTableUse; if ( useSequence ) { return new SequenceStructure( dialect, sequenceName, initialValue, incrementSize, type.getReturnedClass() ); } else { String valueColumnName = determineValueColumnName( params, dialect ); return new TableStructure( dialect, sequenceName, valueColumnName, initialValue, incrementSize, type.getReturnedClass() ); } }