|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.dataobjs.DBCommand
public class DBCommand
A wrapper for some common SQL command sequences
| Constructor Summary | |
|---|---|
DBCommand()
|
|
| Method Summary | |
|---|---|
void |
close()
|
static int |
executeUpdate(java.sql.Connection oCon,
java.lang.String sSQL)
Execute an INSERT or UPDATE statement |
static java.math.BigDecimal |
queryBigDecimal(java.sql.Connection oCon,
java.lang.String sSQL)
Execute a SQL query and get a BigDecimal value as result |
static int |
queryCount(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
Execute a SQL query to count occurences of rows matching a criteria |
static java.util.Date |
queryDateTime(java.sql.Connection oCon,
java.lang.String sSQL)
Execute a SQL query and get a BigDecimal value as result |
static boolean |
queryExists(java.sql.Connection oCon,
java.lang.String sTable,
java.lang.String sWhere)
|
static java.lang.Integer |
queryInt(java.sql.Connection oCon,
java.lang.String sSQL)
Execute a SQL query and get an Integer value as result |
static java.lang.Object |
queryMax(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
Execute a SQL query to get the maximum value for a column |
static java.util.Date |
queryMaxDate(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
Execute a SQL query to get the maximum date value for a date column |
static java.lang.Integer |
queryMaxInt(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
Execute a SQL query to get the maximum value for a column of type INTEGER |
static java.lang.Object |
queryMin(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
Execute a SQL query to get the minimum value for a column |
static java.util.Date |
queryMinDate(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
Execute a SQL query to get the minimum value for a date column |
static java.lang.Integer |
queryMinInt(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
Execute a SQL query to get the maximum value for a column of type INTEGER |
java.sql.ResultSet |
queryResultSet(java.sql.Connection oCon,
java.lang.String sSQL)
Execute a SQL query and get a ResultSet |
static java.lang.Short |
queryShort(java.sql.Connection oCon,
java.lang.String sSQL)
Execute a SQL query and get a Short value as result |
static java.lang.String |
queryStr(java.sql.Connection oCon,
java.lang.String sSQL)
Execute a SQL query and get a String value as result |
static java.lang.String[] |
queryStrs(java.sql.Connection oCon,
java.lang.String sSQL)
Execute a SQL query and get an Array of Strings as result |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBCommand()
| Method Detail |
|---|
public void close()
throws java.sql.SQLException
java.sql.SQLException
public java.sql.ResultSet queryResultSet(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
public static boolean queryExists(java.sql.Connection oCon,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException
java.sql.SQLException
public static java.lang.Integer queryInt(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException,
java.lang.NumberFormatException,
java.lang.ClassCastException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
java.lang.NumberFormatException
java.lang.ClassCastException
public static java.lang.Short queryShort(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException,
java.lang.NumberFormatException,
java.lang.ClassCastException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
java.lang.NumberFormatException
java.lang.ClassCastException
public static java.lang.String queryStr(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
java.lang.NumberFormatException
java.lang.ClassCastException
public static java.lang.String[] queryStrs(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
java.lang.NumberFormatException
java.lang.ClassCastException
public static java.math.BigDecimal queryBigDecimal(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException,
java.lang.NumberFormatException,
java.lang.ClassCastException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
java.lang.NumberFormatException
java.lang.ClassCastException
public static java.lang.Object queryMax(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsColumn - Column NamesTable - Table NamesWhere - WHERE clause to restrict maximum search
java.sql.SQLException
public static java.lang.Object queryMin(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsColumn - Column NamesTable - Table NamesWhere - WHERE clause to restrict minimum search
java.sql.SQLException
public static java.util.Date queryMaxDate(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsColumn - Column NamesTable - Table NamesWhere - WHERE clause to restrict maximum search
java.sql.SQLException
public static java.util.Date queryMinDate(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsColumn - Column NamesTable - Table NamesWhere - WHERE clause to restrict minimum search
java.sql.SQLException
public static java.lang.Integer queryMaxInt(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException,
java.lang.NumberFormatException
oCon - Connection Open JDBC database connectionsColumn - Column NamesTable - Table NamesWhere - WHERE clause to restrict maximum search
java.sql.SQLException
java.lang.NumberFormatException
public static java.lang.Integer queryMinInt(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException,
java.lang.NumberFormatException
oCon - Connection Open JDBC database connectionsColumn - Column NamesTable - Table NamesWhere - WHERE clause to restrict maximum search
java.sql.SQLException
java.lang.NumberFormatException
public static int queryCount(java.sql.Connection oCon,
java.lang.String sColumn,
java.lang.String sTable,
java.lang.String sWhere)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsColumn - Column NamesTable - Table NamesWhere - WHERE clause to restrict counting
java.sql.SQLException
public static java.util.Date queryDateTime(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
java.lang.NumberFormatException
java.lang.ClassCastException
public static int executeUpdate(java.sql.Connection oCon,
java.lang.String sSQL)
throws java.sql.SQLException
oCon - Connection Open JDBC database connectionsSQL - String Command to be executed
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||