| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.engines.jdbcengine.datasource.DataSource
Encapsulates the connection to a data storage mechanism
| Method Summary | |
|  void | closeStatement(Statement statement)Closes the statement and removes it from the internal collection. | 
|  void | commit()Commits all changes executed against the persistent store. | 
|  Collection | executeQuery(String sql,
                         ClassMetaData classMetaData,
                         Criteria criteria,
                         int queryTimeout)Executes a query against the underlying data source. | 
|  void | executeUpdate(PreparedStatement stmt)Execute the input PreparedStatement. | 
|  void | executeUpdate(String sql)Executes the sql, which should be an update/insert/delete statement. | 
|  CallableStatement | getCallableStatement(String sql)Returns the CallableStatement object for the input sql. | 
|  String | getEngineType()Getter for property engineType, as defined in init.xml | 
|  Integer | getHitlistSize()Getter for property hitlistSize. | 
|  PreparedStatement | getPreparedStatement(String sql)Returns the PreparedStatement object for the input sql. | 
|  Statement | getStatement()Returns a Statement object. | 
|  Boolean | getUsePreparedStatement()Getter for property usePreparedStatement. | 
|  void | rollback()Rollback the changes executed against the persistent store. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
public void closeStatement(Statement statement)
                    throws SQLException
statement - the Statement object to be closed.
SQLException - if any database error occurs.
public Statement getStatement()
                       throws SQLException
SQLException - if any database error occurs.
public Collection executeQuery(String sql,
                               ClassMetaData classMetaData,
                               Criteria criteria,
                               int queryTimeout)
                        throws SQLException,
                               PostLoadFailedException,
                               DataSourceCursorRuntimeException,
                               IOException
sql - The query to execute.classMetaData - The ClassMetaData defintion to be used for molding the ResultSet into Persistent objects.criteria - The Criteria used for the query. This will provide the values to set the various flags on the Persistent object.queryTimeout - This will be used for setting the timeout value on the Statement object; zero means there is no limit.
SQLException - if any database error occurs.
PostLoadFailedException - if any error is thrown in the PostLoad trigger of the persistent object.
DataSourceCursorRuntimeException - if any error occurs while molding the row into the Persistent object.
IOException - if any error occurs in reading the data from the database.
public void executeUpdate(String sql)
                   throws SQLException
sql - the sql to execute.
SQLException - if any database error occurs.
public void executeUpdate(PreparedStatement stmt)
                   throws SQLException
stmt - the PreparedStatement to execute.
SQLException - if any database error occurs.
public PreparedStatement getPreparedStatement(String sql)
                                       throws SQLException
sql - the sql statement which needs to be precompiled.
SQLException - if any database error occurs.
public CallableStatement getCallableStatement(String sql)
                                       throws SQLException
sql - the sql statement.
SQLException - if any database error occurs.
public void commit()
            throws SQLException
SQLException - if any database error occurs.
public void rollback()
              throws SQLException
SQLException - if any database error occurs.public Integer getHitlistSize()
public String getEngineType()
public Boolean getUsePreparedStatement()
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||