Overview | Package | Class | Tree | Deprecated | Index | Help
| Kodo 4.1.0 generated on October 9 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.jdo.jdbc
Class TableDeprecatedJDOMappingFactory

    java.lang.Object
      org.apache.openjpa.meta.AbstractMetaDataFactory
          org.apache.openjpa.meta.AbstractCFMetaDataFactory
              kodo.jdo.JDOMetaDataFactory
                  kodo.jdo.DeprecatedJDOMetaDataFactory
                      kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory
                          kodo.jdo.jdbc.TableDeprecatedJDOMappingFactory

All Implemented Interfaces:
  org.apache.openjpa.enhance.ApplicationIdTool.ObjectIdLoader, org.apache.openjpa.lib.conf.Configurable, org.apache.openjpa.meta.MetaDataFactory, org.apache.openjpa.meta.MetaDataModes

    public class TableDeprecatedJDOMappingFactory

extends kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory
implements org.apache.openjpa.lib.conf.Configurable

Specialization of the `DeprecatedJDOMetaDataFactory` for mapping data stored in a database table.

Nested Class Summary

Nested classes/interfaces inherited from class kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory
`kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory.ClassMappingAttrs, kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory.FieldMappingAttrs, kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory.MappingAttrs, kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory.MappingAttrsParser, kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory.MappingAttrsRepository, kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory.MappingAttrsSerializer`

Nested classes/interfaces inherited from class kodo.jdo.DeprecatedJDOMetaDataFactory
`DeprecatedJDOMetaDataFactory.ExtensionTranslatingParser`

Nested classes/interfaces inherited from class org.apache.openjpa.meta.AbstractCFMetaDataFactory
`org.apache.openjpa.meta.AbstractCFMetaDataFactory.Parser, org.apache.openjpa.meta.AbstractCFMetaDataFactory.Serializer`

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

Fields inherited from class kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory
`CLASS_EXTENSIONS, EXT_CLASS_IND_NAME, EXT_CLASS_IND_VALUE, EXT_CLASS_MAP_NAME, EXT_DELETE_ACTION, EXT_FIELD_MAP_NAME, EXT_INDEXED, EXT_JDBC_TYPE, EXT_NULL_IND, EXT_ORDERED, EXT_SIZE, EXT_SQL_TYPE, EXT_VERSION_IND_NAME, FIELD_EXTENSIONS, JDBC, JDBC_CLASS_IND, JDBC_VERSION_IND, KODO, REF`

Fields inherited from class kodo.jdo.DeprecatedJDOMetaDataFactory
`ELEMENT, EXT_AUTO_INCREMENT, EXT_DEPENDENT, EXT_DETACHABLE, EXT_EAGER_FETCH_MODE, EXT_FETCH_GROUP, EXT_INVERSE_OWNER, EXT_SEQUENCE_ASSIGNED, EXT_SEQUENCE_FACTORY, EXT_SEQUENCE_NAME, EXT_SUBCLASS_FETCH_MODE, KEY, VALUE`

Fields inherited from class org.apache.openjpa.meta.AbstractCFMetaDataFactory
`cpath, files, rsrcs, urls`

Fields inherited from class org.apache.openjpa.meta.AbstractMetaDataFactory
`dir, log, repos, store, strict, types`

Fields inherited from interface org.apache.openjpa.meta.MetaDataFactory
`STORE_DEFAULT, STORE_PER_CLASS, STORE_VERBOSE`

Fields inherited from interface org.apache.openjpa.meta.MetaDataModes
`MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY`

Constructor Summary
`TableDeprecatedJDOMappingFactory()`

