Package net.ontopia.topicmaps.db2tm
Class JDBCDataSource
- java.lang.Object
-
- net.ontopia.topicmaps.db2tm.JDBCDataSource
-
- All Implemented Interfaces:
DataSourceIF
public class JDBCDataSource extends Object implements DataSourceIF
INTERNAL: Data source that reads tables via JDBC.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
catalog
protected Connection
conn
protected RelationMapping
mapping
protected String
propfile
protected String
schemaPattern
protected String
tableNamePattern
-
Constructor Summary
Constructors Constructor Description JDBCDataSource(RelationMapping mapping)
JDBCDataSource(RelationMapping mapping, Connection conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
INTERNAL: Closes the data source so that it can release any open resources.ChangelogReaderIF
getChangelogReader(Changelog changelog, String startOrder)
INTERNAL: Returns a changelog reader.protected Connection
getConnection()
String
getMaxOrderValue(Changelog changelog)
INTERNAL: Returns the maximum value of the order column for the specified changelog.TupleReaderIF
getReader(String relation)
INTERNAL: Returns a tuple reader for the given relation.Collection<Relation>
getRelations()
INTERNAL: Returns the relations that the data source knows of.protected void
setPropertyFile(String propfile)
String
toString()
-
-
-
Field Detail
-
mapping
protected final RelationMapping mapping
-
propfile
protected String propfile
-
catalog
protected String catalog
-
schemaPattern
protected String schemaPattern
-
tableNamePattern
protected String tableNamePattern
-
conn
protected Connection conn
-
-
Constructor Detail
-
JDBCDataSource
public JDBCDataSource(RelationMapping mapping)
-
JDBCDataSource
public JDBCDataSource(RelationMapping mapping, Connection conn)
-
-
Method Detail
-
setPropertyFile
protected void setPropertyFile(String propfile)
-
getConnection
protected 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 interfaceDataSourceIF
-
getRelations
public Collection<Relation> 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 interfaceDataSourceIF
-
getReader
public TupleReaderIF getReader(String relation)
Description copied from interface:DataSourceIF
INTERNAL: Returns a tuple reader for the given relation.- Specified by:
getReader
in interfaceDataSourceIF
-
getChangelogReader
public ChangelogReaderIF getChangelogReader(Changelog changelog, String startOrder)
Description copied from interface:DataSourceIF
INTERNAL: Returns a changelog reader.- Specified by:
getChangelogReader
in interfaceDataSourceIF
-
getMaxOrderValue
public 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 interfaceDataSourceIF
-
-