public class ObjectIdQuery extends IndirectQuery
QueryMetadata
cache policies.
ObjectIdQuery is special - it is the only query that can be done against Cayenne main
cache, thus cache handling is significantly different from all other of the queries.Modifier and Type | Field and Description |
---|---|
static int |
CACHE |
static int |
CACHE_NOREFRESH |
static int |
CACHE_REFRESH |
protected int |
cachePolicy |
protected boolean |
fetchingDataRows |
protected QueryMetadata |
metadata |
protected EntityResolver |
metadataResolver |
protected ObjectId |
objectId |
dataMap, lastResolver, name, replacementQuery
Constructor and Description |
---|
ObjectIdQuery(ObjectId objectID)
Creates a refreshing ObjectIdQuery.
|
ObjectIdQuery(ObjectId objectId,
boolean fetchingDataRows,
int cachePolicy)
Creates a new ObjectIdQuery.
|
Modifier and Type | Method and Description |
---|---|
protected Query |
createReplacementQuery(EntityResolver resolver)
Creates a substitute query.
|
boolean |
equals(Object object)
An object is considered equal to this query if it is also a ObjectIdQuery with
an equal ObjectId.
|
int |
getCachePolicy() |
QueryMetadata |
getMetaData(EntityResolver resolver)
Returns query metadata object.
|
ObjectId |
getObjectId() |
int |
hashCode()
Implements a standard hashCode contract considering custom 'equals' implementation.
|
boolean |
isFetchAllowed() |
boolean |
isFetchingDataRows() |
boolean |
isFetchMandatory() |
String |
toString()
Overrides toString() outputting a short string with query class and ObjectId.
|
acceptVisitor, createSQLAction, getDataMap, getName, getReplacementQuery, route, setDataMap, setName
public static final int CACHE
public static final int CACHE_REFRESH
public static final int CACHE_NOREFRESH
protected ObjectId objectId
protected int cachePolicy
protected boolean fetchingDataRows
protected transient EntityResolver metadataResolver
protected transient QueryMetadata metadata
public ObjectIdQuery(ObjectId objectID)
public ObjectIdQuery(ObjectId objectId, boolean fetchingDataRows, int cachePolicy)
public QueryMetadata getMetaData(EntityResolver resolver)
getMetaData
in interface Query
getMetaData
in class IndirectQuery
public ObjectId getObjectId()
protected Query createReplacementQuery(EntityResolver resolver)
IndirectQuery
createReplacementQuery
in class IndirectQuery
public int getCachePolicy()
public boolean isFetchMandatory()
public boolean isFetchAllowed()
public boolean isFetchingDataRows()
public String toString()
public boolean equals(Object object)
Copyright © 2001–2015 Apache Cayenne. All rights reserved.