com.jwpepper.inv
Class QueryReference

java.lang.Object
  |
  +--com.imaginary.lwp.BaseReference
        |
        +--com.jwpepper.inv.QueryReference

public class QueryReference
extends BaseReference

See Also:
Serialized Form

Constructor Summary
QueryReference()
          Empty constructor required by serialization.
QueryReference(long oid)
          Constructs a reference that will point to the query with the specified objectID.
QueryReference(Query ent)
          Constructs a reference that will point to the specified query.
 
Method Summary
 void assign(long oid, com.sun.java.util.collections.HashMap vals)
          Assigns a reference that will point to the query whose values are represented in the specified map.
 void generateResults(Identifier id)
          Generates a new set of results based on the query criteria.
 SearchCriteria getCriteria()
          Provides the criteria for the query
 java.lang.String getName()
          Provides the name of the query.
 java.lang.String getUser()
          Provides the user ID of the user who owns the query
 com.sun.java.util.collections.Iterator lastResults()
          Provides the most recent list of products generated as results to this query.
 
Methods inherited from class com.imaginary.lwp.BaseReference
assign, assign, get, getEntity, getLastUpdateID, getLastUpdateTime, getObjectID, put, reconnect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryReference

public QueryReference()
Empty constructor required by serialization.

QueryReference

public QueryReference(long oid)
Constructs a reference that will point to the query with the specified objectID.
Parameters:
oid - the objectID of the target query

QueryReference

public QueryReference(Query ent)
               throws java.rmi.RemoteException
Constructs a reference that will point to the specified query.
Parameters:
ent - the query to be pointed at
Throws:
java.rmi.RemoteException - a network error occurred
Method Detail

assign

public void assign(long oid,
                   com.sun.java.util.collections.HashMap vals)
Assigns a reference that will point to the query whose values are represented in the specified map.
Parameters:
id - the objectID of the query
vals - the mapping of query values
Overrides:
assign in class BaseReference

generateResults

public void generateResults(Identifier id)
                     throws FindException,
                            PersistenceException,
                            java.rmi.RemoteException
Generates a new set of results based on the query criteria.
Parameters:
id - the client identifier to use for saving the new results
Throws:
FindException - an error occurred performing the query
PersistenceException - an error occurred saving the changes to the query
java.rmi.RemoteException - a network error occurred

getCriteria

public SearchCriteria getCriteria()
                           throws java.rmi.RemoteException
Provides the criteria for the query
Returns:
the criteria for the query
Throws:
java.rmi.RemoteException - a network error occurred

getName

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

getUser

public java.lang.String getUser()
                         throws java.rmi.RemoteException
Provides the user ID of the user who owns the 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 the most recent list of products generated as results to this query. This list can of course differ from what would match now from the data store. To update the list, call generateResults()
Returns:
the most recent results
Throws:
java.rmi.RemoteException - a network error occurred