Method Summary
`void` | `clear()`
`int` | `deleteMappingRow(String name)` Delete the row with the given name.
`boolean` | `drop(Class[] cls, int mode, ClassLoader envLoader)`
`void` | `dropTable()` Drops the mapping table in the DB.
`void` | `endConfiguration()`
`String` | `getMappingColumn()` The name of the mapping column on the mapping definition table.
`String` | `getNameColumn()` The name of the name on the mapping table.
`Set` | `getPersistentTypeNames(boolean devpath, ClassLoader envLoader)`
`String` | `getTableName()` The name of the mapping definition table.
`boolean` | `isSingleRow()` Whether to use a single row for all mapping data.
`void` | `load(Class cls, int mode, ClassLoader envLoader)`
`static void` | `main(String[] args)` Usage: java kodo.jdbc.meta.TableDeprecatedJDOMappingFactory [option]* -action/-a <add | drop>
`String` | `readMappingColumn(String name)` Returns the mapping column data for the given class.
`void` | `refreshTable()` Creates the schema table in the DB.
`static boolean` | `run(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf, String action)` Run the tool.
`static boolean` | `run(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf, String[] args, org.apache.openjpa.lib.util.Options opts)` Run the tool.
`void` | `setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)`
`void` | `setMappingColumn(String name)` The name of the mapping column on the mapping definition table.
`void` | `setNameColumn(String name)` The name of the name on the mapping table.
`void` | `setSingleRow(boolean single)` Whether to use a single row for all mapping data.
`void` | `setTableName(String name)` The name of the schema definition table.
`void` | `startConfiguration()`
`boolean` | `store(org.apache.openjpa.meta.ClassMetaData[] metas, org.apache.openjpa.meta.QueryMetaData[] queries, org.apache.openjpa.meta.SequenceMetaData[] seqs, int mode, Map output)`
`void` | `writeMappingColumn(String name, String mapping)` Writes the mapping as a string to the database.

Methods inherited from class kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory
`addClassExtensionKeys, addFieldExtensionKeys, fromMappingAttrs, newMappingParser, newMappingSerializer, setStrict, stripDeprecatedExtensions, stripMappingExtensions, toMappingAttrs, translateClassExtension, translateFieldExtension`

Methods inherited from class kodo.jdo.DeprecatedJDOMetaDataFactory
`newParser`

Methods inherited from class kodo.jdo.JDOMetaDataFactory
`defaultSourceFile, defaultSourceFile, defaultSourceFile, getDefaults, getMetaDataSuffix, getParser, isDeclaredInterfacePersistent, isParseTopDown, isScanTopDown, newClassArgParser, newMetaDataFilter, newSerializer, setDeclaredInterfacePersistent, setLoadObjectIds, setParser, setScanTopDown, setUseSchemaValidation, useSchemaValidation`

Methods inherited from class org.apache.openjpa.meta.AbstractCFMetaDataFactory
`backupAndDelete, clearMapping, getDefiningMetaData, getSourceFile, getSourceFile, isMappingOnlyFactory, mapPersistentTypeNames, parse, parse, serialize, setClasspathScan, setClasspathScan, setFiles, setFiles, setResources, setResources, setSourceFile, setSourceFile, setURLs, setURLs`

Methods inherited from class org.apache.openjpa.meta.AbstractMetaDataFactory
`getQueryScope, setRepository, setStoreDirectory, setStoreMode, setTypes, setTypes`

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

See Also:
  Constant Field Values

### ACTION_DROP

    public static final String ACTION_DROP

See Also:
  Constant Field Values

Constructor Detail

### TableDeprecatedJDOMappingFactory

    public TableDeprecatedJDOMappingFactory()

Method Detail

### isSingleRow

    public boolean isSingleRow()

  Whether to use a single row for all mapping data. Defaults to false.

### setSingleRow

    public void setSingleRow(boolean single)

  Whether to use a single row for all mapping data. Defaults to false.

### getTableName

    public String getTableName()

  The name of the mapping definition table. Defaults to `JDO_MAPPING`.

### setTableName

    public void setTableName(String name)

  The name of the schema definition table. Defaults to `JDO_MAPPING`.

### setNameColumn

    public void setNameColumn(String name)

  The name of the name on the mapping table. Defaults to `NAME`.

