Environment - JavaSE 6, Oracle 11, WebSphere 7, eclipseLink 2.5.2 / 2.6.0
Use Case
In our project we use (call from Java) lot of PL/SQL procedures, and functions. We would like to generate annotated queries like
@NamedPLSQLStoredFunctionQuery(name = "convertToString", functionName = "my_schema.my_package.convert_to_string", parameters = { @PLSQLParameter(name = "p_boolean", databaseType = "BOOLEAN") }, returnParameter = @PLSQLParameter(name = "RESULT", databaseType = "VARCHAR_TYPE"))
from database metadata, i.e. procedure/function spec.
Question
Is there any support from eclipseLink or any 3rd party library generating this?
Regards Jan
No, there are no tools that generate JPA/EclipseLink query annotations from stored procedures that exist in the database. I don't think it would be feasible to write one that could determine and interpret what all the stored procedure/functions that might exist in the database are for and would be desired in a JPA persistence unit.