|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--velosurf.sql.Pooled | +--velosurf.sql.PooledStatement
this class encapsulates a jdbc Statement
Field Summary | |
protected java.util.List |
mColumnNames
column names in natural order |
protected DBConnection |
mDBConnection
database connection |
protected java.lang.String |
mQuery
SQL query |
protected java.sql.ResultSet |
mRS
result set |
protected java.sql.Statement |
mStatement
wrapped statement |
Fields inherited from class velosurf.sql.Pooled |
mInUse, mTagTime, mUseOver |
Constructor Summary | |
protected |
PooledStatement(DBConnection inDBConnection,
java.sql.Statement inStatement)
builds a new PooledStatement |
Method Summary | |
void |
close()
close thos statement |
java.lang.Object |
evaluate(java.lang.String inQuery)
evaluates the SQL query as a scalar |
java.lang.Object |
fetch(java.lang.String inQuery)
fetch a single row |
java.lang.Object |
fetch(java.lang.String inQuery,
Entity inResultEntity)
fetch a single row, specyfing the entity it belongs to |
java.lang.Object |
get(java.lang.Object key)
get specified column as an object |
long |
getLastInsertID()
gets the last insert id |
void |
notifyOver()
notify this statement is no more used and can be recycled |
RowIterator |
query(java.lang.String inQuery)
gets the resultset for this statement |
RowIterator |
query(java.lang.String inQuery,
Entity inResultEntity)
gets the resultset for this statement, specifying the entity the results belong to |
int |
update(java.lang.String inQuery)
issues the update contained in the query |
Methods inherited from class velosurf.sql.Pooled |
getTagTime, isInUse, notifyInUse, resetTagTime |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String mQuery
protected DBConnection mDBConnection
protected java.sql.ResultSet mRS
protected java.util.List mColumnNames
protected java.sql.Statement mStatement
Constructor Detail |
protected PooledStatement(DBConnection inDBConnection, java.sql.Statement inStatement)
inDBConnection
- database connectioninStatement
- wrapped StatementMethod Detail |
public RowIterator query(java.lang.String inQuery) throws java.sql.SQLException
inQuery
- SQL queryjava.sql.SQLException
- thrown by the database enginepublic RowIterator query(java.lang.String inQuery, Entity inResultEntity) throws java.sql.SQLException
inQuery
- SQL queryinResultEntity
- entityjava.sql.SQLException
- thrown by the database enginepublic java.lang.Object fetch(java.lang.String inQuery) throws java.sql.SQLException
inQuery
- SQL queryjava.sql.SQLException
- thrown by the database enginepublic java.lang.Object fetch(java.lang.String inQuery, Entity inResultEntity) throws java.sql.SQLException
inQuery
- SQL queryinResultEntity
- entityjava.sql.SQLException
- thrown by the database enginepublic java.lang.Object get(java.lang.Object key) throws java.sql.SQLException
get
in interface DataAccessor
key
- columnjava.sql.SQLException
- thrown by the database enginepublic java.lang.Object evaluate(java.lang.String inQuery) throws java.sql.SQLException
inQuery
- SQL queryjava.sql.SQLException
- thrown by the database enginepublic int update(java.lang.String inQuery) throws java.sql.SQLException
inQuery
- SQL queryjava.sql.SQLException
- thrown by the database enginepublic void close() throws java.sql.SQLException
close
in class Pooled
java.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 engine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |