org.melati.poem
Class CachedQuery
java.lang.Object
org.melati.poem.CachedQuery
- Direct Known Subclasses:
- CachedCount, CachedSelection
public abstract class CachedQuery
- extends Object
Object to return the results of a query with caching.
Cached results will be returned unless the relevant tables
have been updated since the query was last executed, in which case
the results will be recomputed.
statements
protected PreparedStatementFactory statements
rows
protected Vector<Integer> rows
table
protected Table table
CachedQuery
public CachedQuery(Table table,
String query,
Table[] otherTables)
- Constructor.
- Parameters:
table
- the table to select fromquery
- the SQL query stringotherTables
- an array of other tables involved in the query
statements
protected PreparedStatementFactory statements()
extract
protected Object extract(ResultSet rs)
throws SQLException
- Throws:
SQLException
compute
protected void compute()
getTable
public Table getTable()
- Returns:
- the table property
setQuery
protected void setQuery(String query)
- Used in constructor of
CachedSelection
.
- Parameters:
query
- the query to set
toString
public String toString()
-
- Overrides:
toString
in class Object
- See Also:
Object.toString()
Copyright © 2000-2010 PanEris. All Rights Reserved.