code: public Long getNextValAsLong()
          throws EFapsException
      {
          long ret = 0;
          try {
              ret = Context.getDbType().nextSequence(Context.getThreadContext().getConnectionResource(),
                              getDBName());
          } catch (final SQLException e) {
              throw new EFapsException(NumberGenerator.class, " getNextValAsLong()", e);
          }
          return ret;
      }
docs: Method to get the next long value for this sequence. To get the formated
  value use {@link #getNextVal()}
  
  @return next value for this sequence
  @throws EFapsException on error