|
MDi JLib 1.7.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SQLSet
An object that defines an encapsulated connection, statement and records.
A query is performed with establishes the basic set of data available to the object. The object may also use the sql to perform updates on the target of the data by changing only the arguments passed to the object. The sql need only be set once for a particular set of data or update target and modified as necessary through the use of the said arguments to the statement.
Data may be accessed generically as an Object or as a primitive type such as int and may be addressed by simple name or by index position. This pertains to both records and columns within the record.
Once the data is established, full meta-data related to the connection is also available from the object. This is beneficial when many objects are created with varying connections to possibly different types of databases.
Revision History
Version 1.0 Jan 19, 2005 Created (SQLDataSet for Oracle only)
Version 1.1 Feb 24, 2005 Added connection pool compatibility and bug fixes to primitive return types
Version 1.2 Mar 06, 2005 Added compatibility with MySQL by removing Oracle specific types and navigation
Version 1.3 Apr 16, 2005 Added update capability, deprecated SQLDataSet, replaced setData with query, added single parameter calls
Version 1.4 Oct 10, 2005 Added constants for list types, added as String for backward compatibility
Version 1.5 Sep 24, 2006 Added discreet commit processing compatibility
Field Summary | |
---|---|
static String |
ARG_NAMES_TYPE
Argument Names List Type constant |
static String |
ARG_TYPES_TYPE
Argument Types List Type constant |
static String |
ARG_VALUES_TYPE
Argument Values List Type constant |
static boolean |
OFF
Boolean 'Off' |
static boolean |
ON
Boolean 'On' |
static String |
PROP_CONN
SQL connection property |
static String |
PROP_SQL
SQL to be executed property |
Field Detail |
---|
static final String ARG_NAMES_TYPE
static final String ARG_TYPES_TYPE
static final String ARG_VALUES_TYPE
static final boolean ON
static final boolean OFF
static final String PROP_CONN
static final String PROP_SQL
Method Detail |
---|
void finalize() throws Throwable
Throwable
ArrayList getArguments(String type)
Object[][] toObjectArray()
String[][] toStringArray()
Connection getConnection()
String getConnectionURL() throws SQLException
SQLException
int getColumnPosition(String columnName)
String getTableName(int i)
String getString(String columnName) throws SQLException
SQLException
int getInt(String columnName) throws SQLException
SQLException
Date getDate(String columnName) throws SQLException
SQLException
float getFloat(String columnName) throws SQLException
SQLException
BigDecimal getBigDecimal(String columnName) throws Exception
Exception
Blob getBlob(String columnName) throws SQLException
SQLException
Date getDate(String columnName, Calendar cal) throws Exception
Exception
Time getTime(String columnName, Calendar cal) throws Exception
Exception
Time getTime(String columnName) throws SQLException
SQLException
double getDouble(String columnName) throws SQLException
SQLException
Clob getClob(String columnName) throws SQLException
SQLException
String getColumnType(String columnName) throws SQLException
SQLException
void beforeFirst() throws SQLException
SQLException
void afterLast() throws SQLException
SQLException
boolean next() throws SQLException
SQLException
void nextRecord() throws SQLException
SQLException
boolean previous() throws SQLException
SQLException
void previousRecord() throws SQLException
SQLException
void first() throws SQLException
SQLException
void last() throws SQLException
SQLException
Object getObject(int row, int column) throws SQLException
SQLException
Object getObject(int row, String columnName) throws SQLException
SQLException
Object getObject(String columnName) throws SQLException
SQLException
Object getObject(int i) throws SQLException
SQLException
ResultSet getResultSet()
void setConnection(Connection c) throws SQLException
SQLException
int getSize()
String[] getColumnNames()
int getColumnCount()
String getColumnType(int i)
boolean isEmpty()
void setArgs(String[] args)
void setArguments(ArrayList nameList, ArrayList typeList, ArrayList valueList)
void close() throws SQLException
SQLException
void clearArgs()
void setArg(String arg)
void setSql(String s)
String getSql()
boolean hasData()
void setCurrentRow(int i) throws SQLException
SQLException
int getCurrentRow()
int getRow()
int getRowCount()
String getColumnName(int i)
void query() throws SQLException
SQLException
void query(String sql) throws SQLException
SQLException
void query(String[] args) throws SQLException
SQLException
void query(String sql, String[] args) throws SQLException
SQLException
void query(Connection conn, String sql, String[] args) throws SQLException
SQLException
void query(Connection conn, String sql) throws SQLException
SQLException
String getSqlProperty()
void setSqlProperty(String value)
Connection getConnProperty()
void setRowCount()
void setConnProperty(Connection value) throws SQLException
SQLException
void addPropertyChangeListener(PropertyChangeListener listener)
void removePropertyChangeListener(PropertyChangeListener listener)
int update() throws SQLException
SQLException
int update(String[] args) throws SQLException
SQLException
int update(String sql, String[] args) throws SQLException
SQLException
int update(Connection conn, String sql) throws SQLException
SQLException
int update(Connection conn, String sql, String[] args) throws SQLException
SQLException
void setAutoCommit(boolean state)
void setCommitting(boolean state)
void setAutoRollback(boolean state)
boolean doCommit()
boolean doRollback(Savepoint sp)
boolean doRollback()
boolean getAutoCommit()
boolean getCommitting()
boolean getAutoRollback()
Savepoint setSavePoint()
Savepoint setSavePoint(String s)
void releaseSavepoint(Savepoint sp)
|
MDi JLib 1.7.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |