Skip navigation links
oracle.toplink.tools.schemaframework
Class DefaultTableGenerator
java.lang.Object
oracle.toplink.tools.schemaframework.DefaultTableGenerator
- public class DefaultTableGenerator
- extends java.lang.Object
DefaultTableGenerator is a utility class used to generate a default table schema for a TopLink project object. The utility can be used in TopLink CMP for OC4J to perform the table auto creation process, which can be triggered at deployment time when TopLink project descriptor is absent (default mapping) or present. The utility can also be used to any TopLink application to perform the table drop/creation at runtime. The utility handles all direct/relational mappings, inheritance, multiple tables, interface with/without tables, optimistic version/timestamp lockings, nested relationships, BLOB/CLOB generation. The utility is platform-agnostic. Usage: - CMP 1. set "autocreate-tables=true|false, autodelete-tables=true|false" in oc4j application deployment descriptor files (config/system-application.xml, config/application.xml, or orion-application.xml in an .ear) 2. Default Mapping: the same as CMP, plus system properties setting -Dtoplink.defaultmapping.autocreate-tables='true|false' and -Dtoplink.defaultmapping.autodelete-tables='true|false' - Non-CMP: TODO: sessions.xml support (CR 4355200) 1. Configuration: through sessions.xml 2. Directly runtime call through schema framework: SchemaManager mgr = new SchemaManager(session); mgr.replaceDefaultTables(); //drop and create mgr.createDefaultTables(); //create only The utility currently only supports relational project.
- Since:
- Oracle TopLink 10.1.3
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultTableGenerator
public DefaultTableGenerator(Project project)
- Default construcotr
generateDefaultTableCreator
public TableCreator generateDefaultTableCreator()
- Generate a default TableCreator object from the TopLink project object.
generateFilteredDefaultTableCreator
public TableCreator generateFilteredDefaultTableCreator(Session session)
throws DatabaseException
- Generate a default TableCreator object from the TopLink project object, and porform the table existence check through jdbc table metadata, and filter out tables which are already in the database.
-
- Throws:
DatabaseException
Skip navigation links