| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvelosurf.sql.PooledStatement
velosurf.sql.PooledSimpleStatement
public class PooledSimpleStatement
this class encapsulates a jdbc Statement.
| Field Summary | |
|---|---|
| private  java.sql.Statement | statementwrapped statement. | 
| Fields inherited from class velosurf.sql.PooledStatement | 
|---|
| columnNames, connection, resultSet | 
| Constructor Summary | |
|---|---|
| PooledSimpleStatement(ConnectionWrapper connection,
                      java.sql.Statement statement)build a new PooledStatement. | |
| Method Summary | |
|---|---|
|  void | close()close this statement. | 
|  java.lang.Object | evaluate(java.lang.String query)evaluates the SQL query as a scalar. | 
|  java.lang.Object | fetch(java.lang.String query)fetch a single row. | 
|  java.lang.Object | fetch(java.lang.String query,
      Entity resultEntity)fetch a single row, specyfing the entity it belongs to. | 
|  java.lang.Object | get(java.lang.Object key)get specified column as an object. | 
|  ConnectionWrapper | getConnection()get statement's Connection. | 
|  long | getLastInsertID()gets the last insert id. | 
|  java.util.Set<java.lang.String> | keySet()Get keys set. | 
|  void | notifyOver()notify this statement is no more used and can be recycled. | 
|  RowIterator | query(java.lang.String query)get the resultset for this statement. | 
|  RowIterator | query(java.lang.String query,
      Entity resultEntity)get the resultset for this statement, specifying the entity the results belong to. | 
|  int | update(java.lang.String query)issue the update contained in the query. | 
| Methods inherited from class velosurf.sql.PooledStatement | 
|---|
| getTagTime, isInUse, isValid, notifyInUse, resetTagTime, setInvalid | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private java.sql.Statement statement
| Constructor Detail | 
|---|
public PooledSimpleStatement(ConnectionWrapper connection,
                             java.sql.Statement statement)
connection - database connectionstatement - wrapped Statement| Method Detail | 
|---|
public RowIterator query(java.lang.String query)
                  throws java.sql.SQLException
query - SQL query
java.sql.SQLException - thrown by the database engine
public RowIterator query(java.lang.String query,
                         Entity resultEntity)
                  throws java.sql.SQLException
query - SQL queryresultEntity - entity
java.sql.SQLException - thrown by the database engine
public java.lang.Object fetch(java.lang.String query)
                       throws java.sql.SQLException
query - SQL query
java.sql.SQLException - thrown by the database engine
public java.lang.Object fetch(java.lang.String query,
                              Entity resultEntity)
                       throws java.sql.SQLException
query - SQL queryresultEntity - entity
java.sql.SQLException - thrown by the database engine
public java.lang.Object get(java.lang.Object key)
                     throws java.sql.SQLException
key - column
java.sql.SQLException - thrown by the database engine
public java.util.Set<java.lang.String> keySet()
                                       throws java.sql.SQLException
RowHandler
java.sql.SQLException
public java.lang.Object evaluate(java.lang.String query)
                          throws java.sql.SQLException
query - SQL query
java.sql.SQLException - thrown by the database engine
public int update(java.lang.String query)
           throws java.sql.SQLException
query - SQL query
java.sql.SQLException - thrown by the database engine
public void close()
           throws java.sql.SQLException
close in class PooledStatementjava.sql.SQLException - thrown by the database enginepublic void notifyOver()
notifyOver in class PooledStatement
public long getLastInsertID()
                     throws java.sql.SQLException
java.sql.SQLException - thrown by the database enginepublic ConnectionWrapper getConnection()
getConnection in class PooledStatement| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||