Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
After creating a TableCreator
class (see "Creating a Table Creator"), you can use its API to create and drop tables. The important TableCreator
methods are as follows (each method takes an instance of DatabaseSession
):
createTables
–this method creates tables, adds constraints, and creates sequence tables and sequences (if sequence tables already exist, this method drops them and recreates them).
dropTables
–his method drops all constraints and drops all tables (except sequence tables) that the TableCreator
defines.
createConstraints
–this method creates constraints on all pre-existing tables that the TableCreator
defines.
dropConstraints
–this method drops constraints on all pre-existing tables that the TableCreator
defines.
replaceTables
–this method drops and then creates all tables that the TableCreator
defines.