Skip Headers

# Using Java

Previous

Next

Using Java, you can configure a project to use multiple, different sequences as Example: Configuring Sequencing at the Project Level in Java shows.

Configuring Sequencing at the Project Level in Java

    // Enable native sequencing for the project as the default. Configured the default preallocation size
    project.getLogin().useNativeSequencing();
    project.getLogin().setSequencePreallocationSize(50);

    // Configure the EMP_SEQ to not use preallocation
    DefaultSequence empSequence = new DefaultSequence("EMP_SEQ", 1);
    project.getLogin().addSequence(empSequence);

    // Configure the PROJ_SEQ to use a seperate sequence table
    UnarySequence projSequence = new UnarySequence("PROJ_SEQ_TAB", "COUNTER");
    project.getLogin().addSequence(projSequence);