Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.datacache
Class QueryKey

    java.lang.Object
      |
      +--kodo.datacache.QueryKey

public class QueryKey
extends Object

This class stores information about a particular invocation of a query. It contains a reference to the external properties of the query that was executed, as well as any parameters used to execute that query, with one exception: first-class objects used as parameter values are converted to OIDs.

Constructor Summary
`QueryKey(KodoQuery q)`
`QueryKey(KodoQuery q, Map args)`
`QueryKey(KodoQuery q, Object arg)`
`QueryKey(KodoQuery q, Object[] args)`
`QueryKey(KodoQuery q, Object arg0, Object arg1)`
`QueryKey(KodoQuery q, Object arg0, Object arg1, Object arg2)`

Method Summary
`boolean` | `changeInvalidatesQuery(Collection changed)` Returns `true` if modifications to any of the classes in `changed` results in a possible invalidation of this query; otherwise returns `true`.
`boolean` | `equals(Object ob)` Determine equality based on identifying information.
`String` | `getCandidateClassName()` Returns the candidate class name for this query.
`int` | `getTimeout()` Return the number of milliseconds that this query is valid for, or `<= -1` if this query does not expire.
`int` | `hashCode()` Define a hashing algorithm corresponding to the `equals(java.lang.Object)` method defined above.
`protected void` | `initializeParams(Object[] args, KodoQuery query)` Convert an array of arguments into the corresponding parameter map, and do any FCO to OID conversion necessary.
`protected void` | `initializeQuery(KodoQuery q)` Extract the relevant identifying information from `q`.
`boolean` | `isCacheable()` Returns `true` if this query key represents a query that can be cached; otherwise returns `false`.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### QueryKey

    public QueryKey(KodoQuery q)

### QueryKey

    public QueryKey(KodoQuery q,
                    Object arg)

### QueryKey

    public QueryKey(KodoQuery q,
                    Object arg0,
                    Object arg1)

### QueryKey

    public QueryKey(KodoQuery q,
                    Object arg0,
                    Object arg1,
                    Object arg2)

### QueryKey

    public QueryKey(KodoQuery q,
                    Object[] args)

### QueryKey

    public QueryKey(KodoQuery q,
                    Map args)

Method Detail

### initializeQuery

    protected void initializeQuery(KodoQuery q)

  Extract the relevant identifying information from `q`. This includes information such as candidate class, query filter, etc.

### initializeParams

    protected void initializeParams(Object[] args,
                                    KodoQuery query)

  Convert an array of arguments into the corresponding parameter map, and do any FCO to OID conversion necessary.

### isCacheable

    public boolean isCacheable()

  Returns `true` if this query key represents a query that can be cached; otherwise returns `false`.

### equals

    public boolean equals(Object ob)

  Determine equality based on identifying information. Keys created for queries that specify a candidate collection are always not equal.
  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Define a hashing algorithm corresponding to the `equals(java.lang.Object)` method defined above.
  Overrides:
    `hashCode` in class `Object`

### changeInvalidatesQuery

    public boolean changeInvalidatesQuery(Collection changed)

  Returns `true` if modifications to any of the classes in `changed` results in a possible invalidation of this query; otherwise returns `true`. Invalidation is possible if one or more of the classes in this query key's access path has been changed.

### getTimeout

    public int getTimeout()

  Return the number of milliseconds that this query is valid for, or `<= -1` if this query does not expire.

### getCandidateClassName

    public String getCandidateClassName()

  Returns the candidate class name for this query.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.