Package oracle.toplink.essentials.queryframework

Examples of oracle.toplink.essentials.queryframework.ObjectLevelReadQuery


            // Ignore nested
            if ((objectExpression.getBaseExpression() == objectExpression.getBuilder()) && objectExpression.getMapping().isForeignReferenceMapping()) {
                ForeignReferenceMapping mapping = (ForeignReferenceMapping)objectExpression.getMapping();

                // A nested query must be built to pass to the descriptor that looks like the real query execution would.
                ObjectLevelReadQuery nestedQuery = mapping.prepareNestedJoins(this, session);

                // Register the nested query to be used by the mapping for all the objects.
                getJoinedMappingQueries_().put(mapping, nestedQuery);
            }
        }
View Full Code Here


        this.dataResults = dataResults;
        if(getJoinedMappingQueries_() != null &&  !getJoinedMappingQueries_().isEmpty() && dataResults != null && !dataResults.isEmpty()) {
            Iterator  it =  getJoinedMappingQueries_().entrySet().iterator();
            while(it.hasNext()) {
                Map.Entry entry = (Map.Entry)it.next();
                ObjectLevelReadQuery nestedQuery = (ObjectLevelReadQuery)entry.getValue();
                if(nestedQuery.getJoinedAttributeManager().isToManyJoin()) {
                    ForeignReferenceMapping frMapping = (ForeignReferenceMapping)entry.getKey();
                    Object indexObject = getJoinedMappingIndexes_().get(entry.getKey());
                    List nestedDataResults = new ArrayList(dataResults.size());
                    for(int i=0; i < dataResults.size(); i++) {
                        AbstractRecord row = (AbstractRecord)dataResults.get(i);                       
                        nestedDataResults.add(frMapping.trimRowForJoin(row, indexObject, session));
                    }
                    nestedQuery.getJoinedAttributeManager().setDataResults(nestedDataResults, session);
                }
            }
         }
    }
View Full Code Here

TOP

Related Classes of oracle.toplink.essentials.queryframework.ObjectLevelReadQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.