Sun. Oct 24th, 2021

Requirement: In this post I will show you how we can programmatically Define, Set, Get and Remove Named Bind Variable from a ViewObject in Oracle ADF

We can define the WHERE Clause, Bind Variable Name and the Default Value by using the below code.

// Get the ViewObject
ViewObject vo = iter.getDepartments();
// Apply desired WHERE Clause and declare the bind variable name
// Define this variable as ViewObject Bind Variable. We can also set default value for this
vo.defineNamedWhereClauseParam("bindDeptName", "Marketing", null);
// Execute the ViewObject to finally apply the where clause

For Setting value to the Bind Variable use the below code

// Setting Value to the Bind Variable
vo.setNamedWhereClauseParam("bindDeptName", "IT");

For Getting value from the Bind Variable use the below code

// Getting value from the Bind Variable

For Removing the WHERE Clause and the Bind Variable we can use the below code

// Remove the where clause
// Remove the Bind Variable

Hence, the solution to our requirement.

If you like the post please comment, share, and do join me on Facebook. Please subscribe to my YouTube Channel for video tutorials.

Thanks & Regards,
Susanto Paul

 596 total views,  4 views today

By Susanto Paul

Susanto is an Oracle ACE, a qualified MCA, MBA, and a highly-skilled Senior Oracle Specialist. He is an enthusiastic Blogger and YouTuber who helps learners to solve their complex problems more efficiently. He has 9+ years of experience in multiple technologies like AWS, Oracle ADF, Oracle APEX, Oracle JET, Oracle VBCS, Oracle IDCS, Oracle PL/SQL, Oracle Integration Cloud, Java, JDBC, Servlets, JSP, Spring, Hibernate, HTML5, CSS3, JavaScript, TypeScript, NodesJS, Angular, MySQL, Oracle WebLogic Server, JUnit, JMeter, Selenium Web Driver, etc. He is a certified: Oracle Certified Professional Java SE 6 Programmer, Oracle ADF 11g Certified Implementation Specialist, Oracle Cloud Platform Application Integration 2020 Certified Specialist, Oracle Cloud Infrastructure Foundations 2020 Certified Associate, and Oracle Cloud Infrastructure Developer 2020 Certified Associate

Leave a Reply

Your email address will not be published. Required fields are marked *