org.enableit.db.darrt
Class ViewExporter

java.lang.Object
  |
  +--org.enableit.db.darrt.ViewExporter

public class ViewExporter
extends java.lang.Object

Class to extract a VIEW's definition from a database.


Field Summary
static java.lang.String ABOUT
          CVS info ABOUT this class and its current version
protected static org.apache.log4j.Logger logger
          The Log4J Logger doing the logging.
static java.lang.String ORACLE_QUERY
          Query to return a VIEW definition from an Oracle database.
static java.lang.String SYBASE_QUERY
          Query to return a VIEW definition from an Sybase database.
 
Constructor Summary
ViewExporter()
          Default Constructor
 
Method Summary
 java.lang.String export(java.sql.Connection conn, java.lang.String viewName)
          Export the definition of the named view.
 java.lang.String export(java.lang.String viewName)
          Export the definition of the named view.
 void setProvider(org.enableit.db.beans.Provider provider)
          Sets the details of the target database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORACLE_QUERY

public static final java.lang.String ORACLE_QUERY
Query to return a VIEW definition from an Oracle database.

See Also:
Constant Field Values

SYBASE_QUERY

public static final java.lang.String SYBASE_QUERY
Query to return a VIEW definition from an Sybase database.

See Also:
Constant Field Values

logger

protected static org.apache.log4j.Logger logger
The Log4J Logger doing the logging.


ABOUT

public static final java.lang.String ABOUT
CVS info ABOUT this class and its current version

See Also:
Constant Field Values
Constructor Detail

ViewExporter

public ViewExporter()
Default Constructor

Method Detail

setProvider

public void setProvider(org.enableit.db.beans.Provider provider)
Sets the details of the target database.


export

public java.lang.String export(java.lang.String viewName)
Export the definition of the named view.

Returns:
defn The VIEW definition or an empty string if it could not be found.

export

public java.lang.String export(java.sql.Connection conn,
                               java.lang.String viewName)
Export the definition of the named view.

Returns:
defn The VIEW definition or an empty string if it could not be found.


Copyright © 1999-2004 enableIT.org. All Rights Reserved.