Deprecated
Use org. instead.
A hilo IdentifierGenerator that uses a database table to store the last generated values. A table can contains several hi values. They are distinct from each other through a key
This implementation is not compliant with a user connection
Allowed parameters (all of them are optional):
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final int | |
| public static final String | |
| private static final String | |
| private String | formattedTableNameForLegacyGetter
Deprecated
|
| private LegacyHiLoAlgorithmOptimizer | |
| public static final String | |
| private String | |
| private int | |
| private static final CoreMessageLogger | |
| public static final String | |
| private int | |
| private QualifiedName | |
| public static final String | |
| public static final String | |
| public static final String | |
| private QualifiedName | |
| private String | |
| private Class | |
| private String | |
| private String | |
| private String | |
| public static final String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Type
The id property type descriptor type, Properties param values, keyed by parameter name params, ServiceRegistry Access to service that may be needed. serviceRegistry)Overrides default org. |
| protected QualifiedName | |
| protected String | |
| protected String | |
| private ResultSet | |
| private int | |
| public synchronized Serializable | generate(final SharedSessionContractImplementor
The session from which the request originates session, Object the entity or collection (idbag) for which the id is being generated obj)Implements org. |
| public Object | generatorKey()
Overrides default org.
Deprecated
Return a key unique to the underlying database objects.
|
| public void | initialize(SqlStringGenerationContext
A context to help generate SQL strings context)Overrides default org. |
| private PreparedStatement | prepareStatement(Connection connection, String sql, SqlStatementLogger statementLogger, SessionEventListenerManager statsCollector)
|
| public void | registerExportables(Database
The database instance database)Overrides default org.
This method is called just once, after |
| DEFAULT_PK_COLUMN | back to summary |
|---|---|
| private static final String DEFAULT_PK_COLUMN | |
| DEFAULT_PK_LENGTH | back to summary |
|---|---|
| private static final int DEFAULT_PK_LENGTH | |
| DEFAULT_TABLE | back to summary |
|---|---|
| public static final String DEFAULT_TABLE | |
| DEFAULT_VALUE_COLUMN | back to summary |
|---|---|
| private static final String DEFAULT_VALUE_COLUMN | |
| formattedTableNameForLegacyGetter | back to summary |
|---|---|
| private String formattedTableNameForLegacyGetter
Deprecated
| |
| hiloOptimizer | back to summary |
|---|---|
| private LegacyHiLoAlgorithmOptimizer hiloOptimizer | |
| ID_TABLE | back to summary |
|---|---|
| public static final String ID_TABLE | |
| insert | back to summary |
|---|---|
| private String insert | |
| keySize | back to summary |
|---|---|
| private int keySize | |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| MAX_LO | back to summary |
|---|---|
| public static final String MAX_LO | |
| maxLo | back to summary |
|---|---|
| private int maxLo | |
| physicalTableName | back to summary |
|---|---|
| private QualifiedName physicalTableName | |
| PK_COLUMN_NAME | back to summary |
|---|---|
| public static final String PK_COLUMN_NAME | |
| PK_LENGTH_NAME | back to summary |
|---|---|
| public static final String PK_LENGTH_NAME | |
| PK_VALUE_NAME | back to summary |
|---|---|
| public static final String PK_VALUE_NAME | |
| qualifiedTableName | back to summary |
|---|---|
| private QualifiedName qualifiedTableName | |
| query | back to summary |
|---|---|
| private String query | |
| returnClass | back to summary |
|---|---|
| private Class<T> returnClass | |
| segmentColumnName | back to summary |
|---|---|
| private String segmentColumnName | |
| segmentName | back to summary |
|---|---|
| private String segmentName | |
| update | back to summary |
|---|---|
| private String update | |
| VALUE_COLUMN_NAME | back to summary |
|---|---|
| public static final String VALUE_COLUMN_NAME | |
| valueColumnName | back to summary |
|---|---|
| private String valueColumnName | |
| MultipleHiLoPerTableGenerator | back to summary |
|---|---|
| public MultipleHiLoPerTableGenerator() | |
| configure | back to summary |
|---|---|
| public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException Overrides default org. Doc from org. Configure this instance, given the value of parameters specified by the user as <param> elements.
This method is called just once, following instantiation, and before
| |
| determineGeneratorTableName | back to summary |
|---|---|
| protected QualifiedName determineGeneratorTableName(Properties params, JdbcEnvironment jdbcEnvironment) | |
| determineSegmentColumnName | back to summary |
|---|---|
| protected String determineSegmentColumnName(Properties params, JdbcEnvironment jdbcEnvironment) | |
| determineValueColumnName | back to summary |
|---|---|
| protected String determineValueColumnName(Properties params, JdbcEnvironment jdbcEnvironment) | |
| executeQuery | back to summary |
|---|---|
| private ResultSet executeQuery(PreparedStatement ps, SessionEventListenerManager statsCollector) throws SQLException | |
| executeUpdate | back to summary |
|---|---|
| private int executeUpdate(PreparedStatement ps, SessionEventListenerManager statsCollector) throws SQLException | |
| generate | back to summary |
|---|---|
| public synchronized Serializable generate(final SharedSessionContractImplementor session, Object obj) Implements org. Doc from org. Generate a new identifier.
| |
| generatorKey | back to summary |
|---|---|
| public Object generatorKey() Overrides default org. Doc from org. Deprecated
Return a key unique to the underlying database objects. Prevents us from trying to create/remove them multiple times.
| |
| initialize | back to summary |
|---|---|
| public void initialize(SqlStringGenerationContext context) Overrides default org. Doc from org. Initializes this instance, in particular pre-generates SQL as necessary.
This method is called after
| |
| prepareStatement | back to summary |
|---|---|
| private PreparedStatement prepareStatement(Connection connection, String sql, SqlStatementLogger statementLogger, SessionEventListenerManager statsCollector) throws SQLException | |
| registerExportables | back to summary |
|---|---|
| public void registerExportables(Database database) Overrides default org. Doc from org. Register database objects used by this identifier generator, e.g. sequences, tables, etc.
This method is called just once, after | |