com.triactive.jdo.store
Interface Queryable

All Known Implementing Classes:
ClassBaseTableExtent, ClassViewExtent, HashSet, Set

public interface Queryable

Indicates an object that can be queried, such as an Extent or persistent collection.

Author:
Mike Martin
See Also:
QueryStatement

Method Summary
 QueryStatement newQueryStatement()
          Returns a prototypical query statement over the underlying collection.
 QueryStatement newQueryStatement(java.lang.Class candidateClass)
          Returns a prototypical query statement over the underlying collection, pre-filtered to include only objects of the specified class.
 Query.ResultObjectFactory newResultObjectFactory(QueryStatement stmt)
          Returns a suitable query result factory for results produced by the specified query.
 

Method Detail

newQueryStatement

public QueryStatement newQueryStatement()
Returns a prototypical query statement over the underlying collection.

The returned query statement selects all applicable rows from the relevant base table(s) and the column that represents the element or element ID. The statement can then be modified to join additional tables, select more columns, add WHERE conditions, etc.

Returns:
The new prototypical query statement.

newQueryStatement

public QueryStatement newQueryStatement(java.lang.Class candidateClass)
Returns a prototypical query statement over the underlying collection, pre-filtered to include only objects of the specified class.

Returns:
The new prototypical query statement.
Throws:
JDOUserException - If candidateClass is not the same as or a subclass of the defined element type for this collection.
See Also:
newQueryStatement()

newResultObjectFactory

public Query.ResultObjectFactory newResultObjectFactory(QueryStatement stmt)
Returns a suitable query result factory for results produced by the specified query.

The stmt argument must have been obtained by a previous call to newQueryStatement() on the same Queryable.

Returns:
A factory for creating PersistenceCapable objects from query results.


Copyright ? 2001 TriActive, Inc. All Rights Reserved.