org.compass.gps.device.jdbc
Interface JdbcGpsDevice

All Superinterfaces:
CompassGpsDevice
All Known Subinterfaces:
JdbcActiveMirrorGpsDevice
All Known Implementing Classes:
AbstractJdbcActiveMirrorGpsDevice, AbstractJdbcGpsDevice, ResultSetJdbcGpsDevice

public interface JdbcGpsDevice
extends CompassGpsDevice

A general contract for a Jdbc Gps device. The Jdbc Gps Device must be able to reindex a jdbc enabled database.

Author:
kimchy

Method Summary
 DataSource getDataSource()
          Returns the Jdbc data source that will be used to connect to the database.
 JdbcDialect getDialect()
          Returns the JdbcDialect that will be used when executing operations that might have different implementations based on the target database.
 int getFetchSize()
          Returns the fetch size that will be used when executing select queries against the database.
 void setDataSource(DataSource dataSource)
          Sets the Jdbc data source that will be used to connect to the database.
 void setDialect(JdbcDialect dialect)
          Sets the JdbcDialect that will be used when executing operations that might have different implementations based on the target database.
 void setFetchSize(int fetchSize)
          Sets the fetch size that will be used when executing select queries against the database.
 
Methods inherited from interface org.compass.gps.CompassGpsDevice
getGps, getName, index, injectGps, isPerformingIndexOperation, isRunning, setName, shouldMirrorDataChanges, start, stop
 

Method Detail

getDataSource

DataSource getDataSource()
Returns the Jdbc data source that will be used to connect to the database.

Returns:
The data source used with the device

setDataSource

void setDataSource(DataSource dataSource)
Sets the Jdbc data source that will be used to connect to the database. Note that it must be set before calling the start method.

Parameters:
dataSource -

getFetchSize

int getFetchSize()
Returns the fetch size that will be used when executing select queries against the database. See PreparedStatement#setFetchSize.

Returns:
The fetch size for indexing and mirroring

setFetchSize

void setFetchSize(int fetchSize)
Sets the fetch size that will be used when executing select queries against the database. See PreparedStatement#setFetchSize.

Parameters:
fetchSize -

getDialect

JdbcDialect getDialect()
Returns the JdbcDialect that will be used when executing operations that might have different implementations based on the target database.

Returns:
The dialect used by the device

setDialect

void setDialect(JdbcDialect dialect)
Sets the JdbcDialect that will be used when executing operations that might have different implementations based on the target database.

Parameters:
dialect -


Copyright (c) 2004-2008 The Compass Project.