|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.schema.TableSchemaFactory
public class TableSchemaFactory
Factory that uses an XML schema definition stored in a database table to record the system schema.
| Field Summary | |
|---|---|
static java.lang.String |
ACTION_ADD
|
static java.lang.String |
ACTION_DROP
|
| Constructor Summary | |
|---|---|
TableSchemaFactory()
|
|
| Method Summary | |
|---|---|
void |
dropTable()
Drops the sequence table in the DB. |
void |
endConfiguration()
|
JDBCConfiguration |
getConfiguration()
|
java.lang.String |
getPrimaryKeyColumn()
The name of the primary key column on the schema definition table. |
java.lang.String |
getSchemaColumn()
The name of the schema column on the schema definition table. |
java.lang.String |
getTable()
The name of the schema definition table. |
static void |
main(java.lang.String[] args)
Usage: java org.apache.openjpa.jdbc.schema.TableSchemaFactory [option]* -action/-a <add | drop> Where the following options are recognized. |
SchemaGroup |
readSchema()
Return the schema group for the current object model and database. |
java.lang.String |
readSchemaColumn()
Returns the schema as an XML string. |
void |
refreshTable()
Creates the schema table in the DB. |
static boolean |
run(JDBCConfiguration conf,
java.lang.String action)
Run the tool. |
static boolean |
run(JDBCConfiguration conf,
java.lang.String[] args,
Options opts)
Run the tool. |
void |
setConfiguration(Configuration conf)
|
void |
setPrimaryKeyColumn(java.lang.String name)
The name of the primary key column on the schema definition table. |
void |
setSchemaColumn(java.lang.String name)
The name of the schema column on the schema definition table. |
void |
setTable(java.lang.String name)
The name of the schema definition table. |
void |
setTableName(java.lang.String name)
Deprecated. Use setTable(java.lang.String). Retained for
backwards-compatible auto-configuration. |
void |
startConfiguration()
|
void |
storeSchema(SchemaGroup schema)
Record the schema group after changes may have been made. |
void |
writeSchemaColumn(java.lang.String schema)
Writes the schema 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 |
|---|
public static final java.lang.String ACTION_ADD
public static final java.lang.String ACTION_DROP
| Constructor Detail |
|---|
public TableSchemaFactory()
| Method Detail |
|---|
public java.lang.String getTable()
OPENJPA_SCHEMA.
public void setTable(java.lang.String name)
OPENJPA_SCHEMA.
public void setTableName(java.lang.String name)
setTable(java.lang.String). Retained for
backwards-compatible auto-configuration.
public void setPrimaryKeyColumn(java.lang.String name)
ID.
public java.lang.String getPrimaryKeyColumn()
ID.
public void setSchemaColumn(java.lang.String name)
SCHEMA_DEF.
public java.lang.String getSchemaColumn()
SCHEMA_DEF.
public JDBCConfiguration getConfiguration()
public void setConfiguration(Configuration conf)
setConfiguration in interface Configurablepublic void startConfiguration()
startConfiguration in interface Configurablepublic void endConfiguration()
endConfiguration in interface Configurablepublic SchemaGroup readSchema()
SchemaFactory
readSchema in interface SchemaFactorypublic void storeSchema(SchemaGroup schema)
SchemaFactory
storeSchema in interface SchemaFactoryschema - the schema definition for the entire system
public void refreshTable()
throws java.sql.SQLException
java.sql.SQLException
public void dropTable()
throws java.sql.SQLException
java.sql.SQLException
public java.lang.String readSchemaColumn()
throws java.sql.SQLException
java.sql.SQLException
public void writeSchemaColumn(java.lang.String schema)
throws java.sql.SQLException
java.sql.SQLException
public static void main(java.lang.String[] args)
throws java.io.IOException,
java.sql.SQLException
JDBCConfiguration. Optional.JDBCConfiguration can be set by
using their names and supplying a value. For example:
-licenseKey adslfja83r3lkadf
java.io.IOException
java.sql.SQLException
public static boolean run(JDBCConfiguration conf,
java.lang.String[] args,
Options opts)
throws java.io.IOException,
java.sql.SQLException
java.io.IOException
java.sql.SQLExceptionmain(java.lang.String[])
public static boolean run(JDBCConfiguration conf,
java.lang.String action)
throws java.io.IOException,
java.sql.SQLException
java.io.IOException
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||