Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JDeveloper ADF : Collect the last Primary Key of myViewObj

  Asked By: Kerri    Date: Mar 09    Category: Java    Views: 1475

I am developing a web application[JSP, Struts, ADF BC].
I want to collect the last Primary Key of myEntityObject, increment
it, and insert it.
Till now my code in the entity object is:

protected void create(AttributeList AttributeList) {
setAttribute(1,"My Desired Code");

I have added a function in myApplicationModule.
public String getLastId(){
String value;
value = this.getMyView1().last().getAttribute(1).toString() +1 ;
return value;

I don't know where to call this function in order to put my generated
code into the setAttribute(1,"My Desired Code");
???Where can I call this function so that not encounter to a null object.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on JDeveloper ADF : Collect the last Primary Key of myViewObj Or get search suggestion and latest updates.