public interface DBUtil
Modifier and Type | Method and Description |
---|---|
void |
closeSilent(Connection conn)
close silently a SQL Connection
|
void |
closeSilent(ResultSet rs)
close silently a SQL ResultSet
|
void |
closeSilent(Statement stat)
close silently a SQL Statement
|
String |
getColumnName(ResultSetMetaData meta,
int column) |
Collection.Key[] |
getColumnNames(Query qry) |
String |
getDatabaseName(DatasourceConnection dc) |
DatasourceConnection |
getDatasourceConnection(PageContext pc,
DataSource datasource,
String user,
String pass) |
DatasourceConnection |
getDatasourceConnection(PageContext pc,
String datasourceName,
String user,
String pass) |
Object |
getObject(ResultSet rs,
int columnIndex,
Class type) |
Object |
getObject(ResultSet rs,
String columnLabel,
Class type) |
boolean |
isOracle(Connection conn)
checks if this is a oracle connection
|
void |
releaseDatasourceConnection(Config config,
DatasourceConnection dc,
boolean async) |
void |
setValue(PageContext pc,
TimeZone tz,
PreparedStatement stat,
int parameterIndex,
SQLItem item)
fill a SQLItem to into a PreparedStatement
|
void |
setValue(TimeZone tz,
PreparedStatement stat,
int parameterIndex,
SQLItem item)
Deprecated.
|
Blob |
toBlob(Connection conn,
Object value)
create a blog Object
|
Clob |
toClob(Connection conn,
Object value)
create a clob Object
|
SQL |
toSQL(String sql,
SQLItem[] items) |
SQLItem |
toSQLItem(Object value,
int type) |
Object |
toSqlType(SQLItem item)
converts the value defined inside a SQLItem to the type defined in stat
item
|
int |
toSQLType(String strType)
cast a String SQL Type to type defined in java.sql.Types
|
String |
toString(SQLItem item)
Cast a SQL Item to a String (Display) Value
|
String |
toStringType(int type)
cast a type defined in java.sql.Types to String SQL Type
|
Object toSqlType(SQLItem item) throws PageException
PageException
@Deprecated void setValue(TimeZone tz, PreparedStatement stat, int parameterIndex, SQLItem item) throws PageException, SQLException
PageException
SQLException
void setValue(PageContext pc, TimeZone tz, PreparedStatement stat, int parameterIndex, SQLItem item) throws PageException, SQLException
tz
- stat
- parameterIndex
- item
- PageException
SQLException
String toString(SQLItem item)
item
- String toStringType(int type) throws PageException
type
- PageException
int toSQLType(String strType) throws PageException
strType
- PageException
Blob toBlob(Connection conn, Object value) throws PageException, SQLException
conn
- value
- PageException
SQLException
Clob toClob(Connection conn, Object value) throws PageException, SQLException
conn
- value
- PageException
SQLException
boolean isOracle(Connection conn)
conn
- String getDatabaseName(DatasourceConnection dc) throws SQLException
SQLException
void closeSilent(Statement stat)
stat
- void closeSilent(Connection conn)
conn
- void closeSilent(ResultSet rs)
rs
- void releaseDatasourceConnection(Config config, DatasourceConnection dc, boolean async)
DatasourceConnection getDatasourceConnection(PageContext pc, DataSource datasource, String user, String pass) throws PageException
PageException
DatasourceConnection getDatasourceConnection(PageContext pc, String datasourceName, String user, String pass) throws PageException
PageException
Collection.Key[] getColumnNames(Query qry)
String getColumnName(ResultSetMetaData meta, int column) throws SQLException
SQLException
Object getObject(ResultSet rs, int columnIndex, Class type) throws SQLException
SQLException
Object getObject(ResultSet rs, String columnLabel, Class type) throws SQLException
SQLException
Copyright © 2016. All rights reserved.