org.apache.manifoldcf.core.database
Class QueryDescription

java.lang.Object
  extended by org.apache.manifoldcf.core.cachemanager.BaseDescription
      extended by org.apache.manifoldcf.core.database.QueryDescription
All Implemented Interfaces:
ICacheDescription

public class QueryDescription
extends BaseDescription

This object is immutable, and is used as a description for a cached query.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.manifoldcf.core.cachemanager.BaseDescription
BaseDescription.LocalCacheClass
 
Field Summary
static java.lang.String _rcsid
           
protected  java.lang.String cacheClassName
           
protected  java.lang.String criticalSectionName
           
protected  java.lang.String databaseName
           
protected  StringSet keys
           
protected  int maxReturn
           
protected  java.util.ArrayList parameters
           
protected  java.lang.String query
           
protected  ILimitChecker returnLimit
           
protected  ResultSpecification spec
           
 
Fields inherited from class org.apache.manifoldcf.core.cachemanager.BaseDescription
cacheClass, max_value
 
Constructor Summary
QueryDescription(java.lang.String databaseName, java.lang.String query, java.util.ArrayList parameters, java.lang.String cacheClassName, StringSet cacheKeys, int maxReturn, ResultSpecification spec, ILimitChecker returnLimit)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getCriticalSectionName()
          Get the critical section name for this description object.
 int getMaxReturn()
           
 StringSet getObjectKeys()
          Get the cache keys for an object (which may or may not exist yet in the cache).
 java.util.ArrayList getParameters()
           
 java.lang.String getQuery()
           
 ResultSpecification getResultSpecification()
           
 ILimitChecker getReturnLimit()
           
 int hashCode()
           
 
Methods inherited from class org.apache.manifoldcf.core.cachemanager.BaseDescription
getObjectClass, getObjectExpirationTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values

databaseName

protected java.lang.String databaseName

query

protected java.lang.String query

parameters

protected java.util.ArrayList parameters

criticalSectionName

protected java.lang.String criticalSectionName

cacheClassName

protected java.lang.String cacheClassName

keys

protected StringSet keys

maxReturn

protected int maxReturn

spec

protected ResultSpecification spec

returnLimit

protected ILimitChecker returnLimit
Constructor Detail

QueryDescription

public QueryDescription(java.lang.String databaseName,
                        java.lang.String query,
                        java.util.ArrayList parameters,
                        java.lang.String cacheClassName,
                        StringSet cacheKeys,
                        int maxReturn,
                        ResultSpecification spec,
                        ILimitChecker returnLimit)
Method Detail

getQuery

public java.lang.String getQuery()

getParameters

public java.util.ArrayList getParameters()

getMaxReturn

public int getMaxReturn()

getResultSpecification

public ResultSpecification getResultSpecification()

getReturnLimit

public ILimitChecker getReturnLimit()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getObjectKeys

public StringSet getObjectKeys()
Get the cache keys for an object (which may or may not exist yet in the cache). This method is called in order for cache manager to throw the correct locks.

Returns:
the object's cache keys, or null if the object should not be cached.

getCriticalSectionName

public java.lang.String getCriticalSectionName()
Description copied from interface: ICacheDescription
Get the critical section name for this description object. This is used to synchronize creation of the described object, and thus is used only for objects that will be cached. This method does not need to return decent results for objects that are never cached.

Returns:
the critical section name.