Kodo 4.1.4 generated on June 22 2007

kodo.jdo.jdbc
Class TableDeprecatedJDOMappingFactory

java.lang.Object
  extended by org.apache.openjpa.meta.AbstractMetaDataFactory
      extended by org.apache.openjpa.meta.AbstractCFMetaDataFactory
          extended by kodo.jdo.JDOMetaDataFactory
              extended by kodo.jdo.DeprecatedJDOMetaDataFactory
                  extended by kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory
                      extended by kodo.jdo.jdbc.TableDeprecatedJDOMappingFactory
All Implemented Interfaces:
ApplicationIdTool.ObjectIdLoader, Configurable, MetaDataFactory, MetaDataModes

public class TableDeprecatedJDOMappingFactory
extends kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory
implements 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
AbstractCFMetaDataFactory.Parser, 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(JDBCConfiguration conf, String action)
          Run the tool.
static boolean run(JDBCConfiguration conf, String[] args, Options opts)
          Run the tool.
 void setConfiguration(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(ClassMetaData[] metas, QueryMetaData[] queries, 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, getResultSetMappingScope, 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 MetaDataFactory
Overrides:
clear in class JDOMetaDataFactory

getPersistentTypeNames

public Set getPersistentTypeNames(boolean devpath,
                                  ClassLoader envLoader)
Specified by:
getPersistentTypeNames in interface MetaDataFactory
Overrides:
getPersistentTypeNames in class AbstractCFMetaDataFactory

load

public void load(Class cls,
                 int mode,
                 ClassLoader envLoader)
Specified by:
load in interface MetaDataFactory
Overrides:
load in class JDOMetaDataFactory

store

public boolean store(ClassMetaData[] metas,
                     QueryMetaData[] queries,
                     SequenceMetaData[] seqs,
                     int mode,
                     Map output)
Specified by:
store in interface MetaDataFactory
Overrides:
store in class AbstractCFMetaDataFactory

drop

public boolean drop(Class[] cls,
                    int mode,
                    ClassLoader envLoader)
Specified by:
drop in interface MetaDataFactory
Overrides:
drop in class 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(Configuration conf)
Specified by:
setConfiguration in interface Configurable

startConfiguration

public void startConfiguration()
Specified by:
startConfiguration in interface Configurable

endConfiguration

public void endConfiguration()
Specified by:
endConfiguration in interface 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.

The various actions are as follows.

Throws:
IOException
SQLException

run

public static boolean run(JDBCConfiguration conf,
                          String[] args,
                          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(JDBCConfiguration conf,
                          String action)
                   throws IOException,
                          SQLException
Run the tool.

Throws:
IOException
SQLException

Kodo 4.1.4 generated on June 22 2007

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