Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.dba.frontbase
Class FrontBasePkGenerator

    java.lang.Object
      org.apache.cayenne.dba.JdbcPkGenerator
          org.apache.cayenne.dba.frontbase.FrontBasePkGenerator

All Implemented Interfaces:
  PkGenerator

    public class FrontBasePkGenerator

extends JdbcPkGenerator

Since:
  1.2
Author:
  Andrus Adamchik

Field Summary

Fields inherited from class org.apache.cayenne.dba.JdbcPkGenerator
`DEFAULT_PK_CACHE_SIZE, NEXT_ID, objDesc, pkCache, pkCacheSize, resultDesc`

Constructor Summary
`FrontBasePkGenerator()`

Method Summary
`void` | `createAutoPk(DataNode node, java.util.List dbEntities)` Generates necessary database objects to provide automatic primary key support.
`java.util.List` | `createAutoPkStatements(java.util.List dbEntities)` Returns a list of SQL strings needed to generates database objects to provide automatic primary support for the list of entities.
`void` | `dropAutoPk(DataNode node, java.util.List dbEntities)` Drops table named "AUTO_PK_SUPPORT" if it exists in the database.
`protected java.lang.String` | `dropAutoPkString()`
`int` | `getPkCacheSize()` Retruns zero as PK caching is not supported by FrontBaseAdapter.
`protected java.lang.String` | `pkCreateString(java.lang.String entName)`
`protected java.lang.String` | `pkDeleteString(java.util.List dbEntities)`
`protected int` | `pkFromDatabase(DataNode node, DbEntity entity)` Performs primary key generation ignoring cache.
`protected java.lang.String` | `pkSelectString(java.lang.String entName)`
`protected java.lang.String` | `pkTableCreateString()`
`protected java.lang.String` | `pkUpdateString(java.lang.String entName)`

Methods inherited from class org.apache.cayenne.dba.JdbcPkGenerator
`autoPkTableExists, binaryPK, dropAutoPkStatements, generatePkForDbEntity, generatePkForDbEntityString, reset, runUpdate, setPkCacheSize`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FrontBasePkGenerator

    public FrontBasePkGenerator()

Method Detail

### getPkCacheSize

    public int getPkCacheSize()

  Retruns zero as PK caching is not supported by FrontBaseAdapter.

  Overrides:
    `getPkCacheSize` in class `JdbcPkGenerator`

### createAutoPk

    public void createAutoPk(DataNode node,
                             java.util.List dbEntities)
                      throws java.lang.Exception

  Description copied from interface: `PkGenerator`
  Generates necessary database objects to provide automatic primary key support.

  Specified by:
    `createAutoPk` in interface `PkGenerator`
  Overrides:
    `createAutoPk` in class `JdbcPkGenerator`
  Parameters:
    `node` - node that provides access to a DataSource.
    `dbEntities` - a list of entities that require primary key autogeneration support
  Throws:
    `java.lang.Exception`

### createAutoPkStatements

    public java.util.List createAutoPkStatements(java.util.List dbEntities)

  Description copied from interface: `PkGenerator`
  Returns a list of SQL strings needed to generates database objects to provide automatic primary support for the list of entities. No actual database operations are performed.

  Specified by:
    `createAutoPkStatements` in interface `PkGenerator`
  Overrides:
    `createAutoPkStatements` in class `JdbcPkGenerator`

### dropAutoPk

    public void dropAutoPk(DataNode node,
                           java.util.List dbEntities)
                    throws java.lang.Exception

  Description copied from class: `JdbcPkGenerator`
  Drops table named "AUTO_PK_SUPPORT" if it exists in the database.

  Specified by:
    `dropAutoPk` in interface `PkGenerator`
  Overrides:
    `dropAutoPk` in class `JdbcPkGenerator`
  Parameters:
    `node` - node that provides access to a DataSource.
    `dbEntities` - a list of entities whose primary key autogeneration support should be dropped.
  Throws:
    `java.lang.Exception`

### pkTableCreateString

    protected java.lang.String pkTableCreateString()

  Overrides:
    `pkTableCreateString` in class `JdbcPkGenerator`

### pkDeleteString

    protected java.lang.String pkDeleteString(java.util.List dbEntities)

  Overrides:
    `pkDeleteString` in class `JdbcPkGenerator`

### pkCreateString

    protected java.lang.String pkCreateString(java.lang.String entName)

  Overrides:
    `pkCreateString` in class `JdbcPkGenerator`

### pkSelectString

    protected java.lang.String pkSelectString(java.lang.String entName)

  Overrides:
    `pkSelectString` in class `JdbcPkGenerator`

### pkUpdateString

    protected java.lang.String pkUpdateString(java.lang.String entName)

  Overrides:
    `pkUpdateString` in class `JdbcPkGenerator`

### dropAutoPkString

    protected java.lang.String dropAutoPkString()

  Overrides:
    `dropAutoPkString` in class `JdbcPkGenerator`

### pkFromDatabase

    protected int pkFromDatabase(DataNode node,
                                 DbEntity entity)
                          throws java.lang.Exception

  Description copied from class: `JdbcPkGenerator`
  Performs primary key generation ignoring cache. Generates a range of primary keys as specified by "pkCacheSize" bean property.

  This method is called internally from "generatePkForDbEntity" and then generated range of key values is saved in cache for performance. Subclasses that implement different primary key generation solutions should override this method, not "generatePkForDbEntity".

  Overrides:
    `pkFromDatabase` in class `JdbcPkGenerator`
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.