[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: AW: Re: [eclipselink-users] StoredFunctionCall with ROWTYPE as returnvalue
|
Hello,
I replaced the following jar's in
glassfish-v3-prelude/glassfish/modules/ with the ones shipped with
"eclipselink-plugins-1.1.0.r3634.zip":
org.eclipse.persistence.core_1.1.0.r3634.jar
org.eclipse.persistence.asm_1.1.0.r3634.jar
org.eclipse.persistence.antlr_1.1.0.r3634.jar
org.eclipse.persistence.oracle_1.1.0.r3634.jar
javax.persistence_1.99.0.jar
org.eclipse.persistence.jpa_1.1.0.r3634.jar
When Eclipselink connect to the Database at least it shows me (Eclipse
Persistence Services - 1.1.0.r3634).
I don't know if tat dos the trick put it works at least.
Any other Idees?
About the Problem I'm asking initially, I don't know how to use
PLSQLStoredProcedureCall with a Function returning a row. I found a
sample at (http://forums.oracle.com/forums/thread.jspa?threadID=829153)
on which a User explains how to use PLSQLStoredProcedureCall with a
RowType as IN, OUT or INOUT Parameter. But I hope I don't have to code a
wrapper-Procedure for every single Function. Can Anybody give me a
Sample for accessing a storedFunction like this one?
FUNCTION rowGetZwParameter(pnParID IN NUMBER) RETURN T_ZWPARAMETER%ROWTYPE;
Hello,
I'll take a look at it. I'm Using Eclikselink in GlassfishV3. By default Eclipselink 1.0.1 is bundled with GlassfishV3. How do I "upgrade" to EL-1.1 and configuring and letting Glassfish managing Database link/pooling?
--- Originalnachricht ---
Support for this was added in the EclipseLink 1.1 release.
See, PLSQLStoredProcedureCall in the
org.eclipse.persistence.platform.database.oracle.plsql package.
Martin.Berner wrote:
Hello,
we have a lot of StoredProcedures and StoredFunctions on the underlying
Oracle 10g Database written in PL/SQL. I managed to access a Function
returning a single Value of a JDBC normal Type for example by using this
wrapperfunction:
public <T> T executeFunction(String functionName, HashMap<String,
Object> params, Class<T> returnValueClass) {
StoredFunctionCall functionCall = new StoredFunctionCall();
functionCall.setProcedureName(functionName);
ValueReadQuery query = new ValueReadQuery();
query.setCall(functionCall);
List args = new ArrayList();
for (String key : params.keySet()) {
functionCall.addNamedArgument(key);
query.addArgument(key);
args.add(params.get(key));
}
functionCall.setResult("FUNCTION_RESULT", returnValueClass);
return (T) getSession().executeQuery(query, args);
}
But some of our Function return a row of a Table. For example:
FUNCTION rowGetZwParameter(pnParID IN NUMBER) RETURN
T_ZWPARAMETER%ROWTYPE;
How do I access such a Function?
I'm very kind of any help.
Berner Martin
-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James
Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48
TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java
Persistence
--
View this message in context:
http://www.nabble.com/StoredFunctionCall-with-ROWTYPE-as-returnvalue-tp23368567p23373257.html
Sent from the EclipseLink - Users mailing list archive at
Nabble.com.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users