Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to get the nextval of a sequence

user1699471Jan 14 2014 — edited Jan 15 2014

Hi Friends,

I have a question, perhaps they are a bit basic, but I have not found a way to get the nextval of a sequence, I need to get that value from a Backing Bean, I have the following source code in the entity (NameEntity.java)

public oracle.jbo.domain.Number nextSequenceVal (String SequenceName) {

    oracle.jbo.domain.Number SequenceValue = null;

     if (SequenceName! = null &&! sequenceName.equals ("")) {

oracle.jbo.domain.Number SequenceValue = new (0);

SequenceImpl seq = new SequenceImpl (SequenceName, getDBTransaction ());

seq.getSequenceNumber SequenceValue = ();

SequenceValue return;

else {}

oracle.jbo.domain.Number SequenceValue = new (0);

SequenceValue return;

}

      }

In the Backing Bean I need to call this same method to get the next sequence number that will and thought to do the following:

NameEntity NameEntity MyEntity = ();

miEntidad.nextSequenceVal ();

This does not work, You know that you can make something similar.

Thank you very much for your help.

This post has been answered by Timo Hahn on Jan 15 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2014
Added on Jan 14 2014
4 comments
610 views