net.ontopia.topicmaps.db2tm
Class JDBCDataSource

java.lang.Object
  extended by net.ontopia.topicmaps.db2tm.JDBCDataSource
All Implemented Interfaces:
DataSourceIF

public class JDBCDataSource
extends java.lang.Object
implements DataSourceIF

INTERNAL: Data source that reads tables via JDBC.


Field Summary
protected  java.lang.String catalog
           
protected  java.sql.Connection conn
           
protected  RelationMapping mapping
           
protected  java.lang.String propfile
           
protected  java.lang.String schemaPattern
           
protected  java.lang.String tableNamePattern
           
 
Constructor Summary
JDBCDataSource(RelationMapping mapping)
           
JDBCDataSource(RelationMapping mapping, java.sql.Connection conn)
           
 
Method Summary
 void close()
          INTERNAL: Closes the data source so that it can release any open resources.
 ChangelogReaderIF getChangelogReader(Changelog changelog, java.lang.String startOrder)
          INTERNAL: Returns a changelog reader.
protected  java.sql.Connection getConnection()
           
 java.lang.String getMaxOrderValue(Changelog changelog)
          INTERNAL: Returns the maximum value of the order column for the specified changelog.
 TupleReaderIF getReader(java.lang.String relation)
          INTERNAL: Returns a tuple reader for the given relation.
 java.util.Collection getRelations()
          INTERNAL: Returns the relations that the data source knows of.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mapping

protected RelationMapping mapping

propfile

protected java.lang.String propfile

catalog

protected java.lang.String catalog

schemaPattern

protected java.lang.String schemaPattern

tableNamePattern

protected java.lang.String tableNamePattern

conn

protected java.sql.Connection conn
Constructor Detail

JDBCDataSource

public JDBCDataSource(RelationMapping mapping)

JDBCDataSource

public JDBCDataSource(RelationMapping mapping,
                      java.sql.Connection conn)
Method Detail

getConnection

protected java.sql.Connection getConnection()

close

public void close()
Description copied from interface: DataSourceIF
INTERNAL: Closes the data source so that it can release any open resources.

Specified by:
close in interface DataSourceIF

getRelations

public java.util.Collection getRelations()
Description copied from interface: DataSourceIF
INTERNAL: Returns the relations that the data source knows of. The collection return contains Relation instances.

Specified by:
getRelations in interface DataSourceIF

getReader

public TupleReaderIF getReader(java.lang.String relation)
Description copied from interface: DataSourceIF
INTERNAL: Returns a tuple reader for the given relation.

Specified by:
getReader in interface DataSourceIF

getChangelogReader

public ChangelogReaderIF getChangelogReader(Changelog changelog,
                                            java.lang.String startOrder)
Description copied from interface: DataSourceIF
INTERNAL: Returns a changelog reader.

Specified by:
getChangelogReader in interface DataSourceIF

getMaxOrderValue

public java.lang.String getMaxOrderValue(Changelog changelog)
Description copied from interface: DataSourceIF
INTERNAL: Returns the maximum value of the order column for the specified changelog.

Specified by:
getMaxOrderValue in interface DataSourceIF

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000-2012 Ontopia.