|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.config.dbplatform.DbIdentity
public class DbIdentity
Defines the identity/sequence behaviour for the database.
Constructor Summary | |
---|---|
DbIdentity()
|
Method Summary | |
---|---|
IdType |
getIdType()
Return the default ID generation type that should be used. |
String |
getSelectLastInsertedId(String table)
Return the SQL query to find the SelectLastInsertedId. |
boolean |
isSupportsGetGeneratedKeys()
Return true if GetGeneratedKeys is supported. |
boolean |
isSupportsIdentity()
Return true if this DB platform supports identity (autoincrement). |
boolean |
isSupportsSequence()
Return true if the database supports sequences. |
void |
setIdType(IdType idType)
Set the default ID generation type that should be used. |
void |
setSelectLastInsertedIdTemplate(String selectLastInsertedIdTemplate)
Set the template used to build the SQL query to return the LastInsertedId. |
void |
setSupportsGetGeneratedKeys(boolean supportsGetGeneratedKeys)
Set if GetGeneratedKeys is supported. |
void |
setSupportsIdentity(boolean supportsIdentity)
Set to true if this DB platform supports identity (autoincrement). |
void |
setSupportsSequence(boolean supportsSequence)
Set to true if the database supports sequences. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbIdentity()
Method Detail |
---|
public boolean isSupportsGetGeneratedKeys()
GetGeneratedKeys required to support JDBC batching transparently.
public void setSupportsGetGeneratedKeys(boolean supportsGetGeneratedKeys)
public String getSelectLastInsertedId(String table)
This should only be set on databases that don't support GetGeneratedKeys.
public void setSelectLastInsertedIdTemplate(String selectLastInsertedIdTemplate)
The template can contain "{table}" where the table name should be include in the sql query.
This should only be set on databases that don't support GetGeneratedKeys.
public boolean isSupportsSequence()
public void setSupportsSequence(boolean supportsSequence)
public boolean isSupportsIdentity()
public void setSupportsIdentity(boolean supportsIdentity)
public IdType getIdType()
Note: Id properties of type UUID automatically get a UUID generator assigned to them.
public void setIdType(IdType idType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |