|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvelosurf.sql.Pooled
velosurf.sql.PooledStatement
public class PooledStatement
this class encapsulates a jdbc Statement
| Field Summary | |
|---|---|
protected java.util.List |
columnNames
column names in natural order |
protected ConnectionWrapper |
connection
database connection |
protected java.lang.String |
query
SQL query |
protected java.sql.ResultSet |
resultSet
result set |
protected java.sql.Statement |
statement
wrapped statement |
| Fields inherited from class velosurf.sql.Pooled |
|---|
inUse, tagTime, useOver, valid |
| Constructor Summary | |
|---|---|
protected |
PooledStatement(ConnectionWrapper connection,
java.sql.Statement statement)
builds a new PooledStatement |
| Method Summary | |
|---|---|
void |
close()
close thos 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 |
keySet()
|
void |
notifyOver()
notify this statement is no more used and can be recycled |
RowIterator |
query(java.lang.String query)
gets the resultset for this statement |
RowIterator |
query(java.lang.String query,
Entity resultEntity)
gets the resultset for this statement, specifying the entity the results belong to |
int |
update(java.lang.String query)
issues the update contained in the query |
| Methods inherited from class velosurf.sql.Pooled |
|---|
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 |
|---|
protected java.lang.String query
protected ConnectionWrapper connection
protected java.sql.ResultSet resultSet
protected java.util.List columnNames
protected java.sql.Statement statement
| Constructor Detail |
|---|
protected PooledStatement(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
get in interface ReadOnlyMapkey - column
java.sql.SQLException - thrown by the database engine
public java.util.Set keySet()
throws java.sql.SQLException
keySet in interface ReadOnlyMapjava.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 Pooledjava.sql.SQLException - thrown by the database enginepublic void notifyOver()
notifyOver in class Pooled
public long getLastInsertID()
throws java.sql.SQLException
java.sql.SQLException - thrown by the database enginepublic ConnectionWrapper getConnection()
getConnection in class Pooled
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||