Package org.hibernate.dialect.identity
Class H2IdentityColumnSupport
- java.lang.Object
-
- org.hibernate.dialect.identity.IdentityColumnSupportImpl
-
- org.hibernate.dialect.identity.H2IdentityColumnSupport
-
- All Implemented Interfaces:
IdentityColumnSupport
- Direct Known Subclasses:
H2FinalTableIdentityColumnSupport
public class H2IdentityColumnSupport extends IdentityColumnSupportImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceH2IdentityColumnSupport.InsertValuesHandler
-
Field Summary
Fields Modifier and Type Field Description static H2IdentityColumnSupportINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protectedH2IdentityColumnSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetIdentityColumnString(int type)The syntax used during DDL to define a column as being an IDENTITY of a particular type.StringgetIdentityInsertString()The keyword used to insert a generated value into an identity column (or null).StringgetIdentitySelectString(String table, String column, int type)Get the select command to use to retrieve the last generated IDENTITY value for a particular tablevoidrender(TableInsert tableInsert, Consumer<String> sqlAppender, Consumer<ColumnReference> returnColumnHandler, H2IdentityColumnSupport.InsertValuesHandler insertValuesHandler, SessionFactoryImplementor sessionFactory)Deprecated.booleansupportsIdentityColumns()Does this dialect support identity column key generation?-
Methods inherited from class org.hibernate.dialect.identity.IdentityColumnSupportImpl
appendIdentitySelectToInsert, buildGetGeneratedKeysDelegate, hasDataTypeInIdentityColumn, supportsInsertSelectIdentity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.dialect.identity.IdentityColumnSupport
appendIdentitySelectToInsert, buildGetGeneratedKeysDelegate, hasIdentityInsertKeyword
-
-
-
-
Field Detail
-
INSTANCE
public static final H2IdentityColumnSupport INSTANCE
-
-
Method Detail
-
supportsIdentityColumns
public boolean supportsIdentityColumns()
Description copied from interface:IdentityColumnSupportDoes this dialect support identity column key generation?- Specified by:
supportsIdentityColumnsin interfaceIdentityColumnSupport- Overrides:
supportsIdentityColumnsin classIdentityColumnSupportImpl- Returns:
- True if IDENTITY columns are supported; false otherwise.
-
getIdentityColumnString
public String getIdentityColumnString(int type)
Description copied from interface:IdentityColumnSupportThe syntax used during DDL to define a column as being an IDENTITY of a particular type.- Specified by:
getIdentityColumnStringin interfaceIdentityColumnSupport- Overrides:
getIdentityColumnStringin classIdentityColumnSupportImpl- Parameters:
type- TheTypestype code.- Returns:
- The appropriate DDL fragment.
-
getIdentitySelectString
public String getIdentitySelectString(String table, String column, int type)
Description copied from interface:IdentityColumnSupportGet the select command to use to retrieve the last generated IDENTITY value for a particular table- Specified by:
getIdentitySelectStringin interfaceIdentityColumnSupport- Overrides:
getIdentitySelectStringin classIdentityColumnSupportImpl- Parameters:
table- The table into which the insert was donecolumn- The PK column.type- TheTypestype code.- Returns:
- The appropriate select command
-
getIdentityInsertString
public String getIdentityInsertString()
Description copied from interface:IdentityColumnSupportThe keyword used to insert a generated value into an identity column (or null). Need if the dialect does not support inserts that specify no column values.- Specified by:
getIdentityInsertStringin interfaceIdentityColumnSupport- Overrides:
getIdentityInsertStringin classIdentityColumnSupportImpl- Returns:
- The appropriate keyword.
-
render
@Deprecated public void render(TableInsert tableInsert, Consumer<String> sqlAppender, Consumer<ColumnReference> returnColumnHandler, H2IdentityColumnSupport.InsertValuesHandler insertValuesHandler, SessionFactoryImplementor sessionFactory)
Deprecated.
-
-