com.triactive.jdo.store.query
Interface Queryable

All Known Subinterfaces:
PersistentSet
All Known Implementing Classes:
HashSet

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
 boolean alreadyDistinct()
          Indicates whether or not the candidate collection contains a set of distinct (unique) objects.
 java.lang.Class getCandidateClass()
          Returns the default class of candidate objects contained in this queryable collection.
 SqlExpression newQueryStatement(java.lang.Class candidateClass)
          Creates a prototypical query statement over the underlying collection, pre-filtered to include only objects of the specified class.
 

Method Detail

getCandidateClass

public java.lang.Class getCandidateClass()
Returns the default class of candidate objects contained in this queryable collection.

Returns:
The default candidate class.

alreadyDistinct

public boolean alreadyDistinct()
Indicates whether or not the candidate collection contains a set of distinct (unique) objects.

Returns:
true if the candidate objects are all unique, false if there may be duplicates.

newQueryStatement

public SqlExpression newQueryStatement(java.lang.Class candidateClass)
Creates a prototypical query statement over the underlying collection, pre-filtered to include only objects of the specified class. The return value is an SQL expression within the query statement representing the candidate objects. No result columns have been selected in the statement.

Parameters:
candidateClass - The class of objects to query over.
Returns:
An SQL expression within the new prototypical query statement which represents the candidate objects.
Throws:
javax.jdo.JDOUserException - If candidateClass is not the same as or a subclass of the defined element type for this collection.


Copyright © 2001-2007 The TJDO Project All Rights Reserved.