Package org.hibernate.dialect.identity
Class SQLServerIdentityColumnSupport
java.lang.Object
org.hibernate.dialect.identity.IdentityColumnSupportImpl
org.hibernate.dialect.identity.AbstractTransactSQLIdentityColumnSupport
org.hibernate.dialect.identity.SQLServerIdentityColumnSupport
- All Implemented Interfaces:
IdentityColumnSupport
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendIdentitySelectToInsert
(String insertSQL) Useinsert table(...) values(...) select SCOPE_IDENTITY()
Methods inherited from class org.hibernate.dialect.identity.AbstractTransactSQLIdentityColumnSupport
getIdentityColumnString, getIdentitySelectString, supportsIdentityColumns, supportsInsertSelectIdentity
Methods inherited from class org.hibernate.dialect.identity.IdentityColumnSupportImpl
buildGetGeneratedKeysDelegate, getIdentityInsertString, hasDataTypeInIdentityColumn
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, hasIdentityInsertKeyword
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
SQLServerIdentityColumnSupport
public SQLServerIdentityColumnSupport()
-
-
Method Details
-
appendIdentitySelectToInsert
Useinsert table(...) values(...) select SCOPE_IDENTITY()
Provided we
IdentityColumnSupport.supportsInsertSelectIdentity()
, then attach the "select identity" clause to the insert statement.Note, if
IdentityColumnSupport.supportsInsertSelectIdentity()
== false then the insert-string should be returned without modification.- Specified by:
appendIdentitySelectToInsert
in interfaceIdentityColumnSupport
- Overrides:
appendIdentitySelectToInsert
in classAbstractTransactSQLIdentityColumnSupport
- Parameters:
insertSQL
- The insert command- Returns:
- The insert command with any necessary identity select clause attached.
-