setShouldRegisterResultsInUnitOfWork(boolean shouldRegisterResultsInUnitOfWork)
INTERNAL:
Set to false to have queries conform to a UnitOfWork without registering
any additional objects not already in that UnitOfWork.

void

setShouldUseExclusiveConnection(boolean shouldUseExclusiveConnection)
ADVANCED:
If the user has isolated data and specified that the client session should
use an exclusive connection then by setting this condition to true
EclipseLink will ensure that the query is executed through the exclusive
connection.

protected void

setWasDefaultLockMode(boolean wasDefaultLockMode)
INTERNAL:
Set if this query originally used the default lock mode.

boolean

shouldBuildNullForNullPk()
INTERNAL:
If primary key is null ObjectBuilder.buildObject returns null
in case this flag is set to true (instead of throwing exception).

shouldUseExclusiveConnection()
ADVANCED:
If the user has isolated data and specified that the client session should
use an exclusive connection then by setting this condition to true
EclipseLink will ensure that the query is executed through the exclusive
connection.

protected boolean

wasDefaultLockMode()
INTERNAL:
Return if this query originally used the default lock mode.

ObjectBuildingQuery

convertClassNamesToClasses

INTERNAL:
Convert all the class-name-based settings in this query to actual class-based
settings. This method is used when converting a project that has been built
with class names to a project with classes.

copyFromQuery

INTERNAL:
Copy all setting from the query.
This is used to morph queries from one type to the other.
By default this calls prepareFromQuery, but additional properties may be required
to be copied as prepareFromQuery only copies properties that affect the SQL.

prepareFromQuery

INTERNAL:
Prepare the query from the prepared query.
This allows a dynamic query to prepare itself directly from a prepared query instance.
This is used in the EJBQL parse cache to allow preparsed queries to be used to prepare
dynamic queries.
This only copies over properties that are configured through EJBQL.

dontRefreshRemoteIdentityMapResult

getFetchGroup

Return the fetch group set in the query.
If a fetch group is not explicitly set in the query, default fetch group optionally defined in the descriptor
would be used, unless the user explicitly calls query.setShouldUseDefaultFetchGroup(false).

getLockMode

public short getLockMode()

PUBLIC:
Return the current locking mode.

getDataResults

public java.util.List getDataResults()

INTERNAL:
Return all of the rows fetched by the query, used for 1-m joining.

getReferenceClassName

hasPartialAttributeExpressions

public boolean hasPartialAttributeExpressions()

INTERNAL:
Return if partial attributes.

isLockQuery

public boolean isLockQuery()

PUBLIC:
Answers if the query lock mode is known to be LOCK or LOCK_NOWAIT.
In the case of DEFAULT_LOCK_MODE and the query reference class being a CMP entity bean,
at execution time LOCK, LOCK_NOWAIT, or NO_LOCK will be decided.

If a single joined attribute was configured for pessimistic locking then
this will return true (after first execution) as the SQL contained a
FOR UPDATE OF clause.

ObjectBuildingQuery.DEFAULT_LOCK_MODE (default) and you have a CMP descriptor:
fine grained locking will occur.

Fine Grained Locking: On execution the reference class
and those of all joined attributes will be checked. If any of these have a
PessimisticLockingPolicy set on their descriptor, they will be locked in a
SELECT ... FOR UPDATE OF ... {NO WAIT}. Issues fewer locks
and avoids setting the lock mode on each query.

setShouldUseExclusiveConnection

ADVANCED:
If the user has isolated data and specified that the client session should
use an exclusive connection then by setting this condition to true
EclipseLink will ensure that the query is executed through the exclusive
connection. This may be required in certain cases. An example being
where database security will prevent a query joining to a secure table
from returning the correct results when executed through the shared
connection.

shouldRegisterResultsInUnitOfWork

public boolean shouldRegisterResultsInUnitOfWork()

INTERNAL:
Allows one to do conforming in a UnitOfWork without registering.
Queries executed on a UnitOfWork will only return working copies for objects
that have already been registered.

Extreme care should be taken in using this feature, for a user will
get back a mix of registered and original (unregistered) objects.

Best used with a WrapperPolicy where invoking on an object will trigger
its registration (CMP). Without a WrapperPolicy registerExistingObject
should be called on any object that you intend to change.

shouldUseExclusiveConnection

public boolean shouldUseExclusiveConnection()

ADVANCED:
If the user has isolated data and specified that the client session should
use an exclusive connection then by setting this condition to true
EclipseLink will ensure that the query is executed through the exclusive
connection. This may be required in certain cases. An example being
where database security will prevent a query joining to a secure table
from returning the correct results when executed through the shared
connection.

shouldReadAllMappings

public boolean shouldReadAllMappings()

INTERNAL:
Return if this is a full object query, not partial nor fetch group.

setShouldProcessResultsInUnitOfWork

ADVANCED:
Used for CMP only. This allows users to indicate whether cmp finders executed
at the beginning of a transaction should always be run against a UnitOfWork.
Defaults to true.

If set to false, then UnitOfWork allocation will be deferred until a business
method (including creates/removes) or finder with shouldProcessResultsInUnitOfWork == true
is invoked. Any finder executed before such a time, will do so against the
underlying ServerSession. Forcing finder execution to always go through a
UnitOfWork means the results will be cloned and cached in the UnitOfWork up
front. This is desired when the results will be accessed in the same transaction.

Note that finders executed with an unspecified transaction context will never
be executed against a UnitOfWork, even if this setting is true. This case may happen
with the NotSupported, Never, and Supports attributes.

shouldProcessResultsInUnitOfWork

public boolean shouldProcessResultsInUnitOfWork()

ADVANCED:
Used for CMP only. Indicates whether cmp finders executed at the beginning
of a transaction should always be run against a UnitOfWork.
Defaults to true.

If set to false, then UnitOfWork allocation will be deferred until a business
method (including creates/removes) or finder with shouldProcessResultsInUnitOfWork == true
is invoked. Any finder executed before such a time, will do so against the
underlying ServerSession. Forcing finder execution to always go through a
UnitOfWork means the results will be cloned and cached in the UnitOfWork up
front. This is desired when the results will be accessed in the same transaction.

Note that finders executed with an unspecified transaction context will never
be executed against a UnitOfWork, even if this setting is true. This case may happen
with the NotSupported, Never, and Supports attributes.