Class JdbcMetadataSource
- java.lang.Object
-
- org.apache.torque.generator.source.SourceImpl
-
- 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 1896195 2021-12-20 17:41:20Z gk $
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SourceElementcreateRootElement()Reads the root element and the whole untransformed source tree.byte[]getContentChecksum()Returns the checksum of the content.StringgetDescription()Gets a description of this source for debugging purposes.DategetLastModified()Returns the last modification date of the source files.FilegetSourceFile()Returns the source file, if it exists.-
Methods inherited from class org.apache.torque.generator.source.SourceImpl
getRootElement
-
-
-
-
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:SourceImplReads the root element and the whole untransformed source tree.- Specified by:
createRootElementin classSourceImpl- Returns:
- the root element, not null.
- Throws:
SourceException- if the SourceElement cannot be created.
-
getDescription
public String getDescription()
Description copied from interface:SourceGets 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:SourceReturns the source file, if it exists.- Returns:
- the source file, or null if the source is not read from a file.
-
getLastModified
public Date getLastModified()
Returns the last modification date of the source files.- Returns:
- always null because no source file exist.
-
getContentChecksum
public byte[] getContentChecksum()
Returns the checksum of the content.- Returns:
- always null.
-
-