|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.toplink.queryframework.DatabaseQuery oracle.toplink.queryframework.ReadQuery oracle.toplink.queryframework.ObjectBuildingQuery oracle.toplink.queryframework.ObjectLevelReadQuery oracle.toplink.queryframework.ReadObjectQuery
public class ReadObjectQuery
Purpose: Concrete class for all read queries involving a single object.
Responsibilities: Return a single object for the query. Implements the inheritance feature when dealing with abstract descriptors.
Field Summary |
---|
Fields inherited from class oracle.toplink.queryframework.ObjectLevelReadQuery |
---|
CheckCacheByExactPrimaryKey, CheckCacheByPrimaryKey, CheckCacheOnly, CheckCacheThenDatabase, ConformResultsInUnitOfWork, DoNotCheckCache, DONT_USE_DISTINCT, UNCOMPUTED_DISTINCT, USE_DISTINCT, UseDescriptorSetting |
Fields inherited from class oracle.toplink.queryframework.ObjectBuildingQuery |
---|
DEFAULT_LOCK_MODE, LOCK, LOCK_NOWAIT, NO_LOCK |
Fields inherited from class oracle.toplink.queryframework.DatabaseQuery |
---|
CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, CascadePrivateParts, NoCascading |
Constructor Summary | |
---|---|
ReadObjectQuery()
Return a new read object query. |
|
ReadObjectQuery(Call call)
Return a new read object query. |
|
ReadObjectQuery(java.lang.Class classToRead)
Return a new read object query. |
|
ReadObjectQuery(java.lang.Class classToRead,
Call call)
Return a new read object query. |
|
ReadObjectQuery(java.lang.Class classToRead,
Expression selectionCriteria)
Return a new read object query for the class and the selection criteria. |
|
ReadObjectQuery(java.lang.Class classToRead,
ExpressionBuilder builder)
Return a new read object query for the class. |
|
ReadObjectQuery(ExpressionBuilder builder)
The expression builder should be provide on creation to ensure only one is used. |
|
ReadObjectQuery(java.lang.Object objectToRead)
Return a query to read the object with the same primary key as the provided object. |
|
ReadObjectQuery(java.lang.Object exampleObject,
QueryByExamplePolicy policy)
Return a query by example query to find an object matching the attributes of the example object. |
Method Summary | |
---|---|
void |
checkCache()
Deprecated. replaced by checkCacheByPrimaryKey |
void |
checkCacheByExactPrimaryKey()
The cache will be checked only if the query contains exactly the primary key. |
void |
checkCacheByPrimaryKey()
This is the default, the cache will be checked only if the query contains the primary key. |
void |
checkCacheThenDatabase()
The cache will be checked completely, then if the object is not found or the query too complex the database will be queried. |
void |
dontLoadResultIntoSelectionObject()
Do not refesh/load into the selection object, this is the default. |
java.util.Vector |
getSelectionKey()
The primary key can be specified if used instead of an expression or selection object. |
java.lang.Object |
getSelectionObject()
Return the selection object of the query. |
boolean |
isReadObjectQuery()
Return if this is a read object query. |
void |
loadResultIntoSelectionObject()
Allow for the selection object of the query to be refreshed or put into the TopLink cache. |
void |
setCheckCache(boolean checkCache)
Deprecated. replaced by setCacheUsage |
void |
setSelectionKey(java.util.Vector selectionKey)
The primary key can be specified if used instead of an expression or selection object. |
void |
setSelectionObject(java.lang.Object selectionObject)
Used to set the where clause of the query. |
void |
setShouldLoadResultIntoSelectionObject(boolean shouldLoadResultIntoSelectionObject)
Allow for the selection object of the query to be refreshed or put into the TopLink cache. |
void |
setSingletonSelectionKey(java.lang.Object selectionKey)
The primary key can be specified if used instead of an expression or selection object. |
boolean |
shouldCheckCache()
Return if the cache should be checked. |
boolean |
shouldCheckCacheByExactPrimaryKey()
Return if cache should be checked. |
boolean |
shouldCheckCacheByPrimaryKey()
Return if cache should be checked. |
boolean |
shouldCheckCacheThenDatabase()
Return if cache should be checked. |
boolean |
shouldLoadResultIntoSelectionObject()
return true if the result should be loaded into the passed in selection Object |
Methods inherited from class oracle.toplink.queryframework.ObjectBuildingQuery |
---|
isObjectBuildingQuery, setShouldUseExclusiveConnection, shouldUseExclusiveConnection |
Methods inherited from class oracle.toplink.queryframework.ReadQuery |
---|
cacheQueryResults, clearQueryResults, clearQueryResults, doNotCacheQueryResults, getFetchSize, getFirstResult, getMaxRows, getQueryResultsCachePolicy, isReadQuery, setFetchSize, setFirstResult, setMaxRows, setQueryResultsCachePolicy, setShouldCacheQueryResults, shouldCacheQueryResults |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReadObjectQuery()
public ReadObjectQuery(java.lang.Class classToRead)
ReadObjectQuery(Class, Call)
, ReadObjectQuery(Class, Expression)
, ReadObjectQuery(Class, ExpressionBuilder)
, ReadObjectQuery(ExpressionBuilder)
, ReadObjectQuery(Object)
, or ReadObjectQuery(Object, QueryByExamplePolicy)
.
public ReadObjectQuery(java.lang.Class classToRead, Expression selectionCriteria)
public ReadObjectQuery(java.lang.Class classToRead, ExpressionBuilder builder)
public ReadObjectQuery(java.lang.Class classToRead, Call call)
public ReadObjectQuery(Call call)
public ReadObjectQuery(java.lang.Object objectToRead)
public ReadObjectQuery(java.lang.Object exampleObject, QueryByExamplePolicy policy)
public ReadObjectQuery(ExpressionBuilder builder)
Method Detail |
---|
public void checkCache()
public void checkCacheByExactPrimaryKey()
ObjectLevelReadQuery.setCacheUsage(int)
public void checkCacheByPrimaryKey()
ObjectLevelReadQuery.setCacheUsage(int)
public void checkCacheThenDatabase()
ObjectLevelReadQuery.setCacheUsage(int)
public void dontLoadResultIntoSelectionObject()
Note: This forces the selection object into the cache a replaces any existing object that may already be there, this is a strict violation of object identity and other objects can still be refering to the old object.
public java.util.Vector getSelectionKey()
public java.lang.Object getSelectionObject()
public boolean isReadObjectQuery()
isReadObjectQuery
in class DatabaseQuery
public void loadResultIntoSelectionObject()
Note: This forces the selection object into the cache a replaces any existing object that may already be there, this is a strict violation of object identity and other objects can still be refering to the old object.
public void setCheckCache(boolean checkCache)
public void setSelectionKey(java.util.Vector selectionKey)
public void setSelectionObject(java.lang.Object selectionObject)
public void setShouldLoadResultIntoSelectionObject(boolean shouldLoadResultIntoSelectionObject)
Note: This forces the selection object into the cache a replaces any existing object that may already be there, this is a strict violation of object identity and other objects can still be refering to the old object.
public void setSingletonSelectionKey(java.lang.Object selectionKey)
public boolean shouldCheckCache()
public boolean shouldCheckCacheByExactPrimaryKey()
public boolean shouldCheckCacheByPrimaryKey()
public boolean shouldCheckCacheThenDatabase()
public boolean shouldLoadResultIntoSelectionObject()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |