EclipseLink 1.0.1 API Reference

org.eclipse.persistence.queries
Class DirectReadQuery

java.lang.Object
  extended by org.eclipse.persistence.queries.DatabaseQuery
      extended by org.eclipse.persistence.queries.ReadQuery
          extended by org.eclipse.persistence.queries.DataReadQuery
              extended by org.eclipse.persistence.queries.DirectReadQuery
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ValueReadQuery

public class DirectReadQuery
extends DataReadQuery

Purpose: Concrete class to perform a direct read.

Responsibilities: Used in conjunction with DirectCollectionMapping. This can be used to read a single column of data (i.e. one field). A container (implementing Collection) of the data values is returned.

See Also:
Serialized Form
Author:
Yvon Lavoie
Since:
TOPLink/Java 1.0

Field Summary
protected  Converter valueConverter
          Allows user defined conversion between the result value and the database value.
 
Fields inherited from class org.eclipse.persistence.queries.DataReadQuery
containerPolicy, useAbstractRecord
 
Fields inherited from class org.eclipse.persistence.queries.ReadQuery
fetchSize, firstResult, maxRows, queryId, queryResultCachingPolicy, temporaryCachedQueryResults
 
Fields inherited from class org.eclipse.persistence.queries.DatabaseQuery
accessor, arguments, argumentTypeNames, argumentTypes, argumentValues, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, doNotRedirect, executionSession, flushOnExecute, hintString, isCustomQueryUsed, isExecutionClone, isFromParseCache, isNativeConnectionRequired, isPrepared, isUserDefined, name, NoCascading, properties, queryMechanism, queryTimeout, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, translationRow
 
Constructor Summary
DirectReadQuery()
          PUBLIC: Initialize the state of the query.
DirectReadQuery(Call call)
          PUBLIC: Initialize the query to use the specified call.
DirectReadQuery(java.lang.String sqlString)
          PUBLIC: Initialize the query to use the specified SQL string.
 
Method Summary
 java.lang.Object buildObject(org.eclipse.persistence.internal.sessions.AbstractRecord row)
          INTERNAL: Used by cursored stream.
 java.lang.Object executeNonCursor()
          INTERNAL: The results are *not* in a cursor, build the collection.
 Converter getValueConverter()
          PUBLIC: Return the converter on the query.
 boolean isDirectReadQuery()
          PUBLIC: Return if this is a direct read query.
 void setValueConverter(Converter valueConverter)
          PUBLIC: Set the converter on the query.
 
Methods inherited from class org.eclipse.persistence.queries.DataReadQuery
cacheResult, clone, execute, executeDatabaseQuery, getContainerPolicy, isDataReadQuery, prepare, prepareForExecution, remoteExecute, setContainerPolicy, setUseAbstractRecord, useCollectionClass, useCursoredStream, useCursoredStream, useCursoredStream, useScrollableCursor, useScrollableCursor, useScrollableCursor
 
Methods inherited from class org.eclipse.persistence.queries.ReadQuery
cacheQueryResults, clearQueryResults, clonedQueryExecutionComplete, copyFromQuery, doNotCacheQueryResults, getFetchSize, getFirstResult, getMaxRows, getQueryId, getQueryResults, getQueryResults, getQueryResults, getQueryResultsCachePolicy, getTemporaryCachedQueryResults, isDefaultPropertiesQuery, isReadQuery, remoteExecute, setFetchSize, setFirstResult, setMaxRows, setQueryId, setQueryResults, setQueryResults, setQueryResultsCachePolicy, setTemporaryCachedQueryResults, shouldCacheQueryResults
 
Methods inherited from class org.eclipse.persistence.queries.DatabaseQuery
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkForCustomQuery, checkPrepare, checkPrepare, convertClassNamesToClasses, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, executeInUnitOfWork, extractRemoteResult, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDefaultRedirector, getDescriptor, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getJPQLString, getName, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getRedirector, getReferenceClass, getReferenceClassName, getSelectionCriteria, getSensorName, getSession, getSessionName, getShouldBindAllParameters, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isCustomQueryUsed, isCustomSelectionQuery, isDataModifyQuery, isDeleteAllQuery, isDeleteObjectQuery, isExecutionClone, isExpressionQuery, isFromParseCache, isInsertObjectQuery, isModifyAllQuery, isModifyQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, prepareCustomQuery, prepareForRemoteExecution, prepareFromQuery, redirectQuery, removeProperty, replaceValueHoldersIn, rowFromArguments, setAccessor, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setExecutionSession, setFlushOnExecute, setHintString, setIsCustomQueryUsed, setIsExecutionClone, setIsFromParseCache, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setJPQLString, setName, setProperties, setProperty, setQueryMechanism, setQueryTimeout, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSQLStatement, setSQLString, setTranslationRow, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

valueConverter

protected Converter valueConverter
Allows user defined conversion between the result value and the database value.

Constructor Detail

DirectReadQuery

public DirectReadQuery()
PUBLIC: Initialize the state of the query.


DirectReadQuery

public DirectReadQuery(java.lang.String sqlString)
PUBLIC: Initialize the query to use the specified SQL string. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.


DirectReadQuery

public DirectReadQuery(Call call)
PUBLIC: Initialize the query to use the specified call.

Method Detail

getValueConverter

public Converter getValueConverter()
PUBLIC: Return the converter on the query. A converter can be used to convert between the result value and database value.


setValueConverter

public void setValueConverter(Converter valueConverter)
PUBLIC: Set the converter on the query. A converter can be used to convert between the result value and database value.


buildObject

public java.lang.Object buildObject(org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL: Used by cursored stream. Return the first field in the row.

Overrides:
buildObject in class ReadQuery

executeNonCursor

public java.lang.Object executeNonCursor()
                                  throws DatabaseException,
                                         QueryException
INTERNAL: The results are *not* in a cursor, build the collection.

Overrides:
executeNonCursor in class DataReadQuery
Throws:
DatabaseException
QueryException

isDirectReadQuery

public boolean isDirectReadQuery()
PUBLIC: Return if this is a direct read query.

Overrides:
isDirectReadQuery in class DatabaseQuery

EclipseLink 1.0.1 API Reference