Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enableit.db.darrt.ant
Class SchemaExporterTask  view SchemaExporterTask download SchemaExporterTask.java

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.enableit.db.ant.AbstractDBTask
              extended byorg.enableit.db.darrt.ant.AbstractSchemaTask
                  extended byorg.enableit.db.darrt.ant.SchemaExporterTask

public class SchemaExporterTask
extends AbstractSchemaTask

Ant Task to export a database schema as an XML file.

ASA interpretation of DatabaseMetaData object SCHEMAS = userids and groups

Version:
__VERSION__

Field Summary
private  java.lang.String catalog
           
private  boolean debug
           
protected static org.apache.log4j.Category logger
          The Log4J Category doing the logging.
static int OM_FILE_PER_TABLE
          A valid output mode.
static int OM_SINGLE_FILE
          A valid output mode.
static int OM_SINGLE_FILE_AND_FILE_PER_TABLE
          A valid output mode.
private  java.lang.String output
           
private  int outputMode
          The output mode.
private  java.lang.String schema
           
private  java.lang.String tableNamePattern
           
private  java.lang.String[] tableTypes
           
 
Fields inherited from class org.enableit.db.darrt.ant.AbstractSchemaTask
about, refFile, refProvider, targetDriver, targetFile, targetPassword, targetProvider, targetSchemaName, targetUrl, targetUserid
 
Fields inherited from class org.enableit.db.ant.AbstractDBTask
driver, password, schemaName, url, userid
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
SchemaExporterTask()
          Default Constructor
 
Method Summary
 void execute()
          Run the schema export.
private  java.lang.String getPackageDir(java.lang.String javaPackage)
          Returns the directory name classes should be stored in based on the Java package name received
 void setCatalog(java.lang.String catalog)
          Set the JDBC catalogue name (Sybase and Microsoft userids are more likely to know this as database name)
 void setDebug(boolean debug)
          Set the debug flag.
 void setOutput(java.lang.String output)
          Sets the target (output) directory
 void setOutputMode(int mode)
          Sets the output type.
 void setSchema(java.lang.String schema)
          Set the schema name.
 void setTableNamePattern(java.lang.String tableNamePattern)
          Set the table name pattern.
 void setTableTypes(java.lang.String tableTypes)
          Set the table types to export.
 
Methods inherited from class org.enableit.db.darrt.ant.AbstractSchemaTask
addFormatter, checkInputs, checkRefInputs, checkTargetInputs, getFormatters, getReferenceProvider, getReportListeners, getSchemaHandler, getTargetProvider, setReferenceFile, setTargetDriver, setTargetFile, setTargetPassword, setTargetSchemaName, setTargetUrl, setTargetUserid
 
Methods inherited from class org.enableit.db.ant.AbstractDBTask
setDriver, setPassword, setSchemaName, setUrl, setUserid
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableNamePattern

private java.lang.String tableNamePattern

catalog

private java.lang.String catalog

output

private java.lang.String output

debug

private boolean debug

logger

protected static org.apache.log4j.Category logger
The Log4J Category doing the logging. Same Category is used throughout the package.


OM_SINGLE_FILE

public static final int OM_SINGLE_FILE
A valid output mode.

See Also:
Constant Field Values

OM_FILE_PER_TABLE

public static final int OM_FILE_PER_TABLE
A valid output mode.

See Also:
Constant Field Values

OM_SINGLE_FILE_AND_FILE_PER_TABLE

public static final int OM_SINGLE_FILE_AND_FILE_PER_TABLE
A valid output mode.

See Also:
Constant Field Values

schema

private java.lang.String schema

tableTypes

private java.lang.String[] tableTypes

outputMode

private int outputMode
The output mode.

Constructor Detail

SchemaExporterTask

public SchemaExporterTask()
Default Constructor

Method Detail

setOutput

public void setOutput(java.lang.String output)
Sets the target (output) directory


setTableNamePattern

public void setTableNamePattern(java.lang.String tableNamePattern)
Set the table name pattern.


setSchema

public void setSchema(java.lang.String schema)
Set the schema name.


setTableTypes

public void setTableTypes(java.lang.String tableTypes)
Set the table types to export.


setCatalog

public void setCatalog(java.lang.String catalog)
Set the JDBC catalogue name (Sybase and Microsoft userids are more likely to know this as database name)


setOutputMode

public void setOutputMode(int mode)
Sets the output type.


execute

public void execute()
Run the schema export.

Specified by:
execute in class AbstractSchemaTask

getPackageDir

private java.lang.String getPackageDir(java.lang.String javaPackage)
Returns the directory name classes should be stored in based on the Java package name received


setDebug

public void setDebug(boolean debug)
Set the debug flag.