com.jenkov.mrpersister.itf
Class Database
java.lang.Object
com.jenkov.mrpersister.itf.Database
public class Database
- extends java.lang.Object
Signals the type of database a given IPersistenceConfiguration is targeted against.
The database type can be used to avoid calling JDBC methods that the given database
does not implement, or implements slightly differently than other databases etc.
- Author:
- Jakob Jenkov - Copyright 2005 Jenkov Development
Constructor Summary |
Database(java.lang.String name,
boolean preparedStatementParameterCountSupported,
boolean prepareStatementStatement_RETURN_GENERATED_KEYS_supported,
boolean resultSetGetRowSupported)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT
public static final Database DEFAULT
DAFFODIL
public static final Database DAFFODIL
DERBY
public static final Database DERBY
HSQLDB
public static final Database HSQLDB
H2
public static final Database H2
MYSQL
public static final Database MYSQL
POSTGRESQL
public static final Database POSTGRESQL
FIREBIRD
public static final Database FIREBIRD
name
protected java.lang.String name
isPreparedStatementParameterCountSupported
protected boolean isPreparedStatementParameterCountSupported
isPrepareStatementStatement_RETURN_GENERATED_KEYS_supported
protected boolean isPrepareStatementStatement_RETURN_GENERATED_KEYS_supported
isResultSetGetRowSupported
protected boolean isResultSetGetRowSupported
Database
public Database(java.lang.String name,
boolean preparedStatementParameterCountSupported,
boolean prepareStatementStatement_RETURN_GENERATED_KEYS_supported,
boolean resultSetGetRowSupported)
getName
public java.lang.String getName()
isPreparedStatementParameterCountSupported
public boolean isPreparedStatementParameterCountSupported()
isPrepareStatementStatement_RETURN_GENERATED_KEYS_supported
public boolean isPrepareStatementStatement_RETURN_GENERATED_KEYS_supported()
isResultSetGetRowSupported
public boolean isResultSetGetRowSupported()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
setDatabaseOnConfiguration
public static void setDatabaseOnConfiguration(IPersistenceConfiguration configuration,
java.sql.Connection connection)
determineDatabase
public static Database determineDatabase(java.sql.Connection connection)
main
public static void main(java.lang.String[] args)
throws java.sql.SQLException
- Throws:
java.sql.SQLException