Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jpql constructor expressions : using java methods insode constructor

ChiragJan 17 2011 — edited Jan 19 2011
I have 2 questions:

First:

this works:
select NEW com.FirstClass(a.name) from Employee a;

I want to pass a.name to some java method, something like this:

select NEW com.FirstClass(com.SecondClass.factorString(a.name)) from Employee a;

basically, I want to call a java function inside constructor. but it does not work.


Second:

if the forst approach is not permitted, we would like to call Oracle SPs from jpql select query, but it seems that it is not permitted. like this:

select a.name, DBP_EMP.CALC_COMMISION(a.emp_id) from Employee a;

It is also not working.

Please give some suggestions..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2011
Added on Jan 17 2011
5 comments
798 views