All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebean.platform.nuodb.NuoDbSequence Maven / Gradle / Ivy

package io.ebean.platform.nuodb;

import io.ebean.BackgroundExecutor;
import io.ebean.config.dbplatform.SequenceStepIdGenerator;

import javax.sql.DataSource;

public class NuoDbSequence extends SequenceStepIdGenerator {

  private final String nextSql;

  /**
   * Construct where batchSize is the sequence step size.
   */
  public NuoDbSequence(BackgroundExecutor be, DataSource ds, String seqName, int stepSize) {
    super(be, ds, seqName, stepSize);
    this.nextSql = "select next value for " + seqName + " from dual";
  }

  @Override
  public String getSql(int batchSize) {
    return nextSql;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy