org.melati.poem
Class CachedCount

Package class diagram package CachedCount
java.lang.Object
  extended by org.melati.poem.CachedQuery
      extended by org.melati.poem.CachedCount
Direct Known Subclasses:
CachedExists

public class CachedCount
extends CachedQuery

A cached instance of an SQL count query.


Field Summary
 
Fields inherited from class org.melati.poem.CachedQuery
rows, statements, table
 
Constructor Summary
CachedCount(Persistent criteria, boolean includeDeleted, boolean excludeUnselectable)
          Create a count from a Persistent.
CachedCount(Table table, String whereClause)
          Constructor where whereClause does not involve other tables.
CachedCount(Table table, String whereClause, Table[] otherTables)
          Constructor.
 
Method Summary
 int count()
           
 
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

CachedCount

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

Parameters:
table - the table of which we are a count
whereClause - discriminator, may be null
otherTables - other tables involved in whereClause, if any

CachedCount

public CachedCount(Persistent criteria,
                   boolean includeDeleted,
                   boolean excludeUnselectable)
Create a count from a Persistent.

Parameters:
criteria - the Persistent representing the query
includeDeleted - whether to include records marked as deleted
excludeUnselectable - Whether to append unselectable exclusion SQL

CachedCount

public CachedCount(Table table,
                   String whereClause)
Constructor where whereClause does not involve other tables.

Parameters:
table - the table to count
whereClause - discrimination, can be null
Method Detail

count

public int count()
Returns:
the count itself


Copyright © 2000-2010 PanEris. All Rights Reserved.