|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.dbtools.DBAdmin
public class DBAdmin
DBAdmin
provides database administrative functionality
Nested Class Summary | |
---|---|
static class |
DBAdmin.DBAdminExec
"DBAdmin.execCommands()" return status enumerated type |
Field Summary | |
---|---|
static java.lang.String[] |
ARG_BEAN
|
static java.lang.String[] |
ARG_COLUMNS
|
static java.lang.String[] |
ARG_CREATE_DB
|
static java.lang.String[] |
ARG_DB
|
static java.lang.String[] |
ARG_DIR
|
static java.lang.String[] |
ARG_DROP
|
static java.lang.String[] |
ARG_DUMP
|
static java.lang.String[] |
ARG_GRANT
|
static java.lang.String[] |
ARG_LAST
|
static java.lang.String[] |
ARG_LOAD
|
static java.lang.String[] |
ARG_NODROPWARN
|
static java.lang.String[] |
ARG_NOINSERT
|
static java.lang.String[] |
ARG_OVERWRITE
|
static java.lang.String[] |
ARG_ROOT_PASS
|
static java.lang.String[] |
ARG_ROOT_USER
|
static java.lang.String[] |
ARG_SCHEMA
|
static java.lang.String[] |
ARG_TABLENAME
|
static java.lang.String[] |
ARG_TABLES
|
static java.lang.String[] |
ARG_VALIDATE
|
static java.lang.String[] |
ARG_WHERE
|
static int |
VALIDATE_ACTUAL_RECORD_COUNT
|
static int |
VALIDATE_ADD_COLUMNS
|
static int |
VALIDATE_ALTER_COLUMNS
|
static int |
VALIDATE_CHECK_ENCODING
|
static int |
VALIDATE_CREATE_TABLE
|
static int |
VALIDATE_DISPLAY_DB_ENGINE
|
static int |
VALIDATE_DISPLAY_ERRORS
|
static int |
VALIDATE_DISPLAY_WARNINGS
|
static int |
VALIDATE_EXCLUDE_NAMED_TABLE
|
static int |
VALIDATE_NAMED_TABLE_ONLY
|
static int |
VALIDATE_REBUILD_KEYS
|
static int |
VALIDATE_SHOW_COLUMNS
|
Method Summary | |
---|---|
protected static DBFactory<? extends DBRecord> |
_createDBRecordFactory(java.lang.String className,
boolean isRequired)
Returns the DBFactory instance for the specified class. This assumes that the DBRecord subclass represented by the specified class name implements the static method "getFactory()". |
static void |
addTableFactory(DBFactory<? extends DBRecord> factory)
Adds the specified table to the table name/factory map |
static boolean |
addTableFactory(java.lang.String className,
boolean isRequired)
Loads the DBFactory for the specified DBRecord classname, and adds it to the table name/factory map This assumes that the DBRecord subclass represented by the specified class name implements the static method "getFactory()". |
static DBAdmin.DBAdminExec |
execCommands()
Execute command defined in the runtime-config properties (RTConfig) |
static DBFactory<? extends DBRecord>[] |
getChildTableFactories(DBFactory<? extends DBRecord> parentFactory)
Gets all child/dependent table factories for the specified table factory |
static java.io.File |
getDumpDirectory()
Creates and returns the default dump file directory |
static DBFactory<? extends DBRecord> |
getTableFactory(java.lang.String utableName)
Returns the table factory for the specified table name |
static int |
getTableFactoryCount()
Returns the number of registered DBFactory classes |
static OrderedMap<java.lang.String,DBFactory<? extends DBRecord>> |
getTableFactoryMap()
Returns a map of all defined table names to their table DBFactory |
static java.lang.String |
getTableNameProperCase(java.lang.String utableName)
Returns the proper case of the specified table name. |
static boolean |
hasTableFactory(java.lang.String utableName)
Returns true if the spcified table name has been defined |
static boolean |
includeFieldInFactory(DBFactory fact,
DBField field)
Provides the opportunity for the DBAdmin to decide whether or not the specified DBField should be added/included in the DBFactory. |
static void |
main(java.lang.String[] argv)
Main entry point |
static void |
printTableColumns(int docWidth,
java.lang.String[] header,
java.lang.String utableName)
Print the database schema for the managed tables |
static void |
printTableSchema(int docWidth,
java.lang.String[] header,
java.lang.String utableName)
Print the database schema for the managed tables |
static boolean |
verifyTablesExist()
Verify that all defined tables actually exist |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int VALIDATE_CREATE_TABLE
public static final int VALIDATE_ADD_COLUMNS
public static final int VALIDATE_ALTER_COLUMNS
public static final int VALIDATE_REBUILD_KEYS
public static final int VALIDATE_CHECK_ENCODING
public static final int VALIDATE_DISPLAY_ERRORS
public static final int VALIDATE_DISPLAY_WARNINGS
public static final int VALIDATE_SHOW_COLUMNS
public static final int VALIDATE_NAMED_TABLE_ONLY
public static final int VALIDATE_EXCLUDE_NAMED_TABLE
public static final int VALIDATE_DISPLAY_DB_ENGINE
public static final int VALIDATE_ACTUAL_RECORD_COUNT
public static final java.lang.String[] ARG_ROOT_USER
public static final java.lang.String[] ARG_ROOT_PASS
public static final java.lang.String[] ARG_CREATE_DB
public static final java.lang.String[] ARG_GRANT
public static final java.lang.String[] ARG_DB
public static final java.lang.String[] ARG_DIR
public static final java.lang.String[] ARG_LOAD
public static final java.lang.String[] ARG_DROP
public static final java.lang.String[] ARG_TABLES
public static final java.lang.String[] ARG_TABLENAME
public static final java.lang.String[] ARG_SCHEMA
public static final java.lang.String[] ARG_COLUMNS
public static final java.lang.String[] ARG_DUMP
public static final java.lang.String[] ARG_WHERE
public static final java.lang.String[] ARG_VALIDATE
public static final java.lang.String[] ARG_LAST
public static final java.lang.String[] ARG_NOINSERT
public static final java.lang.String[] ARG_OVERWRITE
public static final java.lang.String[] ARG_NODROPWARN
public static final java.lang.String[] ARG_BEAN
Method Detail |
---|
protected static DBFactory<? extends DBRecord> _createDBRecordFactory(java.lang.String className, boolean isRequired)
className
- The class name of the DBRecord subclassisRequired
- True if this class must be resolved (any errors will be displayed),
false if it is optional (errors may be quietly ignored).
public static boolean addTableFactory(java.lang.String className, boolean isRequired)
className
- The class name of the DBRecord subclassisRequired
- True if this class must be resolved, false if it is optional
public static void addTableFactory(DBFactory<? extends DBRecord> factory)
factory
- The table factorypublic static boolean includeFieldInFactory(DBFactory fact, DBField field)
fact
- The DBFactoryfield
- The DBField which is to be added to the DBFactory
public static int getTableFactoryCount()
public static OrderedMap<java.lang.String,DBFactory<? extends DBRecord>> getTableFactoryMap()
public static DBFactory<? extends DBRecord>[] getChildTableFactories(DBFactory<? extends DBRecord> parentFactory)
parentFactory
- The parent table factory
public static DBFactory<? extends DBRecord> getTableFactory(java.lang.String utableName)
utableName
- The untranslated table name
public static boolean hasTableFactory(java.lang.String utableName)
utableName
- The untranslated table name
public static java.lang.String getTableNameProperCase(java.lang.String utableName)
utableName
- The untranslated table name
public static void printTableSchema(int docWidth, java.lang.String[] header, java.lang.String utableName)
utableName
- The specific untranslated table name for which the schema will be printed.
If null, the schema for all tables will be printed.public static void printTableColumns(int docWidth, java.lang.String[] header, java.lang.String utableName)
utableName
- The specific untranslated table name for which the schema will be printed.
If null, the schema for all tables will be printed.public static boolean verifyTablesExist()
public static java.io.File getDumpDirectory()
public static DBAdmin.DBAdminExec execCommands()
public static void main(java.lang.String[] argv)
argv
- The command-line arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |