Package org.eclipse.persistence.queries

Examples of org.eclipse.persistence.queries.SQLResultSetMapping


        // Clear old descriptors to allow rehash on new classes.
        this.descriptors = new HashMap();
        // convert class names to classes for each SQLResultSetMapping
        if (sqlResultSetMappings != null) {
            for (Iterator mappingIt = sqlResultSetMappings.keySet().iterator(); mappingIt.hasNext();) {
                SQLResultSetMapping mapping = (SQLResultSetMapping) sqlResultSetMappings.get(mappingIt.next());
                mapping.convertClassNamesToClasses(classLoader);
            }
        }
    }
View Full Code Here


     * Process an sql result set mapping metadata into a EclipseLink
     * SqlResultSetMapping and store it on the session.
     */
    public void process(AbstractSession session, ClassLoader loader) {       
        // Initialize a new SqlResultSetMapping (with the metadata name)
        SQLResultSetMapping mapping = new SQLResultSetMapping(getName());
       
        // Process the entity results.
        for (EntityResultMetadata eResult : m_entityResults) {
            EntityResult entityResult = new EntityResult(MetadataHelper.getClassForName(eResult.getEntityClass().getName(), loader));
       
            // Process the field results.
            if (eResult.hasFieldResults()) {
                for (FieldResultMetadata fResult : eResult.getFieldResults()) {
                    entityResult.addFieldResult(new FieldResult(fResult.getName(), fResult.getColumn()));
                }
            }
       
            // Process the discriminator value;
            entityResult.setDiscriminatorColumn(eResult.getDiscriminatorColumn());
       
            // Add the result to the SqlResultSetMapping.
            mapping.addResult(entityResult);
        }
       
        // Process the column results.
        for (String columnResult : m_columnResults) {
            mapping.addResult(new ColumnResult(columnResult));
        }
           
        session.getProject().addSQLResultSetMapping(mapping);
    }
View Full Code Here

     * Process an sql result set mapping metadata into a EclipseLink
     * SqlResultSetMapping and store it on the session.
     */
    public void process(AbstractSession session, ClassLoader loader) {       
        // Initialize a new SqlResultSetMapping (with the metadata name)
        SQLResultSetMapping mapping = new SQLResultSetMapping(getName());
       
        // Process the entity results.
        for (EntityResultMetadata eResult : m_entityResults) {
            EntityResult entityResult = new EntityResult(MetadataHelper.getClassForName(eResult.getEntityClass().getName(), loader));
       
            // Process the field results.
            if (eResult.hasFieldResults()) {
                for (FieldResultMetadata fResult : eResult.getFieldResults()) {
                    entityResult.addFieldResult(new FieldResult(fResult.getName(), fResult.getColumn()));
                }
            }
       
            // Process the discriminator value;
            entityResult.setDiscriminatorColumn(eResult.getDiscriminatorColumn());
       
            // Add the result to the SqlResultSetMapping.
            mapping.addResult(entityResult);
        }
       
        // Process the column results.
        for (String columnResult : m_columnResults) {
            mapping.addResult(new ColumnResult(columnResult));
        }
           
        session.getProject().addSQLResultSetMapping(mapping);
    }
