Hi,
We have the following scenario.
It exists a PL/SQL-API in the database which return a rowtype (the function must not be modified). These data are displayed in the GUI.
FUNCTION get_rec(p_parm IN table.column%type) RETURN table%rowtype;
We found no declarative solution to create a ADF VO or ADF EO on a PL/SQL-API.
In the documentation "38.5 Basing an Entity Object on a PL/SQL Package API" the combine a db-view for reading (R) and pl/sql-api for the DML (CUD).
On solution would be to define a SQL Type for this scenario, and add a new PL/SQL-function (because the orginal function must not be modified) which returns the type.
FUNCTION get_rec(p_parm IN table.column%type) RETURN OUR_SQL_TYPE;
Then we can use a statment like
SELECT * FROM TABLE(pkg_x.get_rec(:param))
in the ADF BC VO.
Note:
We found [url https://database-api-based-adf-bc.samplecode.oracle.com/]database-api-based-adf-bc. but "Last Updated: Nov. 10, 2009 and Current Version: 0.2b" does not sound very encouraging.
And [url http://technology.amis.nl/blog/3315/creating-an-adf-application-based-on-plsql-api-part-one-reading-data-as-a-collection-of-sql-type-objects]adf-application-based-on-plsql-api. is a good blog-post too but adjustments in the database (SQL_TYPE, ...) must also be made.
Technologie: ADF 11g (Fusion Stack: ADF BC, ADF Faces)
Question: Is there a more elegant (declarative) solution for this problem without making the request to change the code DB?
Best Regards
Martin