Search in sources :

Example 6 with PLSQLrecord

use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.

the class PLSQLProject method buildEmployeeInOutQuery.

protected DatabaseQuery buildEmployeeInOutQuery() {
    PLSQLrecord record = buildEmployeeRecord();
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_P.PLSQL_EMP_INOUT");
    call.addNamedInOutputArgument("P_EMP", record);
    call.addNamedInOutputArgument("P_CITY", JDBCTypes.VARCHAR_TYPE);
    DataReadQuery query = new DataReadQuery();
    query.addArgument("P_EMP", Employee.class);
    query.addArgument("P_CITY", String.class);
    query.setCall(call);
    return query;
}
Also used : PLSQLStoredProcedureCall(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredProcedureCall) PLSQLrecord(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord) DataReadQuery(org.eclipse.persistence.queries.DataReadQuery)

Example 7 with PLSQLrecord

use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.

the class PLSQLProject method buildAddressInObjectQuery.

protected DatabaseQuery buildAddressInObjectQuery() {
    PLSQLrecord record = buildAddressRowTypeRecord();
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_ADDRESS_IN");
    call.addNamedArgument("P_ADDRESS", record);
    DataModifyQuery query = new DataModifyQuery();
    query.addArgument("P_ADDRESS", Address.class);
    query.setCall(call);
    return query;
}
Also used : PLSQLStoredProcedureCall(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredProcedureCall) PLSQLrecord(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord) DataModifyQuery(org.eclipse.persistence.queries.DataModifyQuery)

Example 8 with PLSQLrecord

use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.

the class PLSQLProject method buildAddressOutObjectFuncQuery.

protected DatabaseQuery buildAddressOutObjectFuncQuery() {
    PLSQLrecord record = buildAddressRowTypeRecord();
    PLSQLStoredFunctionCall call = new PLSQLStoredFunctionCall(record);
    call.setProcedureName("PLSQL_ADDRESS_OUT_FUNC");
    DataReadQuery query = new DataReadQuery();
    query.setCall(call);
    return query;
}
Also used : PLSQLStoredFunctionCall(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredFunctionCall) PLSQLrecord(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord) DataReadQuery(org.eclipse.persistence.queries.DataReadQuery)

Example 9 with PLSQLrecord

use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.

the class PLSQLProject method buildEmployeeOutQuery.

protected DatabaseQuery buildEmployeeOutQuery() {
    PLSQLrecord record = buildEmployeeRecord();
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_P.PLSQL_EMP_OUT");
    call.addNamedOutputArgument("P_EMP", record);
    call.addNamedOutputArgument("P_CITY", JDBCTypes.VARCHAR_TYPE);
    DataReadQuery query = new DataReadQuery();
    query.setCall(call);
    return query;
}
Also used : PLSQLStoredProcedureCall(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredProcedureCall) PLSQLrecord(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord) DataReadQuery(org.eclipse.persistence.queries.DataReadQuery)

Example 10 with PLSQLrecord

use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.

the class PLSQLProject method buildEmployeeListInOutQuery.

protected DatabaseQuery buildEmployeeListInOutQuery() {
    PLSQLrecord record = buildEmployeeRecord();
    PLSQLCollection collection = new PLSQLCollection();
    collection.setTypeName("PLSQL_P.PLSQL_EMP_LIST");
    collection.setCompatibleType("PLSQL_P_PLSQL_EMP_LIST");
    collection.setNestedType(record);
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_P.PLSQL_EMP_LIST_INOUT");
    call.addNamedInOutputArgument("P_EMP_LIST", collection);
    call.addNamedInOutputArgument("P_CITY", JDBCTypes.VARCHAR_TYPE);
    DataReadQuery query = new DataReadQuery();
    query.addArgument("P_EMP_LIST", java.sql.Array.class);
    query.addArgument("P_CITY", String.class);
    query.setCall(call);
    return query;
}
Also used : PLSQLStoredProcedureCall(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredProcedureCall) PLSQLCollection(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLCollection) PLSQLrecord(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord) DataReadQuery(org.eclipse.persistence.queries.DataReadQuery)

Aggregations

PLSQLrecord (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord)33 PLSQLStoredProcedureCall (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredProcedureCall)24 DataReadQuery (org.eclipse.persistence.queries.DataReadQuery)14 PLSQLCollection (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLCollection)10 DataModifyQuery (org.eclipse.persistence.queries.DataModifyQuery)8 StringReader (java.io.StringReader)6 ObjectPersistenceWorkbenchXMLProject (org.eclipse.persistence.internal.sessions.factories.ObjectPersistenceWorkbenchXMLProject)6 XMLContext (org.eclipse.persistence.oxm.XMLContext)6 XMLMarshaller (org.eclipse.persistence.oxm.XMLMarshaller)6 Project (org.eclipse.persistence.sessions.Project)6 PLSQLrecordTestHelper.buildTestProject (org.eclipse.persistence.testing.tests.plsqlrecord.PLSQLrecordTestHelper.buildTestProject)6 PLSQLrecordTestHelper.buildWorkbenchXMLProject (org.eclipse.persistence.testing.tests.plsqlrecord.PLSQLrecordTestHelper.buildWorkbenchXMLProject)6 Test (org.junit.Test)6 Document (org.w3c.dom.Document)6 ReadObjectQuery (org.eclipse.persistence.queries.ReadObjectQuery)3 ComplexDatabaseType (org.eclipse.persistence.internal.helper.ComplexDatabaseType)2 OracleObjectType (org.eclipse.persistence.platform.database.oracle.jdbc.OracleObjectType)2 PLSQLStoredFunctionCall (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredFunctionCall)2 PLSQLargument (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLargument)2 CompositeDatabaseType (org.eclipse.persistence.tools.oracleddl.metadata.CompositeDatabaseType)2