/** * Return an instance of the receivers javaClass. Set the attributes of an instance * from the values stored in the database row. */ public Object buildObject(ObjectBuildingQuery query, AbstractRecord databaseRow, JoinedAttributeManager joinManager) { InheritancePolicy inheritancePolicy = null; if (this.descriptor.hasInheritance()) { inheritancePolicy = this.descriptor.getInheritancePolicy(); } AbstractSession session = query.getSession(); session.startOperationProfile(SessionProfiler.ObjectBuilding, query, SessionProfiler.ALL); Object domainObject = null; try { domainObject = buildObject(query, databaseRow, joinManager, session, this.descriptor, inheritancePolicy, session.isUnitOfWork(), query.shouldCacheQueryResults(), query.shouldUseWrapperPolicy()); } finally { session.endOperationProfile(SessionProfiler.ObjectBuilding, query, SessionProfiler.ALL); } return domainObject; }
/** * Return an instance of the receivers javaClass. Set the attributes of an instance * from the values stored in the database row. */ public Object buildObject(ObjectBuildingQuery query, AbstractRecord databaseRow, JoinedAttributeManager joinManager) { InheritancePolicy inheritancePolicy = null; if (this.descriptor.hasInheritance()) { inheritancePolicy = this.descriptor.getInheritancePolicy(); } AbstractSession session = query.getSession(); session.startOperationProfile(SessionProfiler.ObjectBuilding, query, SessionProfiler.ALL); Object domainObject = null; try { domainObject = buildObject(query, databaseRow, joinManager, session, this.descriptor, inheritancePolicy, session.isUnitOfWork(), query.shouldCacheQueryResults(), query.shouldUseWrapperPolicy()); } finally { session.endOperationProfile(SessionProfiler.ObjectBuilding, query, SessionProfiler.ALL); } return domainObject; }
} else { original = buildObject(query, databaseRow, session, primaryKey, concreteDescriptor, joinManager); if (query.shouldCacheQueryResults()) { query.cacheResult(original);
|| query.shouldCacheQueryResults() // Need to build original to cache it. || query.shouldRetrieveBypassCache() || (concreteDescriptor.hasFetchGroupManager() && concreteDescriptor.getFetchGroupManager().isPartialObject(clone))) { if (query.shouldCacheQueryResults()) { query.cacheResult(original);
|| query.shouldCacheQueryResults() // Need to build original to cache it. || query.shouldRetrieveBypassCache() || (concreteDescriptor.hasFetchGroupManager() && concreteDescriptor.getFetchGroupManager().isPartialObject(clone))) { if (query.shouldCacheQueryResults()) { query.cacheResult(original);
} else { domainObject = buildObject(query, databaseRow, session, primaryKey, concreteDescriptor, joinManager); if (query.shouldCacheQueryResults()) { query.cacheResult(domainObject);