public class DbSQL extends Object implements DatabaseListener
Constructor and Description |
---|
DbSQL() |
Modifier and Type | Method and Description |
---|---|
static void |
addSqlProperties(InputStream inStream) |
void |
databaseOpen(DatabaseServer dbServer) |
protected String |
getDbPassword() |
static String |
getDbType() |
protected String |
getDbUrl() |
protected String |
getDbUser() |
SqlPreparedStatementWrapper |
getPreparedStatement(String key) |
SqlPreparedStatementWrapper |
getPreparedStatement(String key,
int... params) |
static DbSQL |
getSingleton() |
static String |
getSQL(String key) |
static String |
getSQL(String key,
Object... params) |
Database |
initDatabase() |
void |
releasePreparedStatement(SqlPreparedStatementWrapper psw) |
static void |
setSetValues(PreparedStatement ps,
int startPosition,
int... values) |
static void |
setSetValues(PreparedStatement ps,
int startPosition,
String... values) |
public static DbSQL getSingleton()
protected String getDbUser()
protected String getDbPassword()
protected String getDbUrl()
public static String getDbType()
public Database initDatabase() throws IllegalStateException, DatabaseException
public static void addSqlProperties(InputStream inStream) throws IOException
IOException
public static void setSetValues(PreparedStatement ps, int startPosition, String... values) throws SQLException
SQLException
public static void setSetValues(PreparedStatement ps, int startPosition, int... values) throws SQLException
SQLException
public void databaseOpen(DatabaseServer dbServer) throws DatabaseException, DatabaseUnsupportedException
databaseOpen
in interface DatabaseListener
DatabaseException
DatabaseUnsupportedException
public SqlPreparedStatementWrapper getPreparedStatement(String key, int... params) throws SQLException
SQLException
public SqlPreparedStatementWrapper getPreparedStatement(String key) throws SQLException
SQLException
public void releasePreparedStatement(SqlPreparedStatementWrapper psw)