Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.jdbc.schema
Class ClassDBSequenceFactory

    java.lang.Object
      |
      +--kodo.jdbc.schema.DBSequenceFactory
            |
            +--kodo.jdbc.schema.ClassDBSequenceFactory

All Implemented Interfaces:
  Configurable, SequenceFactory

public class ClassDBSequenceFactory
extends DBSequenceFactory

Specialization of the `DBSequenceFactory` that maintains a separate sequence count per-class.

Inner classes inherited from class kodo.jdbc.schema.DBSequenceFactory
`DBSequenceFactory.Seq`

Fields inherited from class kodo.jdbc.schema.DBSequenceFactory
`ACTION_ADD, ACTION_DROP, ACTION_INCREMENT`

Constructor Summary
`ClassDBSequenceFactory()`

Method Summary
`protected Column` | `addPrimaryKeyColumn(Table table)` Add the primary key column to the given table and return it.
`boolean` | `getIgnoreVirtual()` Returns true if virtually mapped (i.e.
`protected Object` | `getPrimaryKey(ClassMapping mapping)` Return the primary key value for the given mapping.
`protected DBSequenceFactory.Seq` | `getSeq(ClassMapping mapping)` Return the appropriate sequence info object for the given mapping.
`static void` | `main(String[] args)` Usage: java kodo.jdbc.schema.ClassDBSequenceFactory [option]* -action/-a <add | drop | increment>
`static boolean` | `run(JDBCConfiguration conf, String[] args, serp.util.Options opts)` Run the tool.
`static boolean` | `run(JDBCConfiguration conf, String action, Writer out)` Run the tool.
`void` | `setIgnoreVirtual(boolean ignore)` Set to true if virtually mapped (i.e.

Methods inherited from class kodo.jdbc.schema.DBSequenceFactory
`addSchema, dropTable, endConfiguration, ensureCapacity, getConfiguration, getConnection, getIncrement, getNext, getNext, getPrimaryKeyColumn, getSequenceColumn, getTableName, refreshTable, setConfiguration, setIncrement, setPrimaryKeyColumn, setSequenceColumn, setTableName, startConfiguration`

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

Constructor Detail

### ClassDBSequenceFactory

    public ClassDBSequenceFactory()

Method Detail

### getIgnoreVirtual

    public boolean getIgnoreVirtual()

  Returns true if virtually mapped (i.e. horizontal) classes should be ignored as possible primary key values in the table. Defaults to false

### setIgnoreVirtual

    public void setIgnoreVirtual(boolean ignore)

  Set to true if virtually mapped (i.e. horizontal) classes should be ignored as possible primary key values in the table.

### getSeq

    protected DBSequenceFactory.Seq getSeq(ClassMapping mapping)

  Description copied from class: `DBSequenceFactory`
  Return the appropriate sequence info object for the given mapping.
  Overrides:
    `getSeq` in class `DBSequenceFactory`

### addPrimaryKeyColumn

    protected Column addPrimaryKeyColumn(Table table)

  Description copied from class: `DBSequenceFactory`
  Add the primary key column to the given table and return it.
  Overrides:
    `addPrimaryKeyColumn` in class `DBSequenceFactory`

### getPrimaryKey

    protected Object getPrimaryKey(ClassMapping mapping)

  Description copied from class: `DBSequenceFactory`
  Return the primary key value for the given mapping.
  Overrides:
    `getPrimaryKey` in class `DBSequenceFactory`

### main

    public static void main(String[] args)
                     throws Exception

  Usage: java kodo.jdbc.schema.ClassDBSequenceFactory [option]* -action/-a <add | drop | increment>

  Where the following options are recognized.

  - -properties/-p <properties file or resource>: The path or resource name of a Kodo properties file containing information such as the license key and connection data as outlined in `JDBCConfiguration`. Optional.
  - -<property name> <property value>: All bean properties of the Kodo `JDBCConfiguration` can be set by using their names and supplying a value. For example: `-licenseKey adslfja83r3lkadf`

  The various actions are as follows.

  - add: Create the sequence table.
  - drop: Drop the sequence table.
  - increment: Increment the sequence value.

### run

    public static boolean run(JDBCConfiguration conf,
                              String[] args,
                              serp.util.Options opts)
                       throws Exception

  Run the tool. Returns false if invalid options were given.

### run

    public static boolean run(JDBCConfiguration conf,
                              String action,
                              Writer out)
                       throws Exception

  Run the tool. Return false if an invalid option was given.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.