/** * INTERNAL: * Execute the query. If there are objects in the cache return the results * of the cache lookup. * * @param session - the session in which the receiver will be executed. * @exception DatabaseException - an error has occurred on the database. * @exception OptimisticLockException - an error has occurred using the optimistic lock feature. * @return An object, the result of executing the query. */ @Override public Object execute(AbstractSession session, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException { //Bug#2839852 Refreshing is not possible if the query uses checkCacheOnly. if (shouldRefreshIdentityMapResult() && shouldCheckCacheOnly()) { throw QueryException.refreshNotPossibleWithCheckCacheOnly(this); } return super.execute(session, translationRow); }
/** * INTERNAL: * Execute the query. If there are objects in the cache return the results * of the cache lookup. * * @param session - the session in which the receiver will be executed. * @exception DatabaseException - an error has occurred on the database. * @exception OptimisticLockException - an error has occurred using the optimistic lock feature. * @return An object, the result of executing the query. */ public Object execute(AbstractSession session, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException { //Bug#2839852 Refreshing is not possible if the query uses checkCacheOnly. if (shouldRefreshIdentityMapResult() && shouldCheckCacheOnly()) { throw QueryException.refreshNotPossibleWithCheckCacheOnly(this); } return super.execute(session, translationRow); }
/** * INTERNAL: * Execute the query. If there are objects in the cache return the results * of the cache lookup. * * @param session - the session in which the receiver will be executed. * @exception DatabaseException - an error has occurred on the database. * @exception OptimisticLockException - an error has occurred using the optimistic lock feature. * @return An object, the result of executing the query. */ @Override public Object execute(AbstractSession session, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException { //Bug#2839852 Refreshing is not possible if the query uses checkCacheOnly. if (shouldRefreshIdentityMapResult() && shouldCheckCacheOnly()) { throw QueryException.refreshNotPossibleWithCheckCacheOnly(this); } return super.execute(session, translationRow); }
/** * If the reference object is mapped thru one to one mapping and the object derives its primary key value * from this relationship then remote value holder has a primary key row for. */ protected boolean canDoCacheCheck() { if ((getMapping() == null) || (getQuery() == null)) { return false; } return (getTargetObjectPrimaryKeys() != null) && (!getTargetObjectPrimaryKeys().isEmpty()) && getMapping().isOneToOneMapping() && (!getQuery().shouldRefreshIdentityMapResult()) && (!getQuery().shouldRefreshRemoteIdentityMapResult()) && (getQuery().shouldMaintainCache()); }
/** * If the reference object is mapped thru one to one mapping and the object derives its primary key value * from this relationship then remote value holder has a primary key row for. */ protected boolean canDoCacheCheck() { if ((getMapping() == null) || (getQuery() == null)) { return false; } return (getTargetObjectPrimaryKeys() != null) && getMapping().isOneToOneMapping() && (!getQuery().shouldRefreshIdentityMapResult()) && (!getQuery().shouldRefreshRemoteIdentityMapResult()) && (getQuery().shouldMaintainCache()); }
/** * If the reference object is mapped thru one to one mapping and the object derives its primary key value * from this relationship then remote value holder has a primary key row for. */ protected boolean canDoCacheCheck() { if ((getMapping() == null) || (getQuery() == null)) { return false; } return (getTargetObjectPrimaryKeys() != null) && getMapping().isOneToOneMapping() && (!getQuery().shouldRefreshIdentityMapResult()) && (!getQuery().shouldRefreshRemoteIdentityMapResult()) && (getQuery().shouldMaintainCache()); }
if (readQuery.shouldRefreshIdentityMapResult()) { method.addLine(queryIdentifier + ".setShouldRefreshIdentityMapResult(" + String.valueOf(readQuery.shouldRefreshIdentityMapResult()) + ");");
if (readQuery.shouldRefreshIdentityMapResult()) { method.addLine(queryIdentifier + ".setShouldRefreshIdentityMapResult(" + String.valueOf(readQuery.shouldRefreshIdentityMapResult()) + ");");
if (readQuery.shouldRefreshIdentityMapResult()) { method.addLine(queryIdentifier + ".setShouldRefreshIdentityMapResult(" + String.valueOf(readQuery.shouldRefreshIdentityMapResult()) + ");");
if ((!shouldMaintainCache()) && shouldRefreshIdentityMapResult() && (!this.descriptor.isAggregateCollectionDescriptor())) { throw QueryException.refreshNotPossibleWithoutCache(this);
if ((!shouldMaintainCache()) && shouldRefreshIdentityMapResult() && (!this.descriptor.isAggregateCollectionDescriptor())) { throw QueryException.refreshNotPossibleWithoutCache(this);
if ((!shouldMaintainCache()) && shouldRefreshIdentityMapResult() && (!this.descriptor.isAggregateCollectionDescriptor())) { throw QueryException.refreshNotPossibleWithoutCache(this);
batchQuery.setShouldRefreshIdentityMapResult(query.shouldRefreshIdentityMapResult()); batchQuery.setCascadePolicy(query.getCascadePolicy()); batchQuery.setShouldMaintainCache(query.shouldMaintainCache());
batchQuery.setShouldRefreshIdentityMapResult(query.shouldRefreshIdentityMapResult()); batchQuery.setCascadePolicy(query.getCascadePolicy()); batchQuery.setShouldMaintainCache(query.shouldMaintainCache());