One mapping parameter is required: key (unless a natural-id is defined in the mapping).
| Modifier and Type | Class and Description |
|---|---|
| public static class | SelectGenerator.SelectGeneratorDelegate
The delegate for the select generation strategy. |
| Modifier and Type | Field and Description |
|---|---|
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Type type, Properties
param values, keyed by parameter name params, Dialect d)Implements org. |
| private static String | |
| public InsertGeneratedIdentifierDelegate | getInsertGeneratedIdentifierDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean isGetGeneratedKeysEnabled)
Implements org. |
| uniqueKeyPropertyName | back to summary |
|---|---|
| private String uniqueKeyPropertyName | |
| SelectGenerator | back to summary |
|---|---|
| public SelectGenerator() | |
| configure | back to summary |
|---|---|
| public void configure(Type type, Properties params, Dialect d) throws MappingException Implements 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.
| |
| determineNameOfPropertyToUse | back to summary |
|---|---|
| private static String determineNameOfPropertyToUse(PostInsertIdentityPersister persister, String supplied) | |
| getInsertGeneratedIdentifierDelegate | back to summary |
|---|---|
| public InsertGeneratedIdentifierDelegate getInsertGeneratedIdentifierDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean isGetGeneratedKeysEnabled) throws HibernateException Implements org. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Dialect | |
| private final String | |
| private final Type | |
| private final PostInsertIdentityPersister | |
| private final String | |
| private final Type |
| Access | Constructor and Description |
|---|---|
| private | SelectGeneratorDelegate(PostInsertIdentityPersister persister, Dialect dialect, String suppliedUniqueKeyPropertyName)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | bindParameters(SessionImplementor
The session session, PreparedStatement The prepared ps, Object SQL commandThe entity being saved. entity)Overrides org. getSelectSQL.
|
| protected Serializable | getResult(SessionImplementor
The session session, ResultSet The result set containing the generated primay key values. rs, Object The entity being saved. entity)Implements abstract org. |
| protected String | getSelectSQL()
Implements abstract org. |
| public IdentifierGeneratingInsert | prepareIdentifierGeneratingInsert()
Implements org. org. specific to the delegate's mode
of handling generated key values.
|
| dialect | back to summary |
|---|---|
| private final Dialect dialect | |
| idSelectString | back to summary |
|---|---|
| private final String idSelectString | |
| idType | back to summary |
|---|---|
| private final Type idType | |
| persister | back to summary |
|---|---|
| private final PostInsertIdentityPersister persister Hides org. | |
| uniqueKeyPropertyName | back to summary |
|---|---|
| private final String uniqueKeyPropertyName | |
| uniqueKeyType | back to summary |
|---|---|
| private final Type uniqueKeyType | |
| SelectGeneratorDelegate | back to summary |
|---|---|
| private SelectGeneratorDelegate(PostInsertIdentityPersister persister, Dialect dialect, String suppliedUniqueKeyPropertyName) | |
| bindParameters | back to summary |
|---|---|
| protected void bindParameters(SessionImplementor session, PreparedStatement ps, Object entity) throws SQLException Overrides org. Doc from org. Bind any required parameter values into the SQL command
| |
| getResult | back to summary |
|---|---|
| protected Serializable getResult(SessionImplementor session, ResultSet rs, Object entity) throws SQLException Implements abstract org. Doc from org. Extract the generated key value from the given result set.
| |
| getSelectSQL | back to summary |
|---|---|
| protected String getSelectSQL() Implements abstract org. Doc from org. Get the SQL statement to be used to retrieve generated key values.
| |
| prepareIdentifierGeneratingInsert | back to summary |
|---|---|
| public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert() Implements org. Doc from org. Build a
| |