### getNameColumn

    public String getNameColumn()

  The name of the name on the mapping table. Defaults to `NAME`.

### setMappingColumn

    public void setMappingColumn(String name)

  The name of the mapping column on the mapping definition table. Defaults to `MAPPING_DEF`.

### getMappingColumn

    public String getMappingColumn()

  The name of the mapping column on the mapping definition table. Defaults to `MAPPING_DEF`.

### clear

    public void clear()

  Specified by:
    `clear` in interface `org.apache.openjpa.meta.MetaDataFactory`
  Overrides:
    `clear` in class `JDOMetaDataFactory`

### getPersistentTypeNames

    public Set getPersistentTypeNames(boolean devpath,
                                      ClassLoader envLoader)

  Specified by:
    `getPersistentTypeNames` in interface `org.apache.openjpa.meta.MetaDataFactory`
  Overrides:
    `getPersistentTypeNames` in class `org.apache.openjpa.meta.AbstractCFMetaDataFactory`

### load

    public void load(Class cls,
                     int mode,
                     ClassLoader envLoader)

  Specified by:
    `load` in interface `org.apache.openjpa.meta.MetaDataFactory`
  Overrides:
    `load` in class `JDOMetaDataFactory`

### store

    public boolean store(org.apache.openjpa.meta.ClassMetaData[] metas,
                         org.apache.openjpa.meta.QueryMetaData[] queries,
                         org.apache.openjpa.meta.SequenceMetaData[] seqs,
                         int mode,
                         Map output)

  Specified by:
    `store` in interface `org.apache.openjpa.meta.MetaDataFactory`
  Overrides:
    `store` in class `org.apache.openjpa.meta.AbstractCFMetaDataFactory`

### drop

    public boolean drop(Class[] cls,
                        int mode,
                        ClassLoader envLoader)

  Specified by:
    `drop` in interface `org.apache.openjpa.meta.MetaDataFactory`
  Overrides:
    `drop` in class `org.apache.openjpa.meta.AbstractCFMetaDataFactory`

### refreshTable

    public void refreshTable()
                      throws SQLException

  Creates the schema table in the DB.

  Throws:
    `SQLException`

### dropTable

    public void dropTable()
                   throws SQLException

  Drops the mapping table in the DB.

  Throws:
    `SQLException`

### readMappingColumn

    public String readMappingColumn(String name)
                             throws SQLException

  Returns the mapping column data for the given class.

  Throws:
    `SQLException`

### writeMappingColumn

    public void writeMappingColumn(String name,
                                   String mapping)
                            throws SQLException

  Writes the mapping as a string to the database.

  Throws:
    `SQLException`

### deleteMappingRow

    public int deleteMappingRow(String name)
                         throws SQLException

  Delete the row with the given name.

  Returns:
    the update count
  Throws:
    `SQLException`

### setConfiguration

    public void setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)

  Specified by:
    `setConfiguration` in interface `org.apache.openjpa.lib.conf.Configurable`

### startConfiguration

    public void startConfiguration()

  Specified by:
    `startConfiguration` in interface `org.apache.openjpa.lib.conf.Configurable`

### endConfiguration

    public void endConfiguration()

  Specified by:
    `endConfiguration` in interface `org.apache.openjpa.lib.conf.Configurable`

### main

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

  Usage: java kodo.jdbc.meta.TableDeprecatedJDOMappingFactory [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 mapping table.
  - drop: Drop the mapping table.

  Throws:
    `IOException`
    `SQLException`

### run

    public static boolean run(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf,
                              String[] args,
                              org.apache.openjpa.lib.util.Options opts)
                       throws IOException,
                              SQLException

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

  Throws:
    `IOException`
    `SQLException`
  See Also:
    `main(java.lang.String[])`

### run

    public static boolean run(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf,
                              String action)
                       throws IOException,
                              SQLException

  Run the tool.

  Throws:
    `IOException`
    `SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Kodo 4.1.0 generated on October 9 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.