Skip to Main Content

Validate Stored Procedure Input

ChristianM0147Jun 2 2022 — edited Jun 2 2022

Hello fellow ADF Programmers
I´m currently working with JDeveloper Version 12.2.1.4.0.
My Scenario: I created a Methode in my AppModuleImpl.java that calls a procedure in my Database. I exposed this Method to the Client so i can use the DataControl on my page. The procedure/Method takes a *ID as an Input Parameter. My procedure does this: INSERT INTO X Select * FROM Y WHERE Y.ID = *ID.
I now want to implement a validation of the input field (*ID). I want to check if the data of *ID is already inserted in table X and if so... show some validation error the button on my .jsf page. Whats the best way to do this?
Should i just extend the method in my AppModule with: Select 1 from X where id = *ID and then throw a ValidatorException if the select returns something?

This post has been answered by Karl Karanjia-Oracle on Jun 2 2022
Jump to Answer
Comments
Post Details
Added on Jun 2 2022
1 comment
5 views