use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord 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;
}
use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.
the class PLSQLProject method buildBadAddressOutObjectQuery.
protected DatabaseQuery buildBadAddressOutObjectQuery() {
PLSQLrecord record = buildAddressRowTypeRecord();
record.setTypeName(null);
PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
call.setProcedureName("PLSQL_ADDRESS_INOUT");
call.addNamedOutputArgument("P_ADDRESS", record);
DataReadQuery query = new DataReadQuery();
query.setCall(call);
return query;
}
use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.
the class PLSQLProject method buildAddressRowTypeDataRecord.
protected PLSQLrecord buildAddressRowTypeDataRecord() {
PLSQLrecord record = new PLSQLrecord();
record.setTypeName("PLSQL_ADDRESS%ROWTYPE");
record.addField("ADDRESS_ID", JDBCTypes.NUMERIC_TYPE, 10, 0);
record.addField("STREET_NUM", JDBCTypes.NUMERIC_TYPE, 10, 0);
record.addField("STREET", JDBCTypes.VARCHAR_TYPE, 30);
record.addField("CITY", JDBCTypes.VARCHAR_TYPE, 30);
record.addField("STATE", JDBCTypes.VARCHAR_TYPE, 30);
return record;
}
use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.
the class PLSQLProject method buildAddressInOutObjectQuery.
protected DatabaseQuery buildAddressInOutObjectQuery() {
PLSQLrecord record = buildAddressRowTypeRecord();
PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
call.setProcedureName("PLSQL_ADDRESS_INOUT");
call.addNamedInOutputArgument("P_ADDRESS", record);
DataReadQuery query = new DataReadQuery();
query.addArgument("P_ADDRESS", Address.class);
query.setCall(call);
return query;
}
use of org.eclipse.persistence.platform.database.oracle.plsql.PLSQLrecord in project eclipselink by eclipse-ee4j.
the class PLSQLProject method buildPhoneRecord.
protected PLSQLrecord buildPhoneRecord() {
PLSQLrecord record = new PLSQLrecord();
record.setTypeName("PLSQL_P.PLSQL_PHONE_REC");
record.setCompatibleType("PLSQL_P_PLSQL_PHONE_REC");
record.addField("AREA_CODE", JDBCTypes.VARCHAR_TYPE, 3);
record.addField("P_NUM", JDBCTypes.VARCHAR_TYPE, 7);
record.setJavaType(Phone.class);
return record;
}
Aggregations