java.lang.Objectorg.objectweb.telosys.dal.sql.SqlTool
Constructor Summary | |
SqlTool()
|
Method Summary | |
static boolean |
close(java.sql.ResultSet rs)
Closes the given result set |
static java.lang.String |
connectionStatus(java.sql.Connection con)
Returns a description about the given connection ( autocomit + isolation level ) |
static java.sql.ResultSet |
executeSelect(java.sql.Connection con,
java.lang.String sSql,
java.lang.Object[] aParameters)
Execute a SQL "SELECT" with or without parameters and return a ResultSet |
static java.lang.Object |
getColValue(java.sql.ResultSet rs,
int iCol,
int iColType)
Returns a column value from a ResultSet ( value can be null ) |
static int |
getIsolationLevel(java.lang.String sIsolationLevel,
int iDefaultValue)
Returns the "isolation level" integer value according to the given string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SqlTool()
Method Detail |
public static java.lang.String connectionStatus(java.sql.Connection con)
con
-
public static int getIsolationLevel(java.lang.String sIsolationLevel, int iDefaultValue)
sIsolationLevel
- e.g. "TRANSACTION_NONE", "TRANSACTION_READ_COMMITTED", etciDefaultValue
-
public static java.sql.ResultSet executeSelect(java.sql.Connection con, java.lang.String sSql, java.lang.Object[] aParameters) throws java.sql.SQLException
con
- the connection to usesSql
- the SQL SELECTaParameters
-
java.sql.SQLException
public static boolean close(java.sql.ResultSet rs)
rs
- : the ResultSet to close
public static java.lang.Object getColValue(java.sql.ResultSet rs, int iCol, int iColType) throws java.sql.SQLException
rs
- iCol
- iColType
-
java.sql.SQLException