Kodo 4.2.0. (DEPRECATED)

kodo.jdo.jdbc
Class TableDeprecatedJDOMappingFactory

java.lang.Object
  extended by AbstractDeprecatedJDOMappingFactory
      extended by kodo.jdo.jdbc.TableDeprecatedJDOMappingFactory
All Implemented Interfaces:
Configurable

public class TableDeprecatedJDOMappingFactory
extends AbstractDeprecatedJDOMappingFactory
implements Configurable

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


Field Summary
static String ACTION_ADD
           
static String ACTION_DROP
           
 
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 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()

getPersistentTypeNames

public Set getPersistentTypeNames(boolean devpath,
                                  ClassLoader envLoader)

load

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

store

public boolean store(ClassMetaData[] metas,
                     QueryMetaData[] queries,
                     SequenceMetaData[] seqs,
                     int mode,
                     Map output)

drop

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

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.2.0. (DEPRECATED)

Copyright 2011 Oracle, Inc. All Rights Reserved.

This documentation is deprecated and will be removed in the next release of WebLogic Server.


Oracle Fusion Middleware Oracle Kodo 4.2.0 API Reference (DEPRECATED)
12c Release 1 (12.1.1)
Part Number E24400_01