org.apache.torque.generator.source.jdbc
Class JdbcMetadataSource

java.lang.Object
  extended by org.apache.torque.generator.source.SourceImpl
      extended by org.apache.torque.generator.source.jdbc.JdbcMetadataSource
All Implemented Interfaces:
Source

public class JdbcMetadataSource
extends SourceImpl

A source which reads the data from JDBC Metadata.

Version:
$Id: JdbcMetadataSource.java 1331190 2012-04-27 02:41:35Z tfischer $

Constructor Summary
JdbcMetadataSource(String driver, String url, String username, String password, String schema)
          Constructor.
 
Method Summary
protected  SourceElement createRootElement()
          Reads the root element and the whole untransformed source tree.
 String getDescription()
          Gets a description of this source for debugging purposes.
 File getSourceFile()
          Returns the source file, if it exists.
 
Methods inherited from class org.apache.torque.generator.source.SourceImpl
getRootElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcMetadataSource

public JdbcMetadataSource(String driver,
                          String url,
                          String username,
                          String password,
                          String schema)
Constructor.

Parameters:
driver - the database driver class, not null.
url - the connection url, not null.
username - the username of the database user.
password - the password of the database user.
schema - the schema to read.
Method Detail

createRootElement

protected SourceElement createRootElement()
                                   throws SourceException
Description copied from class: SourceImpl
Reads the root element and the whole untransformed source tree.

Specified by:
createRootElement in class SourceImpl
Returns:
the root element, not null.
Throws:
SourceException - if the SourceElement cannot be created.

getDescription

public String getDescription()
Description copied from interface: Source
Gets a description of this source for debugging purposes.

Returns:
the description, which should make it possible to identify the currently processed output.

getSourceFile

public File getSourceFile()
Description copied from interface: Source
Returns the source file, if it exists.

Returns:
the source file, or null if the source is not read from a file.


Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.