|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.config.dbplatform.DatabasePlatform
public class DatabasePlatform
Database platform specific settings.
Constructor Summary | |
---|---|
DatabasePlatform()
Instantiates a new database platform. |
Method Summary | |
---|---|
String |
convertQuotedIdentifiers(String dbName)
Convert backticks to the platform specific open quote and close quote |
IdGenerator |
createSequenceIdGenerator(BackgroundExecutor be,
DataSource ds,
String seqName,
int batchSize)
Return a DB Sequence based IdGenerator. |
int |
getBlobDbType()
Return the data type that should be used for Blob. |
int |
getBooleanDbType()
Return the JDBC type used to store booleans. |
String |
getCloseQuote()
Return the close quote for quoted identifiers. |
DbDdlSyntax |
getDbDdlSyntax()
Return the DDL syntax for this platform. |
DbEncrypt |
getDbEncrypt()
Return the DbEncrypt handler for this DB platform. |
DbIdentity |
getDbIdentity()
Return the DB identity/sequence features for this platform. |
DbTypeMap |
getDbTypeMap()
Return the mapping of JDBC to DB types. |
String |
getName()
Return the name of the DatabasePlatform. |
String |
getOpenQuote()
Return the open quote for quoted identifiers. |
SqlLimiter |
getSqlLimiter()
Return the SqlLimiter used to apply additional sql around a query to limit its results. |
boolean |
isIdInExpandedForm()
Return true if a compound ID in (...) type expression needs to be in expanded form of (a=? and b=?) or (a=? and b=?) or ... |
boolean |
isTreatEmptyStringsAsNull()
Return true if empty strings should be treated as null. |
void |
setDbEncrypt(DbEncrypt dbEncrypt)
Set the DbEncrypt handler for this DB platform. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabasePlatform()
Method Detail |
---|
public String getName()
"generic" is returned when no specific database platform has been set or found.
public IdGenerator createSequenceIdGenerator(BackgroundExecutor be, DataSource ds, String seqName, int batchSize)
be
- the BackgroundExecutor that can be used to load the sequence
if desiredds
- the DataSourceseqName
- the name of the sequencebatchSize
- the number of sequences that should be loadedpublic DbEncrypt getDbEncrypt()
public void setDbEncrypt(DbEncrypt dbEncrypt)
public DbTypeMap getDbTypeMap()
public DbDdlSyntax getDbDdlSyntax()
public String getCloseQuote()
public String getOpenQuote()
public int getBooleanDbType()
public int getBlobDbType()
This is typically Types.BLOB but for Postgres is Types.LONGVARBINARY for example.
public boolean isTreatEmptyStringsAsNull()
public boolean isIdInExpandedForm()
public DbIdentity getDbIdentity()
public SqlLimiter getSqlLimiter()
Basically add the clauses for limit/offset, rownum, row_number().
public String convertQuotedIdentifiers(String dbName)
Specific plugins may implement this method to cater for platform specific naming rules.
dbName
- the db name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |