org.apache.cayenne.dba.ingres

## Class IngresPkGenerator

- java.lang.Object
- - org.apache.cayenne.dba.JdbcPkGenerator
  - - org.apache.cayenne.dba.oracle.OraclePkGenerator
    - - org.apache.cayenne.dba.ingres.IngresPkGenerator

- All Implemented Interfaces:
    PkGenerator

      public class IngresPkGenerator
      extends OraclePkGenerator

  Ingres-specific sequence based PK generator.
  Since:
    1.2

- - ### Field Summary

    - ### Fields inherited from class org.apache.cayenne.dba.JdbcPkGenerator

      `adapter, DEFAULT_PK_CACHE_SIZE, pkCache, pkCacheSize, pkStartValue`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `IngresPkGenerator(JdbcAdapter adapter)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected List<String>` | `getExistingSequences(DataNode node)` Fetches a list of existing sequences that might match Cayenne generated ones.
    `protected long` | `longPkFromDatabase(DataNode node, DbEntity entity)` Generates primary key by calling Oracle sequence corresponding to the `dbEntity`.

    - ### Methods inherited from class org.apache.cayenne.dba.oracle.OraclePkGenerator

      `createAutoPk, createAutoPkStatements, createSequenceString, dropAutoPk, dropAutoPkStatements, dropSequenceString, pkCacheSize, sequenceName, stripSchemaName`

    - ### Methods inherited from class org.apache.cayenne.dba.JdbcPkGenerator

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

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### IngresPkGenerator

          protected IngresPkGenerator(JdbcAdapter adapter)

  - ### Method Detail

    - #### longPkFromDatabase

          protected long longPkFromDatabase(DataNode node,
                                            DbEntity entity)
                                     throws Exception

      Description copied from class: `OraclePkGenerator`
      Generates primary key by calling Oracle sequence corresponding to the `dbEntity`. Executed SQL looks like this:

             SELECT pk_table_name.nextval FROM DUAL

      Overrides:
        `longPkFromDatabase` in class `OraclePkGenerator`
      Throws:
        `Exception`

    - #### getExistingSequences

          protected List<String> getExistingSequences(DataNode node)
                                               throws SQLException

      Description copied from class: `OraclePkGenerator`
      Fetches a list of existing sequences that might match Cayenne generated ones.
      Overrides:
        `getExistingSequences` in class `OraclePkGenerator`
      Throws:
        `SQLException`

Copyright © 2001–2018 Apache Cayenne. All rights reserved.