Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] custom sequence generator

You will need to define a custom class extending org.eclipse.persistence.sequencing.Sequence.

Consider deriving it from QuerySequence or StandardSequence.

In the customizer: if the new custom sequence class is the only one used in the persistence unit, then it would be enough to set an instance of it as a default:

getDatasourcePlatform.setDefaultSequence(new MySequence("", 25));

Alternatively add each sequence individually:

getDatasourcePlatform.addSequence(new MySequence("SEQ_1", 25));
getDatasourcePlatform.addSequence(new MySequence("SEQ_2", 50));


Thanks,
Andrei
On 9/1/2011 9:55 AM, Cronemberger, Constantino wrote:
Hi,



Is it possible to use a custom sequence generator?

I am trying to create a SessionCustomizer and store my sequence directly into getDatasourcePlatform().getSequences().



Thanks,

    Constantino
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top