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
public class SQLServerIdentityColumnSupport extends AbstractTransactSQLIdentityColumnSupport
-
-
Constructor Summary
Constructors Constructor Description SQLServerIdentityColumnSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
appendIdentitySelectToInsert(java.lang.String insertSQL)
Use insert 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
-
-
-
-
Method Detail
-
appendIdentitySelectToInsert
public java.lang.String appendIdentitySelectToInsert(java.lang.String insertSQL)
Use insert table(...) values(...) select SCOPE_IDENTITY() Provided weIdentityColumnSupport.supportsInsertSelectIdentity()
, then attach the "select identity" clause to the insert statement. Note, ifIdentityColumnSupport.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.
-
-