View Full Code Here

       
        if (resultClassNames != null) {
            List<SQLResultSetMapping> resultSetMappings = new ArrayList<SQLResultSetMapping>();
           
            for (String resultClass : resultClassNames) {
                SQLResultSetMapping mapping = new SQLResultSetMapping(resultClass);
               
                EntityResult entityResult = new EntityResult(resultClass);
                mapping.addResult(entityResult);

                resultSetMappings.add(mapping);
            }
            query = StoredProcedureQueryImpl.buildResultSetMappingQuery(resultSetMappings, call, hints, loader, (AbstractSession)session);
        } else if (resultSetMappingNames != null) {
View Full Code Here

     * SqlResultSetMapping and store it on the session. The order of processing
     * the results and adding them is important to be spec compliant.
     */
    public SQLResultSetMapping process() {       
        // Initialize a new SqlResultSetMapping (with the metadata name)
        SQLResultSetMapping mapping = new SQLResultSetMapping(getName());
       
        // Process the entity results first.
        for (EntityResultMetadata entityResult : m_entityResults) {
            mapping.addResult(entityResult.process());
        }
           
        // Process the constructor results second.
        for (ConstructorResultMetadata constructorResult : m_constructorResults) {
            mapping.addResult(constructorResult.process());
        }
       
        // Process the column results third.
        for (ColumnResultMetadata columnResult : m_columnResults) {
            mapping.addResult(columnResult.process());
        }
       
        return mapping;
    }
View Full Code Here

       
        if (resultClassNames != null) {
            List<SQLResultSetMapping> resultSetMappings = new ArrayList<SQLResultSetMapping>();
           
            for (String resultClass : resultClassNames) {
                SQLResultSetMapping mapping = new SQLResultSetMapping(resultClass);
               
                EntityResult entityResult = new EntityResult(resultClass);
                mapping.addResult(entityResult);

                resultSetMappings.add(mapping);
            }
            query = StoredProcedureQueryImpl.buildResultSetMappingQuery(resultSetMappings, call, hints, loader, (AbstractSession)session);
        } else if (resultSetMappingNames != null) {
View Full Code Here

     * SqlResultSetMapping and store it on the session. The order of processing
     * the results and adding them is important to be spec compliant.
     */
    public SQLResultSetMapping process() {       
        // Initialize a new SqlResultSetMapping (with the metadata name)
        SQLResultSetMapping mapping = new SQLResultSetMapping(getName());
       
        // Process the entity results first.
        for (EntityResultMetadata entityResult : m_entityResults) {
            mapping.addResult(entityResult.process());
        }
           
        // Process the constructor results second.
        for (ConstructorResultMetadata constructorResult : m_constructorResults) {
            mapping.addResult(constructorResult.process());
        }
       
        // Process the column results third.
        for (ColumnResultMetadata columnResult : m_columnResults) {
            mapping.addResult(columnResult.process());
        }
       
        return mapping;
    }
View Full Code Here

        // Clear old descriptors to allow rehash on new classes.
        this.descriptors = new HashMap();
        // convert class names to classes for each SQLResultSetMapping
        if (sqlResultSetMappings != null) {
            for (Iterator mappingIt = sqlResultSetMappings.keySet().iterator(); mappingIt.hasNext();) {
                SQLResultSetMapping mapping = (SQLResultSetMapping) sqlResultSetMappings.get(mappingIt.next());
                mapping.convertClassNamesToClasses(classLoader);
            }
        }
    }
View Full Code Here

     * Process an sql result set mapping metadata into a EclipseLink
     * SqlResultSetMapping and store it on the session.
     */
    public void process(AbstractSession session, ClassLoader loader) {       
        // Initialize a new SqlResultSetMapping (with the metadata name)
        SQLResultSetMapping mapping = new SQLResultSetMapping(getName());
       
        // Process the entity results.
        for (EntityResultMetadata eResult : m_entityResults) {
            EntityResult entityResult = new EntityResult(MetadataHelper.getClassForName(eResult.getEntityClass().getName(), loader));
       
            // Process the field results.
            if (eResult.hasFieldResults()) {
                for (FieldResultMetadata fResult : eResult.getFieldResults()) {
                    entityResult.addFieldResult(new FieldResult(fResult.getName(), fResult.getColumn()));
                }
            }
       
            // Process the discriminator value;
            entityResult.setDiscriminatorColumn(eResult.getDiscriminatorColumn());
       
            // Add the result to the SqlResultSetMapping.
            mapping.addResult(entityResult);
        }
       
        // Process the column results.
        for (String columnResult : m_columnResults) {
            mapping.addResult(new ColumnResult(columnResult));
        }
           
        session.getProject().addSQLResultSetMapping(mapping);
    }
View Full Code Here

        // Clear old descriptors to allow rehash on new classes.
        this.descriptors = new HashMap();
        // convert class names to classes for each SQLResultSetMapping
        if (sqlResultSetMappings != null) {
            for (Iterator mappingIt = sqlResultSetMappings.keySet().iterator(); mappingIt.hasNext();) {
                SQLResultSetMapping mapping = (SQLResultSetMapping) sqlResultSetMappings.get(mappingIt.next());
                mapping.convertClassNamesToClasses(classLoader);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.queries.SQLResultSetMapping

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.