Search in sources :

Example 6 with PLSQLCollection

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

the class PLSQLProject method buildAddressListOutQuery.

protected DatabaseQuery buildAddressListOutQuery() {
    PLSQLrecord record = buildAddressRecord();
    PLSQLCollection collection = new PLSQLCollection();
    collection.setTypeName("PLSQL_P.PLSQL_ADDRESS_LIST");
    collection.setCompatibleType("PLSQL_P_PLSQL_ADDRESS_LIST");
    collection.setNestedType(record);
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_P.PLSQL_ADDRESS_LIST_OUT");
    call.addNamedOutputArgument("P_ADDRESS_LIST", collection);
    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) PLSQLCollection(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLCollection) PLSQLrecord(org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord) DataReadQuery(org.eclipse.persistence.queries.DataReadQuery)

Example 7 with PLSQLCollection

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

the class PLSQLProject method buildEmployeeListInQuery.

protected DatabaseQuery buildEmployeeListInQuery() {
    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_IN");
    call.addNamedArgument("P_EMP_LIST", collection);
    call.addNamedArgument("P_CITY", JDBCTypes.VARCHAR_TYPE);
    DataModifyQuery query = new DataModifyQuery();
    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) DataModifyQuery(org.eclipse.persistence.queries.DataModifyQuery)

Example 8 with PLSQLCollection

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

the class PLSQLProject method buildCityListInOutQuery.

protected DatabaseQuery buildCityListInOutQuery() {
    PLSQLCollection collection = new PLSQLCollection();
    collection.setTypeName("PLSQL_P.PLSQL_CITY_LIST");
    collection.setCompatibleType("PLSQL_P_PLSQL_CITY_LIST");
    collection.setNestedType(JDBCTypes.VARCHAR_TYPE);
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_P.PLSQL_CITY_LIST_INOUT");
    call.addNamedInOutputArgument("P_CITY_LIST", collection);
    call.addNamedInOutputArgument("P_CITY", JDBCTypes.VARCHAR_TYPE);
    DataReadQuery query = new DataReadQuery();
    query.addArgument("P_CITY_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) DataReadQuery(org.eclipse.persistence.queries.DataReadQuery)

Example 9 with PLSQLCollection

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

the class PLSQLProject method buildAddressListInOutQuery.

protected DatabaseQuery buildAddressListInOutQuery() {
    PLSQLrecord record = buildAddressRecord();
    PLSQLCollection collection = new PLSQLCollection();
    collection.setTypeName("PLSQL_P.PLSQL_ADDRESS_LIST");
    collection.setCompatibleType("PLSQL_P_PLSQL_ADDRESS_LIST");
    collection.setNestedType(record);
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_P.PLSQL_ADDRESS_LIST_INOUT");
    call.addNamedInOutputArgument("P_ADDRESS_LIST", collection);
    call.addNamedInOutputArgument("P_CITY", JDBCTypes.VARCHAR_TYPE);
    DataReadQuery query = new DataReadQuery();
    query.addArgument("P_ADDRESS_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)

Example 10 with PLSQLCollection

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

the class PLSQLProject method buildMissingTypeAddressListOutQuery.

protected DatabaseQuery buildMissingTypeAddressListOutQuery() {
    PLSQLrecord record = buildAddressRecord();
    PLSQLCollection collection = new PLSQLCollection();
    collection.setTypeName("PLSQL_P.PLSQL_ADDRESS_LIST");
    collection.setNestedType(record);
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
    call.setProcedureName("PLSQL_P.PLSQL_ADDRESS_LIST_OUT");
    call.addNamedOutputArgument("P_ADDRESS_LIST", collection);
    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) 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

PLSQLCollection (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLCollection)16 PLSQLStoredProcedureCall (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLStoredProcedureCall)12 PLSQLrecord (org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord)10 DataReadQuery (org.eclipse.persistence.queries.DataReadQuery)8 DataModifyQuery (org.eclipse.persistence.queries.DataModifyQuery)4 ComplexDatabaseType (org.eclipse.persistence.internal.helper.ComplexDatabaseType)3 XMLDescriptor (org.eclipse.persistence.oxm.XMLDescriptor)2 OracleObjectType (org.eclipse.persistence.platform.database.oracle.jdbc.OracleObjectType)2 CompositeDatabaseType (org.eclipse.persistence.tools.oracleddl.metadata.CompositeDatabaseType)2 DatabaseType (org.eclipse.persistence.tools.oracleddl.metadata.DatabaseType)2 PLSQLCollectionType (org.eclipse.persistence.tools.oracleddl.metadata.PLSQLCollectionType)2 VArrayType (org.eclipse.persistence.tools.oracleddl.metadata.VArrayType)2 Struct (java.sql.Struct)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ClassDescriptor (org.eclipse.persistence.descriptors.ClassDescriptor)1 DatabaseType (org.eclipse.persistence.internal.helper.DatabaseType)1 ObjectPersistenceWorkbenchXMLProject (org.eclipse.persistence.internal.sessions.factories.ObjectPersistenceWorkbenchXMLProject)1 AttributeAccessor (org.eclipse.persistence.mappings.AttributeAccessor)1 ObjectRelationalDataTypeDescriptor (org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor)1