Package org.eclipse.persistence.queries

Examples of org.eclipse.persistence.queries.StoredFunctionCall


     * INTERNAL:
     */
    @Override
    public void process(AbstractSession session, ClassLoader loader) {
        // Build the stored procedure call.
        StoredFunctionCall call = new StoredFunctionCall();
       
        // Process the stored procedure parameters.
        boolean callByIndex = callByIndex();
        for (StoredProcedureParameterMetadata parameter : getParameters()) {
            parameter.processArgument(call, callByIndex, -1);
        }
       
        if (getReturnParameter() != null) {
            getReturnParameter().processResult(call, -1);
        }
       
        // Process the procedure name.
        call.setProcedureName(getProcedureName());
               
        // Process the query hints.
        Map<String, Object> hints = processQueryHints(session);
       
        // Process the result class.
View Full Code Here


        }
        // for StoredFunctionCalls, the return value's information
        // is stored in the parameters list at index 0
        @Override
        public Object getAttributeValueFromObject(Object anObject) throws DescriptorException {
            StoredFunctionCall sfc = (StoredFunctionCall)anObject;
            Object argument = sfc.getParameters().get(0);
            String argumentName = (String)sfc.getProcedureArgumentNames().get(0);
            StoredProcedureOutArgument outArgument = new StoredProcedureOutArgument((DatabaseField)argument);
            outArgument.argumentName = argumentName;
            return outArgument;
        }
View Full Code Here

            outArgument.argumentName = argumentName;
            return outArgument;
        }
        @Override
        public void setAttributeValueInObject(Object domainObject, Object attributeValue) throws DescriptorException {
            StoredFunctionCall sfc = (StoredFunctionCall)domainObject;
            StoredProcedureOutArgument spoa = (StoredProcedureOutArgument)attributeValue;
            // Set procedure argument name.
            sfc.getProcedureArgumentNames().set(0, spoa.argumentName);
            sfc.getParameters().set(0, spoa.getDatabaseField());
            // Set argument type.
            sfc.getParameterTypes().set(0, OUT);
        }
View Full Code Here

                                ObjectRelationalDatabaseField nestedField =
                                    new ObjectRelationalDatabaseField("");
                                nestedField.setSqlTypeName(returnArg.nestedType());
                                nestedField.setSqlType(returnArg.nestedTypecode());
                                nestedField.setTypeName(returnArg.nestedTypeName());
                                spCall = new StoredFunctionCall(returnArg.typecode(),
                                    returnArg.sqlTypeName(), javaClassName, nestedField);
                            }
                            else {
                                spCall = new StoredFunctionCall(returnArg.typecode(),
                                    returnArg.sqlTypeName(), javaClassName);
                            }
                        }
                        else {
                            spCall = new StoredFunctionCall();
                            ((StoredFunctionCall)spCall).setResult(null, OBJECT);
                        }
                    }
                    else {
                        spCall = new StoredProcedureCall();
View Full Code Here

     * INTERNAL:
     */
    @Override
    public void process(AbstractSession session, ClassLoader loader, MetadataProject project) {
        // Build the stored procedure call.
        StoredFunctionCall call = new StoredFunctionCall();
       
        // Process the stored procedure parameters.
        boolean callByIndex = (m_callByIndex == null) ? false : m_callByIndex;
        for (StoredProcedureParameterMetadata parameter : getParameters()) {
            parameter.process(call, project, callByIndex, false);
        }
       
        if (getReturnParameter() != null) {
            getReturnParameter().process(call, project, callByIndex, true);
        }
       
        // Process the procedure name.
        call.setProcedureName(getProcedureName());
               
        // Process the query hints.
        Map<String, Object> hints = processQueryHints(session);
       
        // Process the result class.
View Full Code Here

    }

    @Override
    public void process(AbstractSession session, ClassLoader loader, MetadataProject project) {
        // Build the stored procedure call.
        StoredFunctionCall call = new StoredFunctionCall();
       
        // Process the stored procedure parameters.
        boolean callByIndex = (m_callByIndex == null) ? false : m_callByIndex;
        for (StoredProcedureParameterMetadata parameter : getParameters()) {
            parameter.process(call, project, callByIndex, false);
        }
       
        if (getReturnParameter() != null) {
            getReturnParameter().process(call, project, callByIndex, true);
        }
       
        // Process the procedure name.
        call.setProcedureName(getProcedureName());
               
        // Process the query hints.
        Map<String, Object> hints = processQueryHints(session);
       
        // Process the result class.
View Full Code Here

                                ObjectRelationalDatabaseField nestedField =
                                    new ObjectRelationalDatabaseField("");
                                nestedField.setSqlTypeName(returnArg.nestedType());
                                nestedField.setSqlType(returnArg.nestedTypecode());
                                nestedField.setTypeName(returnArg.nestedTypeName());
                                spCall = new StoredFunctionCall(returnArg.typecode(),
                                    returnArg.sqlTypeName(), javaClassName, nestedField);
                            }
                            else {
                                spCall = new StoredFunctionCall(returnArg.typecode(),
                                    returnArg.sqlTypeName(), javaClassName);
                            }
                        }
                        else {
                            spCall = new StoredFunctionCall();
                            ((StoredFunctionCall)spCall).setResult(null, OBJECT);
                        }
                    }
                    else {
                        spCall = new StoredProcedureCall();
View Full Code Here

        }
        // for StoredFunctionCalls, the return value's information
        // is stored in the parameters list at index 0
        @Override
        public Object getAttributeValueFromObject(Object anObject) throws DescriptorException {
            StoredFunctionCall sfc = (StoredFunctionCall)anObject;
            Object argument = sfc.getParameters().get(0);
            String argumentName = (String)sfc.getProcedureArgumentNames().get(0);
            StoredProcedureOutArgument outArgument = new StoredProcedureOutArgument((DatabaseField)argument);
            outArgument.argumentName = argumentName;
            return outArgument;
        }
View Full Code Here

            outArgument.argumentName = argumentName;
            return outArgument;
        }
        @Override
        public void setAttributeValueInObject(Object domainObject, Object attributeValue) throws DescriptorException {
            StoredFunctionCall sfc = (StoredFunctionCall)domainObject;
            StoredProcedureOutArgument spoa = (StoredProcedureOutArgument)attributeValue;
            // Set procedure argument name.
            sfc.getProcedureArgumentNames().set(0, spoa.argumentName);
            sfc.getParameters().set(0, spoa.getDatabaseField());
            // Set argument type.
            sfc.getParameterTypes().set(0, OUT);
        }
View Full Code Here

        }
        // for StoredFunctionCalls, the return value's information
        // is stored in the parameters list at index 0
        @Override
        public Object getAttributeValueFromObject(Object anObject) throws DescriptorException {
            StoredFunctionCall sfc = (StoredFunctionCall)anObject;
            Object argument = sfc.getParameters().get(0);
            String argumentName = sfc.getProcedureArgumentNames().get(0);
            StoredProcedureOutArgument outArgument = new StoredProcedureOutArgument((DatabaseField)argument);
            outArgument.argumentName = argumentName;
            return outArgument;
        }
View Full Code Here

TOP

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

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.