Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.2.4 generated on January 7 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.jdbc.schema
Class DBSchemaFactory

    java.lang.Object
      |
      +--kodo.jdbc.schema.DBSchemaFactory

All Implemented Interfaces:
  Configurable, SchemaFactory

public class DBSchemaFactory
extends Object
implements SchemaFactory, Configurable

Factory that uses an XML schema definition stored in the database to record the system schema.

Field Summary
`static String` | `ACTION_ADD`
`static String` | `ACTION_DROP`

Constructor Summary
`DBSchemaFactory()`

Method Summary
`void` | `dropTable()` Drops the sequence table in the DB.
`void` | `endConfiguration()` Invoked upon completion of bean property configuration for this object.
`JDBCConfiguration` | `getConfiguration()`
`protected Connection` | `getConnection()` Return a connection to use.
`Column` | `getPKColumn()`
`Column` | `getSchemaColumn()`
`String` | `getTableName()` The name of the mapping information table.
`static void` | `main(String[] args)` Usage: java kodo.jdbc.schema.DBSchemaFactory [option]* -action/-a <add | drop>
`SchemaGroup` | `readSchema()` Return the schema group for the current object model and database.
`String` | `readSchemaColumn()` Returns the schema as an XML string.
`void` | `refreshTable()` Creates the schema table in the DB.
`static boolean` | `run(JDBCConfiguration conf, String action)` Run the tool.
`static boolean` | `run(JDBCConfiguration conf, String[] args, serp.util.Options opts)` Run the tool.
`void` | `setConfiguration(Configuration conf)` Invoked prior to setting bean properties.
`void` | `setTableName(String name)` The name of the mapping information table.
`void` | `startConfiguration()` Invoked before bean property configuration is begun on this object.
`void` | `storeSchema(SchemaGroup schema)` Record the schema group after changes may have been made.
`void` | `writeSchemaColumn(String schema)` Writes the schema as a string to the database.

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

Field Detail

### ACTION_ADD

    public static final String ACTION_ADD

### ACTION_DROP

    public static final String ACTION_DROP

Constructor Detail

### DBSchemaFactory

    public DBSchemaFactory()

Method Detail

### getTableName

    public String getTableName()

  The name of the mapping information table. Defaults to `JDO_SCHEMA`.

### setTableName

    public void setTableName(String name)

  The name of the mapping information table. Defaults to `JDO_SCHEMA`.

### getConfiguration

    public JDBCConfiguration getConfiguration()

### setConfiguration

    public void setConfiguration(Configuration conf)

  Description copied from interface: `Configurable`
  Invoked prior to setting bean properties.
  Specified by:
    `setConfiguration` in interface `Configurable`

### startConfiguration

    public void startConfiguration()

  Description copied from interface: `Configurable`
  Invoked before bean property configuration is begun on this object.
  Specified by:
    `startConfiguration` in interface `Configurable`

### endConfiguration

    public void endConfiguration()

  Description copied from interface: `Configurable`
  Invoked upon completion of bean property configuration for this object.
  Specified by:
    `endConfiguration` in interface `Configurable`

### getPKColumn

    public Column getPKColumn()

### getSchemaColumn

    public Column getSchemaColumn()

### readSchema

    public SchemaGroup readSchema()

  Description copied from interface: `SchemaFactory`
  Return the schema group for the current object model and database.
  Specified by:
    `readSchema` in interface `SchemaFactory`

### storeSchema

    public void storeSchema(SchemaGroup schema)

  Description copied from interface: `SchemaFactory`
  Record the schema group after changes may have been made.
  Specified by:
    `storeSchema` in interface `SchemaFactory`
  Following copied from interface: `kodo.jdbc.schema.SchemaFactory`
  Parameters:
    `schema` - the schema definition for the entire system

### refreshTable

    public void refreshTable()
                      throws SQLException

  Creates the schema table in the DB.

### dropTable

    public void dropTable()
                   throws SQLException

  Drops the sequence table in the DB.

### readSchemaColumn

    public String readSchemaColumn()
                            throws SQLException

  Returns the schema as an XML string.

### writeSchemaColumn

    public void writeSchemaColumn(String schema)
                           throws SQLException

  Writes the schema as a string to the database.

### getConnection

    protected Connection getConnection()
                                throws SQLException

  Return a connection to use.

### main

    public static void main(String[] args)
                     throws IOException,
                            SQLException

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

  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 schema table.
  - drop: Drop the schema table.

### run

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

  Run the tool. Returns false if invalid options were given.
  See Also:
    `main(java.lang.String[])`

### run

    public static boolean run(JDBCConfiguration conf,
                              String action)
                       throws IOException,
                              SQLException

  Run the tool.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.2.4 generated on January 7 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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