|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.PMFConfiguration
org.jpox.SchemaTool
public class SchemaTool
Provides user-domain utilities for the maintenace of schemas. These utilities cover the creation of a set of tables representing classes specified in input JDO meta-data files. Additionally the tables representing these classes can be deleted.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jpox.PMFConfiguration |
|---|
PMFConfiguration.ObjectPropertySetter, PMFConfiguration.StringPropertySetter |
| Field Summary | |
|---|---|
static int |
SCHEMATOOL_CREATE_MODE
create mode |
static int |
SCHEMATOOL_DATABASE_INFO_MODE
database info mode |
static int |
SCHEMATOOL_DELETE_MODE
delete mode |
static java.lang.String |
SCHEMATOOL_OPTION_DUMPDDL
dump dll to file |
static java.lang.String |
SCHEMATOOL_OPTION_HELP
output help for schema tool |
static java.lang.String |
SCHEMATOOL_OPTION_MODE
schema tool mode |
static java.lang.String |
SCHEMATOOL_OPTION_PROPERTIES_FILE
properties file for schema tool |
static java.lang.String |
SCHEMATOOL_OPTION_VERBOSE
schema tool in verbose |
static int |
SCHEMATOOL_SCHEMA_INFO_MODE
schema info mode |
static int |
SCHEMATOOL_VALIDATE_MODE
validate mode |
| Constructor Summary | |
|---|---|
SchemaTool()
Constructor |
|
| Method Summary | |
|---|---|
static int |
createSchemaTables(java.net.URL[] jdoFileURLs,
java.io.File propsFile,
boolean verbose)
Method to handle the creation of a schema's tables. |
static int |
deleteSchemaTables(java.net.URL[] jdoFileURLs,
java.io.File propsFile,
boolean verbose)
Method to handle the deletion of a schema's tables. |
java.lang.String[] |
getDefaultArgs()
|
java.lang.String |
getDumpDdl()
|
java.lang.String |
getMode()
|
PMFContext |
getPmfContext()
|
static java.util.Properties |
getPropertiesForDatastore(boolean verbose)
Utility to set up the properties defining the datastore. |
static java.util.Properties |
getPropertiesFromFile(java.io.File propsFile)
Utility to generate a Properties object from the specified properties file. |
protected java.util.Map |
initPropertySetters()
Initialize the PROPERTY_SETTERS Map. |
boolean |
isHelp()
|
boolean |
isVerbose()
|
static void |
main(java.lang.String[] args)
Entry method when invoked from the command line. |
static int |
outputDBInfo(java.io.File propsFile,
boolean verbose)
Method to output the database information. |
static int |
outputSchemaInfo(java.io.File propsFile,
boolean verbose)
Method to output the schema information. |
void |
setCommandLineArgs(java.lang.String[] args)
Initialize the command line arguments |
void |
setDumpDdl(java.lang.String dumpDdl)
|
void |
setHelp(boolean help)
|
void |
setMode(java.lang.String mode)
|
void |
setVerbose(boolean verbose)
|
static int |
validateSchemaTables(java.net.URL[] jdoFileURLs,
java.io.File propsFile,
boolean verbose)
Method to handle the validation of a schema's tables. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SCHEMATOOL_CREATE_MODE
public static final int SCHEMATOOL_DELETE_MODE
public static final int SCHEMATOOL_VALIDATE_MODE
public static final int SCHEMATOOL_DATABASE_INFO_MODE
public static final int SCHEMATOOL_SCHEMA_INFO_MODE
public static final java.lang.String SCHEMATOOL_OPTION_MODE
public static final java.lang.String SCHEMATOOL_OPTION_VERBOSE
public static final java.lang.String SCHEMATOOL_OPTION_PROPERTIES_FILE
public static final java.lang.String SCHEMATOOL_OPTION_DUMPDDL
public static final java.lang.String SCHEMATOOL_OPTION_HELP
| Constructor Detail |
|---|
public SchemaTool()
| Method Detail |
|---|
public static int createSchemaTables(java.net.URL[] jdoFileURLs,
java.io.File propsFile,
boolean verbose)
throws java.lang.Exception
jdoFileURLs - URLs of JDO files defining the classes to be
persisted (and hence the tables to be created).propsFile - File containing properties to use (optional)verbose - Verbose output
java.lang.Exception - Thrown when either an error occurs parsing the
MetaData, or the DB definition is not defined.
public static int deleteSchemaTables(java.net.URL[] jdoFileURLs,
java.io.File propsFile,
boolean verbose)
throws java.lang.Exception
jdoFileURLs - URLs of JDO files defining the classes to be
unpersisted (and hence the tables to be deleted).propsFile - File containing properties to use (optional)verbose - Verbose output
java.lang.Exception - Thrown when either an error occurs parsing the
MetaData, or the DB definition is not defined.
public static int validateSchemaTables(java.net.URL[] jdoFileURLs,
java.io.File propsFile,
boolean verbose)
throws java.lang.Exception
jdoFileURLs - URLs of JDO files defining the classes to be validatedpropsFile - File containing properties to use (optional)verbose - Verbose output
java.lang.Exception - Thrown when either an error occurs parsing the
MetaData, or the DB definition is not defined.
public static int outputDBInfo(java.io.File propsFile,
boolean verbose)
throws java.lang.Exception
propsFile - File containing properties to use (optional)verbose - Verbose output
java.lang.Exception - Thrown when the DB definition is not defined.
public static int outputSchemaInfo(java.io.File propsFile,
boolean verbose)
throws java.lang.Exception
propsFile - File containing properties to use (optional)verbose - Verbose output
java.lang.Exception - Thrown when the DB definition is not defined.
public static java.util.Properties getPropertiesForDatastore(boolean verbose)
throws java.lang.Exception
verbose - Verbose output
java.lang.Exception - Thrown when the datastore is not fully specified.public static java.util.Properties getPropertiesFromFile(java.io.File propsFile)
propsFile - Properties file
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - List of options for processing by the available methods in this class.
java.lang.Exceptionpublic void setCommandLineArgs(java.lang.String[] args)
args - public boolean isHelp()
public void setHelp(boolean help)
help - the help to setpublic java.lang.String getMode()
public void setMode(java.lang.String mode)
mode - the mode to setpublic boolean isVerbose()
public void setVerbose(boolean verbose)
verbose - the verbose to setpublic java.lang.String[] getDefaultArgs()
public PMFContext getPmfContext()
public java.lang.String getDumpDdl()
public void setDumpDdl(java.lang.String dumpDdl)
dumpDdl - the dumpDdl to setprotected java.util.Map initPropertySetters()
initPropertySetters in class PMFConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||