Interface IdentityColumnSupport
- All Known Implementing Classes:
IdentityColumnSupportBase
Defines the identity-column DDL, insert syntax, and identity-specific value
retrieval semantics of a Dialect.
Providers may implement this contract directly or extend
IdentityColumnSupportBase, and must supply one stable non-null instance
from Dialect.getIdentityColumnSupport(). Implementations describe SQL and
the semantic retrieval choice only; they must not construct Hibernate
mutation delegates or depend on entity persisters.
- Since:
- 8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionappendIdentitySelectToInsert(String identityColumnName, String insertString) Transform an insert so its execution also returns the generated identity.getIdentityColumnString(int jdbcTypeCode) Render the DDL fragment which declares an identity column.The value keyword written for an identity column, ornullwhen the identity column is omitted from the insert.getIdentitySelectString(String table, String column, int jdbcTypeCode) Render the separate statement used to select the last generated identity.Select the identity-specific retrieval behavior Hibernate should execute.booleanWhether the identity declaration follows an existing SQL data type.default booleanWhethergetIdentityInsertString()supplies a value keyword.booleanWhether identity-column key generation is supported.booleanWhether identity-selection SQL may be combined with or appended to the insert SQL.
-
Method Details
-
supportsIdentityColumns
boolean supportsIdentityColumns()Whether identity-column key generation is supported. -
supportsInsertSelectIdentity
boolean supportsInsertSelectIdentity()Whether identity-selection SQL may be combined with or appended to the insert SQL. -
hasDataTypeInIdentityColumn
boolean hasDataTypeInIdentityColumn()Whether the identity declaration follows an existing SQL data type. -
appendIdentitySelectToInsert
-
getIdentitySelectString
String getIdentitySelectString(String table, String column, int jdbcTypeCode) throws MappingException Render the separate statement used to select the last generated identity.- Throws:
MappingException- when separate identity selection is unsupported
-
getIdentityColumnString
Render the DDL fragment which declares an identity column.- Throws:
MappingException- when identity columns are unsupported or the JDBC type is not a valid identity type
-
getIdentityInsertString
String getIdentityInsertString()The value keyword written for an identity column, ornullwhen the identity column is omitted from the insert. -
hasIdentityInsertKeyword
default boolean hasIdentityInsertKeyword()WhethergetIdentityInsertString()supplies a value keyword. -
getIdentityValueRetrieval
IdentityValueRetrieval getIdentityValueRetrieval()Select the identity-specific retrieval behavior Hibernate should execute.
-