com.jwpepper.inv
Interface Query

All Known Implementing Classes:
QueryImpl

public abstract interface Query
extends Entity

Specifies methods that need to be implemented by a query object. A query object represents a saved query of J.W. Pepper products for later reference. It includes the list of most recently generated results.
Last modified $Date: 1999/10/07 20:39:49 $

Version:
$Revision: 1.1 $
Author:
George Reese (george@ancept.com)

Field Summary
static java.lang.String CRITERIA
          The criteria attribute.
static java.lang.String CRT_CLASS
          The concrete class attribute.
static java.lang.String LAST_RESULTS
          The lastResults attribute.
static java.lang.String NAME
          The name attribute.
static java.lang.String USER
          The user atribute.
 
Method Summary
 void create(Identifier id, SearchCriteria sc, java.lang.String nom)
          Works like the other version of create(), but the query is saved to the data store.
 void create(SearchCriteria sc)
          Creates a new Query object based on the specified search criteria.
 void generateResults(Identifier id)
          Generates a new set of results based on this query's search criteria.
 SearchCriteria getCriteria()
          Provides the criteria on which this search is based.
 java.lang.String getName()
          Provides the name associated with this query.
 java.lang.String getUser()
          Provides the user ID of the person who owns this query.
 com.sun.java.util.collections.Iterator lastResults()
          Provides a list of the most recently generated results.
 
Methods inherited from interface com.imaginary.lwp.Entity
getLastUpdateID, getLastUpdateTime, getObjectID, getReference, remove
 

Field Detail

CRITERIA

public static final java.lang.String CRITERIA
The criteria attribute.

CRT_CLASS

public static final java.lang.String CRT_CLASS
The concrete class attribute.

LAST_RESULTS

public static final java.lang.String LAST_RESULTS
The lastResults attribute.

NAME

public static final java.lang.String NAME
The name attribute.

USER

public static final java.lang.String USER
The user atribute.
Method Detail

create

public void create(SearchCriteria sc)
            throws FindException,
                   java.rmi.RemoteException
Creates a new Query object based on the specified search criteria. This method does not save the query in the database. If a saved query is desired, then the other create method should be used. This method will perform an initial query.
Parameters:
sc - the search criteria to use for the query
Throws:
FindException - an error occurred performing the initial query
java.rmi.RemoteException - a network error occurred

create

public void create(Identifier id,
                   SearchCriteria sc,
                   java.lang.String nom)
            throws FindException,
                   PersistenceException,
                   java.rmi.RemoteException
Works like the other version of create(), but the query is saved to the data store.
Parameters:
id - the client identifier to use both for the query and to save the results
sc - the search criteria to use for the search
nom - the name to give the query
Throws:
FindException - an error occurred performing the query
PersistenceException - an error occurred saving the query
java.rmi.RemoteException - a network error occurred

generateResults

public void generateResults(Identifier id)
                     throws FindException,
                            PersistenceException,
                            java.rmi.RemoteException
Generates a new set of results based on this query's search criteria. You can then call lastResults to iterate through the newly generated results.
Parameters:
id - the identifier for the client
Throws:
FindException - an error occurred performing the query
PersistenceException - an error occurred saving the query
java.rmi.RemoteException - a network error occurred

getCriteria

public SearchCriteria getCriteria()
                           throws java.rmi.RemoteException
Provides the criteria on which this search is based.
Returns:
the search criteria
Throws:
java.rmi.RemoteException - a network error occurred

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
Provides the name associated with this query.
Returns:
the query name
Throws:
java.rmi.RemoteException - a network error occurred

getUser

public java.lang.String getUser()
                         throws java.rmi.RemoteException
Provides the user ID of the person who owns this query.
Returns:
the user ID of the query owner
Throws:
java.rmi.RemoteException - a network error occurred

lastResults

public com.sun.java.util.collections.Iterator lastResults()
                                                   throws java.rmi.RemoteException
Provides a list of the most recently generated results.
Returns:
the list of products matching the search criteria
Throws:
java.rmi.RemoteException - a network error occurred