org.melati.poem
Class CachedSelection

Package class diagram package CachedSelection
java.lang.Object
  extended by org.melati.poem.CachedQuery
      extended by org.melati.poem.CachedSelection

public class CachedSelection
extends CachedQuery

A cached instance of an SQL select query.


Field Summary
 
Fields inherited from class org.melati.poem.CachedQuery
rows, statements, table
 
Constructor Summary
CachedSelection(Table table, String whereClause, String orderByClause)
          Constructor for a single Table query.
CachedSelection(Table table, String whereClause, String orderByClause, Table[] otherTables)
          Constructor.
 
Method Summary
 int count()
           
 Persistent firstObject()
           
 Persistent nth(int n)
           
 Enumeration objects()
           
 Enumeration<Integer> troids()
           
 
Methods inherited from class org.melati.poem.CachedQuery
compute, extract, getTable, setQuery, statements, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachedSelection

public CachedSelection(Table table,
                       String whereClause,
                       String orderByClause,
                       Table[] otherTables)
Constructor.

Parameters:
table - the primary Table we are selecting rows from
whereClause - SQL snippet
orderByClause - SQL snippet
otherTables - an Array of Tables which are also referenced in query

CachedSelection

public CachedSelection(Table table,
                       String whereClause,
                       String orderByClause)
Constructor for a single Table query.

Parameters:
table - the primary Table we are selecting rows from
whereClause - SQL snippet
orderByClause - SQL snippet
Method Detail

troids

public Enumeration<Integer> troids()
Returns:
an Enumeration of Table Row Object Ids

objects

public Enumeration objects()
Returns:
an Enumeration of Table Row ReferencePoemType objects

firstObject

public Persistent firstObject()
Returns:
the first, often only, result

nth

public Persistent nth(int n)
Parameters:
n - index into ResultSet
Returns:
the row corresponding to the index

count

public int count()
Returns:
the number of results


Copyright © 2000-2010 PanEris. All Rights Reserved.