EclipseLink1.0 - 20080707 API Reference

org.eclipse.persistence.queries
Class ValueReadQuery

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
                  extended by org.eclipse.persistence.queries.ValueReadQuery
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ValueReadQuery
extends DirectReadQuery

Purpose: Concrete class to perform a read of a single data value.

Responsibilities: Used in conjunction with CursoredStream size and Platform getSequence. This can be used to read a single data value (i.e. one field). A single data value is returned, or null if no rows are returned.

See Also:
Serialized Form
Author:
James Sutherland
Since:
TOPLink/Java 1.2

Field Summary
 
Fields inherited from class org.eclipse.persistence.queries.DirectReadQuery
valueConverter
 
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
ValueReadQuery()
          PUBLIC: Initialize the state of the query.
ValueReadQuery(Call call)
          PUBLIC: Initialize the query to use the specified call.
ValueReadQuery(java.lang.String sqlString)
          PUBLIC: Initialize the query to use the specified SQL string.
 
Method Summary
 java.lang.Object executeDatabaseQuery()
          INTERNAL: Execute the query.
 boolean isValueReadQuery()
          PUBLIC: Return if this is a value read query.
 
Methods inherited from class org.eclipse.persistence.queries.DirectReadQuery
buildObject, executeNonCursor, getValueConverter, isDirectReadQuery, setValueConverter
 
Methods inherited from class org.eclipse.persistence.queries.DataReadQuery
cacheResult, clone, execute, 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, 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
 

Constructor Detail

ValueReadQuery

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


ValueReadQuery

public ValueReadQuery(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.


ValueReadQuery

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

Method Detail

executeDatabaseQuery

public java.lang.Object executeDatabaseQuery()
                                      throws DatabaseException
INTERNAL: Execute the query. Perform the work to execute the SQL string.

Overrides:
executeDatabaseQuery in class DataReadQuery
Returns:
Object the data value or null.
Throws:
DatabaseException - an error has occurred on the database

isValueReadQuery

public boolean isValueReadQuery()
PUBLIC: Return if this is a value read query.

Overrides:
isValueReadQuery in class DatabaseQuery

EclipseLink1.0 - 20080707 API Reference