net.toften.jlips.persist.db
Class DBDefaultStatement
java.lang.Object
net.toften.jlips.persist.db.DBAbstractStatement
net.toften.jlips.persist.db.DBDefaultStatement
- All Implemented Interfaces:
- DBStatement
public class DBDefaultStatement
- extends DBAbstractStatement
- implements DBStatement
SQL statement implementation using SQL standard notation
This class extends the DBAbstractStatement
class and overrides the specific SQL statements for the:
- Select statement
- Update statement
- Insert statement
- Delete statement
This is the default implementation of the DBStatement
used by jLips if none is specified by the application.
- Version:
- $Revision: 1.1 $
- Author:
- thomas
Methods inherited from class net.toften.jlips.persist.db.DBAbstractStatement |
addEqualExpression, addReturnColumn, addSourceTable, appendColumnNames, appendPrimaryKeyEquals, appendStrings, appendTableNames, prepareConnection, release, setPrimaryKeyValue, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBDefaultStatement
public DBDefaultStatement()
buildSelectStatement
protected String buildSelectStatement()
throws DBBadPropertiesException
- Will build a standard SQL select statement
- Returns:
- String containing the select statement
- Throws:
DBBadPropertiesException
- if the provided properties are not correct or
sufficient to create a select statement
buildUpdateStatement
protected String buildUpdateStatement()
throws DBBadPropertiesException
- Throws:
DBBadPropertiesException
buildInsertStatement
protected String buildInsertStatement()
throws DBBadPropertiesException
- Throws:
DBBadPropertiesException
buildDeleteStatement
protected String buildDeleteStatement()
throws DBBadPropertiesException
- Throws:
DBBadPropertiesException
doSelect
public ResultSet doSelect()
throws SQLException,
DBBadPropertiesException
- Description copied from interface:
DBStatement
- Must execute a select statement on the database.
The implementation should build a select statement with the provided
data and return the ResultSet
Using doSelect
DOCUMENT ME!
- Specified by:
doSelect
in interface DBStatement
- Returns:
- ResultSet with the data returned from the database
- Throws:
SQLException
- Exception thrown by the database driver
DBBadPropertiesException
- if the properties are not correct
or sufficent to execute a select statement
doUpdate
public ResultSet doUpdate()
throws SQLException,
DBBadPropertiesException
- Specified by:
doUpdate
in interface DBStatement
- Throws:
SQLException
DBBadPropertiesException
doInsert
public ResultSet doInsert()
throws SQLException,
DBBadPropertiesException
- Specified by:
doInsert
in interface DBStatement
- Throws:
SQLException
DBBadPropertiesException
doDelete
public ResultSet doDelete()
throws SQLException,
DBBadPropertiesException
- Specified by:
doDelete
in interface DBStatement
- Throws:
SQLException
DBBadPropertiesException
printStatement
public void printStatement(String statementType)
throws DBBadPropertiesException
- Specified by:
printStatement
in interface DBStatement
- Throws:
DBBadPropertiesException