# Class IngresPkGenerator

java.lang.Object
org.apache.cayenne.dba.JdbcPkGenerator
org.apache.cayenne.dba.SequencePkGenerator
org.apache.cayenne.dba.ingres.IngresPkGenerator

All Implemented Interfaces:
  `PkGenerator`

public class IngresPkGenerator extends SequencePkGenerator
Ingres-specific sequence based PK generator.

Since:
  1.2

- ## Field Summary

  ### Fields inherited from class JdbcPkGenerator

  `adapter, DEFAULT_PK_CACHE_SIZE, pkCache, pkCacheSize, pkStartValue`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IngresPkGenerator(JdbcAdapter adapter)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected String`
  `selectAllSequencesQuery()`
  Returns a database-specific query that lists the names of all existing sequences.
  `protected String`
  `selectNextValQuery(String sequenceName)`
  Returns a database-specific query to fetch the next value of the named sequence.

  ### Methods inherited from class SequencePkGenerator

  `createAutoPk, createAutoPkStatements, createSequenceString, dropAutoPk, dropAutoPkStatements, dropSequenceString, getExistingSequences, getSequencePrefix, longPkFromDatabase, pkCacheSize, sequenceName`

  ### Methods inherited from class JdbcPkGenerator

  `autoPkTableExists, dropAutoPkString, generatePk, getAdapter, getPkCacheSize, pkCreateString, pkDeleteString, pkSelectString, pkTableCreateString, pkUpdateString, reset, runUpdate, setPkCacheSize`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface PkGenerator

  `generatePk`

- ## Constructor Details

  - ### IngresPkGenerator

    public IngresPkGenerator(JdbcAdapter adapter)

- ## Method Details

  - ### selectNextValQuery

    protected String selectNextValQuery(String sequenceName)
    Description copied from class: `SequencePkGenerator`
    Returns a database-specific query to fetch the next value of the named sequence.
    Specified by:
      `selectNextValQuery` in class `SequencePkGenerator`

  - ### selectAllSequencesQuery

    protected String selectAllSequencesQuery()
    Description copied from class: `SequencePkGenerator`
    Returns a database-specific query that lists the names of all existing sequences.
    Specified by:
      `selectAllSequencesQuery` in class `SequencePkGenerator`