|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.solarmetric.rd.kodo.impl.jdbc.meta.MappingTool
Tool for manipulating class mappings and associated schema.
| Field Summary | |
static java.lang.String |
ACTION_BUILD_SCHEMA
|
static java.lang.String |
ACTION_DROP
|
static java.lang.String |
ACTION_EXPORT
|
static java.lang.String |
ACTION_IMPORT
|
static java.lang.String |
ACTION_REFRESH
|
static java.lang.String |
ACTION_REVERT
|
static java.lang.String |
ACTION_VALIDATE
|
| Constructor Summary | |
MappingTool(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
Constructor. |
|
| Method Summary | |
void |
buildSchema(java.lang.Class cls)
Update the schema to match the tables and columns dictated by the mappings. |
void |
clear()
Reset the internal repository. |
void |
drop(java.lang.Class cls)
Remove the given mapping from the list. |
java.io.Writer |
getMappingWriter()
The stream to export the planned mappings to as an XML document. |
boolean |
getReadSchema()
Set to false to prevent reading of the entire schema before mapping. |
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository |
getRepository()
Return the repository to use to access mapping information. |
java.lang.String |
getSchemaAction()
The schema modification policy. |
com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup |
getSchemaGroup()
Return the schema group to use in mapping. |
com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaTool |
getSchemaTool()
Return the schema tool to use for schema modification. |
java.io.Writer |
getSchemaWriter()
The stream to export the planned schema to as an XML document. |
static void |
main(java.lang.String[] args)
Usage: java com.solarmetric.kodo.impl.jdbc.meta.MappingTool [option]* -action/-a <refresh | drop | validate | buildSchema | revert | import | export> <class name | .java file | .class file | .jdo file>+ |
void |
record()
Records the changes that have been made to both the mappings and the associated schema, and clears the tool for further use. |
void |
refresh(java.lang.Class cls)
Refresh or add the mapping for the given instance. |
void |
revert(java.lang.Class cls)
Revert the given mapping to its previous state. |
static boolean |
run(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf,
java.lang.String action,
java.lang.String[] args,
java.io.Writer mappingWriter,
java.lang.String schema,
boolean dropTables,
boolean ignoreErrors,
boolean readSchema,
java.io.Writer schemaWriter,
java.lang.ClassLoader loader)
Run the tool. |
void |
setMappingWriter(java.io.Writer mappingWriter)
The stream to export the planned mappings to as an XML document. |
void |
setReadSchema(boolean readSchema)
Set to false to prevent reading of the entire schema before mapping. |
void |
setRepository(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository repos)
Set the repository to use to access mapping information. |
void |
setSchemaAction(java.lang.String schemaAction)
The schema modification policy. |
void |
setSchemaGroup(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema)
Set the schema to use in mapping. |
void |
setSchemaTool(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaTool tool)
Set the schema tool to use for schema modification. |
void |
setSchemaWriter(java.io.Writer schemaWriter)
The stream to export the planned schema to as an XML document. |
void |
validate(java.lang.Class cls)
Validate the mappings for the given class and its fields. |
| 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_REFRESH
public static final java.lang.String ACTION_DROP
public static final java.lang.String ACTION_VALIDATE
public static final java.lang.String ACTION_REVERT
public static final java.lang.String ACTION_EXPORT
public static final java.lang.String ACTION_IMPORT
public static final java.lang.String ACTION_BUILD_SCHEMA
| Constructor Detail |
public MappingTool(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
| Method Detail |
public java.lang.String getSchemaAction()
SchemaTool.ACTION_ADD.
public void setSchemaAction(java.lang.String schemaAction)
SchemaTool.ACTION_ADD.
public boolean getReadSchema()
public void setReadSchema(boolean readSchema)
public com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaTool getSchemaTool()
public void setSchemaTool(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaTool tool)
public java.io.Writer getSchemaWriter()
public void setSchemaWriter(java.io.Writer schemaWriter)
public java.io.Writer getMappingWriter()
public void setMappingWriter(java.io.Writer mappingWriter)
public com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository getRepository()
MappingRepository.
public void setRepository(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository repos)
public com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup getSchemaGroup()
public void setSchemaGroup(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema)
public void clear()
record().
public void record()
public void refresh(java.lang.Class cls)
public void drop(java.lang.Class cls)
public void revert(java.lang.Class cls)
public void validate(java.lang.Class cls)
public void buildSchema(java.lang.Class cls)
record() invocation.
public static void main(java.lang.String[] args)
throws java.io.IOException,
java.sql.SQLException
Usage: java com.solarmetric.kodo.impl.jdbc.meta.MappingTool [option]* -action/-a <refresh | drop | validate | buildSchema | revert | import | export> <class name | .java file | .class file | .jdo file>+
Where the following options are recognized.
JDOConfiguration. Optional.JDBCConfiguration can be set by
using their names and supplying a value. For example:
-licenseKey adslfja83r3lkadfexport action.add, refresh, and retain
actions correspond to the same-named actions in the
SchemaTool. Unless you are running the mapping tool on all
of your persistent types at once, it is strongly recommended that
you use only the add action. Otherwise it is
possible to drop schema components that are used by classes you
aren't currently running the tool over. The action defaults
to add.SchemaTool.SchemaTool.SchemaGenerator. This option
is ignored if readSchema is false.The various actions are as follows.
XMLMappingInfoParser.file option.Each class supplied as an argument must have valid JDO metadata.
Examples:
java com.solarmetric.kodo.impl.jdbc.meta.MappingTool
-action refresh mypackage.jdojava com.solarmetric.kodo.impl.jbdc.meta.MappingTool
-action validate Person.javajava com.solarmetric.kodo.impl.jdbc.meta.MappingTool
-action buildSchema Person.javajava com.solarmetric.kodo.impl.jbdc.meta.MappingTool
-action drop Person.javajava com.solarmetric.kodo.impl.jdbc.meta.MappingTool
-file mypackage.mappings -action export
mypackage.jdo
java.io.IOException
java.sql.SQLException
public static boolean run(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf,
java.lang.String action,
java.lang.String[] args,
java.io.Writer mappingWriter,
java.lang.String schema,
boolean dropTables,
boolean ignoreErrors,
boolean readSchema,
java.io.Writer schemaWriter,
java.lang.ClassLoader loader)
throws java.io.IOException,
java.sql.SQLException
java.io.IOException
java.sql.SQLException
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||