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 Stringcatalogprotected Connectionconnprotected RelationMappingmappingprotected Stringpropfileprotected StringschemaPatternprotected StringtableNamePattern
-
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 voidclose()INTERNAL: Closes the data source so that it can release any open resources.ChangelogReaderIFgetChangelogReader(Changelog changelog, String startOrder)INTERNAL: Returns a changelog reader.protected ConnectiongetConnection()StringgetMaxOrderValue(Changelog changelog)INTERNAL: Returns the maximum value of the order column for the specified changelog.TupleReaderIFgetReader(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 voidsetPropertyFile(String propfile)StringtoString()
-
-
-
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:DataSourceIFINTERNAL: Closes the data source so that it can release any open resources.- Specified by:
closein interfaceDataSourceIF
-
getRelations
public Collection<Relation> getRelations()
Description copied from interface:DataSourceIFINTERNAL: Returns the relations that the data source knows of. The collection return contains Relation instances.- Specified by:
getRelationsin interfaceDataSourceIF
-
getReader
public TupleReaderIF getReader(String relation)
Description copied from interface:DataSourceIFINTERNAL: Returns a tuple reader for the given relation.- Specified by:
getReaderin interfaceDataSourceIF
-
getChangelogReader
public ChangelogReaderIF getChangelogReader(Changelog changelog, String startOrder)
Description copied from interface:DataSourceIFINTERNAL: Returns a changelog reader.- Specified by:
getChangelogReaderin interfaceDataSourceIF
-
getMaxOrderValue
public String getMaxOrderValue(Changelog changelog)
Description copied from interface:DataSourceIFINTERNAL: Returns the maximum value of the order column for the specified changelog.- Specified by:
getMaxOrderValuein interfaceDataSourceIF
-
-