/** * INTERNAL: * Indicates whether the source query's pessimistic lock scope scope should be extended in the target query. */ protected boolean isExtendingPessimisticLockScope(ObjectBuildingQuery sourceQuery) { // TODO: What if sourceQuery is NOT ObjectLevelReadQuery? Should we somehow handle this? // Or alternatively define ObjectBuildingQuery.shouldExtendPessimisticLockScope() to always return false? return sourceQuery.isLockQuery() && sourceQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)sourceQuery).shouldExtendPessimisticLockScope(); }
/** * INTERNAL: * Indicates whether the source query's pessimistic lock scope scope should be extended in the target query. */ protected boolean isExtendingPessimisticLockScope(ObjectBuildingQuery sourceQuery) { // TODO: What if sourceQuery is NOT ObjectLevelReadQuery? Should we somehow handle this? // Or alternatively define ObjectBuildingQuery.shouldExtendPessimisticLockScope() to always return false? return sourceQuery.isLockQuery() && sourceQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)sourceQuery).shouldExtendPessimisticLockScope(); }
/** * INTERNAL: * Indicates whether the source query's pessimistic lock scope scope should be extended in the target query. */ protected boolean isExtendingPessimisticLockScope(ObjectBuildingQuery sourceQuery) { // TODO: What if sourceQuery is NOT ObjectLevelReadQuery? Should we somehow handle this? // Or alternatively define ObjectBuildingQuery.shouldExtendPessimisticLockScope() to always return false? return sourceQuery.isLockQuery() && sourceQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)sourceQuery).shouldExtendPessimisticLockScope(); }
if (sourceQuery.isObjectLevelReadQuery() && (sourceQuery.shouldCascadeAllParts() || (sourceQuery.shouldCascadePrivateParts() && isPrivateOwned()) || (sourceQuery.shouldCascadeByMapping() && this.cascadeRefresh)) ) { query.setShouldRefreshIdentityMapResult(sourceQuery.shouldRefreshIdentityMapResult()); query.setCascadePolicy(sourceQuery.getCascadePolicy());
if (sourceQuery.isObjectLevelReadQuery() && (((ObjectLevelReadQuery)sourceQuery).isAttributeBatchRead(this.descriptor, getAttributeName()) || (sourceQuery.isReadAllQuery() && shouldUseBatchReading()))) { return batchedValueFromRow(row, (ObjectLevelReadQuery)sourceQuery, cacheKey);
if (sourceQuery.isObjectLevelReadQuery() && (((ObjectLevelReadQuery)sourceQuery).isAttributeBatchRead(this.descriptor, getAttributeName()) || (sourceQuery.isReadAllQuery() && shouldUseBatchReading()))) { return batchedValueFromRow(row, (ObjectLevelReadQuery)sourceQuery, cacheKey);
return getAttributeValueFromObject(row.getSopObject()); if (sourceQuery.isObjectLevelReadQuery() && (((ObjectLevelReadQuery)sourceQuery).isAttributeBatchRead(this.descriptor, getAttributeName()) || (sourceQuery.isReadAllQuery() && shouldUseBatchReading()))) { return batchedValueFromRow(row, (ObjectLevelReadQuery)sourceQuery, cacheKey); if ((getHistoryPolicy() != null) || (sourceQuery.getSession().getAsOfClause() != null) || ((sourceQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)sourceQuery).hasAsOfClause()) && (sourceQuery.shouldCascadeAllParts() || (sourceQuery.shouldCascadePrivateParts() && isPrivateOwned()) || (sourceQuery.shouldCascadeByMapping() && this.cascadeRefresh))) || extendingPessimisticLockScope) { targetQuery = (ReadQuery)targetQuery.clone(); if (sourceQuery.isObjectLevelReadQuery()) { statement.getBuilder().asOf(((ObjectLevelReadQuery)sourceQuery).getAsOfClause());
return getAttributeValueFromObject(row.getSopObject()); if (sourceQuery.isObjectLevelReadQuery() && (((ObjectLevelReadQuery)sourceQuery).isAttributeBatchRead(this.descriptor, getAttributeName()) || (sourceQuery.isReadAllQuery() && shouldUseBatchReading()))) { return batchedValueFromRow(row, (ObjectLevelReadQuery)sourceQuery, cacheKey); if ((getHistoryPolicy() != null) || (sourceQuery.getSession().getAsOfClause() != null) || ((sourceQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)sourceQuery).hasAsOfClause()) && (sourceQuery.shouldCascadeAllParts() || (sourceQuery.shouldCascadePrivateParts() && isPrivateOwned()) || (sourceQuery.shouldCascadeByMapping() && this.cascadeRefresh))) || extendingPessimisticLockScope) { targetQuery = (ReadQuery)targetQuery.clone(); if (sourceQuery.isObjectLevelReadQuery()) { statement.getBuilder().asOf(((ObjectLevelReadQuery)sourceQuery).getAsOfClause());
if ((getHistoryPolicy() != null) || (sourceQuery.getSession().getAsOfClause() != null) || ((sourceQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)sourceQuery).hasAsOfClause()) && (sourceQuery.shouldCascadeAllParts() || (sourceQuery.shouldCascadePrivateParts() && isPrivateOwned()) || (sourceQuery.shouldCascadeByMapping() && this.cascadeRefresh))) || extendingPessimisticLockScope) { targetQuery = (ReadQuery)targetQuery.clone(); if(sourceQuery.isObjectLevelReadQuery()) { statement.getBuilder().asOf(((ObjectLevelReadQuery)sourceQuery).getAsOfClause());
if (sourceQuery.isObjectLevelReadQuery() && (((ObjectLevelReadQuery)sourceQuery).isAttributeBatchRead(this.descriptor, getAttributeName()) || (sourceQuery.isReadAllQuery() && shouldUseBatchReading()))) { return batchedValueFromRow(row, ((ObjectLevelReadQuery)sourceQuery), cacheKey); if (sourceQuery.isObjectLevelReadQuery() && (sourceQuery.shouldCascadeAllParts() || (sourceQuery.shouldCascadePrivateParts() && isPrivateOwned()) || (sourceQuery.shouldCascadeByMapping() && this.cascadeRefresh)) ) { query.setShouldRefreshIdentityMapResult(sourceQuery.shouldRefreshIdentityMapResult()); query.setCascadePolicy(sourceQuery.getCascadePolicy());
if (baseQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)baseQuery).hasAsOfClause()) { nestedQuery.setAsOfClause(((ObjectLevelReadQuery)baseQuery).getAsOfClause());
if (sourceQuery.isObjectLevelReadQuery() && (((ObjectLevelReadQuery)sourceQuery).isAttributeBatchRead(this.descriptor, getAttributeName()) || (sourceQuery.isReadAllQuery() && shouldUseBatchReading()))) { return batchedValueFromRow(row, ((ObjectLevelReadQuery)sourceQuery), cacheKey); if (sourceQuery.isObjectLevelReadQuery() && (sourceQuery.shouldCascadeAllParts() || (sourceQuery.shouldCascadePrivateParts() && isPrivateOwned()) || (sourceQuery.shouldCascadeByMapping() && this.cascadeRefresh)) ) { query.setShouldRefreshIdentityMapResult(sourceQuery.shouldRefreshIdentityMapResult()); query.setCascadePolicy(sourceQuery.getCascadePolicy());
if (sourceQuery.isObjectLevelReadQuery()) { ObjectLevelReadQuery objectQuery = (ObjectLevelReadQuery)sourceQuery; ObjectLevelReadQuery nestedObjectQuery = objectQuery.getAggregateQuery(this);
if (sourceQuery.isObjectLevelReadQuery()) { ObjectLevelReadQuery objectQuery = (ObjectLevelReadQuery)sourceQuery; ObjectLevelReadQuery nestedObjectQuery = objectQuery.getAggregateQuery(this);
if (nestedQuery.isObjectLevelReadQuery()) { targetFetchGroup = ((ObjectLevelReadQuery)nestedQuery).getFetchGroup(); if (refreshing && descriptor.hasFetchGroupManager()) {
if (sourceQuery.isObjectLevelReadQuery()){ if (((ObjectLevelReadQuery)nestedQuery).isPartialAttribute(getAttributeName()) || ((joinManager != null) && joinManager.isAttributeJoined(getDescriptor(), getAttributeName()))) {
if (nestedQuery.isObjectLevelReadQuery()) { targetFetchGroup = ((ObjectLevelReadQuery)nestedQuery).getFetchGroup(); if (refreshing && descriptor.hasFetchGroupManager()) {
if (baseQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)baseQuery).hasAsOfClause()) { nestedQuery.setAsOfClause(((ObjectLevelReadQuery)baseQuery).getAsOfClause());
if (baseQuery.isObjectLevelReadQuery() && ((ObjectLevelReadQuery)baseQuery).hasAsOfClause()) { nestedQuery.setAsOfClause(((ObjectLevelReadQuery)baseQuery).getAsOfClause());