|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.gps.device.AbstractGpsDevice
org.compass.gps.device.jdbc.AbstractJdbcGpsDevice
org.compass.gps.device.jdbc.AbstractJdbcActiveMirrorGpsDevice
org.compass.gps.device.jdbc.ResultSetJdbcGpsDevice
public class ResultSetJdbcGpsDevice
A gps device that index a jdbc ResultSet to a set of Compass
Resources. Each Resource maps to a
ResultSet row. The device can handle multiple
ResultSets.
The device holds a list of
ResultSetToResourceMappings
(or derived classes like
TableToResourceMapping).
Each one has all the required mappings setting to map the
ResultSet with all it's rows to the set of corresponding
Resources.
The device can perform active data base mirroring. The mirror operation is
enabled only if the mirror flag is enabled, and will execute against each
mapping that
ResultSetToResourceMapping.supportsVersioning().
The autoDetectVersionColumnSqlType setting (which defauls to
true) will automatically set the version column jdbc type for
mappings that support versioning.
ResultSetToResourceMapping,
TableToResourceMapping| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.compass.gps.device.jdbc.AbstractJdbcGpsDevice |
|---|
AbstractJdbcGpsDevice.IndexExecution |
| Field Summary | |
|---|---|
protected List |
mappings
|
| Fields inherited from class org.compass.gps.device.jdbc.AbstractJdbcGpsDevice |
|---|
dataSource, dialect, log |
| Fields inherited from class org.compass.gps.device.AbstractGpsDevice |
|---|
compassGps |
| Constructor Summary | |
|---|---|
ResultSetJdbcGpsDevice()
|
|
| Method Summary | |
|---|---|
void |
addMapping(ResultSetToResourceMapping mapping)
Adds a mapping to be indexed and mirrored. |
protected AbstractJdbcGpsDevice.IndexExecution[] |
doGetIndexExecutions(Connection connection)
Returns the array of index execution with a size of the number of mappings. |
protected void |
doIndex(CompassSession session,
IndexPlan indexPlan)
Derived devices must implement the method to perform the actual indexing operation. |
protected void |
doStart()
performs operations on startup, such as auto generation of mappings for mappings that implement the AutoGenerateMapping, auto detection
of version column jdbc type, and JdbcSnapshot loading (using the
JdbcSnapshotPersister). |
protected void |
doStop()
Saves the JdbcSnapshot. |
boolean |
isAutoDetectVersionColumnSqlType()
Should the device auto detect the version columns jdbc type. |
void |
performMirroring()
Performs the data change mirroring operation. |
protected Object |
processRowValue(Object description,
ResultSet rs,
CompassSession session)
Index the given ResultSet row into a Compass
Resource. |
void |
setAutoDetectVersionColumnSqlType(boolean autoDetectVersionColumnSqlType)
Sets if the device auto detect the version columns jdbc type. |
void |
setMappings(ResultSetToResourceMapping[] mappingsArr)
Adds an array of mappings to be indexed and mirrored. |
| Methods inherited from class org.compass.gps.device.jdbc.AbstractJdbcActiveMirrorGpsDevice |
|---|
getSnapshotEventListener, getSnapshotPersister, isMirrorDataChanges, isSaveSnapshotAfterMirror, setMirrorDataChanges, setSaveSnapshotAfterMirror, setSnapshotEventListener, setSnapshotPersister |
| Methods inherited from class org.compass.gps.device.jdbc.AbstractJdbcGpsDevice |
|---|
doIndex, getDataSource, getDialect, getFetchSize, processResultSet, processRow, setDataSource, setDialect, setFetchSize |
| Methods inherited from class org.compass.gps.device.AbstractGpsDevice |
|---|
buildMessage, getGps, getName, index, injectGps, isFilteredForIndex, isPerformingIndexOperation, isRunning, refresh, setFilteredEntitiesForIndex, setName, shouldMirrorDataChanges, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.compass.gps.device.jdbc.JdbcGpsDevice |
|---|
getDataSource, getDialect, getFetchSize, setDataSource, setDialect, setFetchSize |
| Field Detail |
|---|
protected List mappings
| Constructor Detail |
|---|
public ResultSetJdbcGpsDevice()
| Method Detail |
|---|
protected void doStart()
throws CompassGpsException
AutoGenerateMapping, auto detection
of version column jdbc type, and JdbcSnapshot loading (using the
JdbcSnapshotPersister).
doStart in class AbstractJdbcGpsDeviceCompassGpsException
protected void doStop()
throws CompassGpsException
JdbcSnapshot.
doStop in class AbstractGpsDeviceCompassGpsException
protected void doIndex(CompassSession session,
IndexPlan indexPlan)
throws CompassGpsException
AbstractGpsDevice
doIndex in class AbstractGpsDeviceCompassGpsException
protected AbstractJdbcGpsDevice.IndexExecution[] doGetIndexExecutions(Connection connection)
throws SQLException,
JdbcGpsDeviceException
doGetIndexExecutions in class AbstractJdbcGpsDeviceSQLException
JdbcGpsDeviceException
protected Object processRowValue(Object description,
ResultSet rs,
CompassSession session)
throws SQLException,
CompassException
ResultSet row into a Compass
Resource.
processRowValue in class AbstractJdbcGpsDeviceSQLException
CompassException
public void performMirroring()
throws JdbcGpsDeviceException
JdbcGpsDeviceExceptionpublic void addMapping(ResultSetToResourceMapping mapping)
public void setMappings(ResultSetToResourceMapping[] mappingsArr)
public boolean isAutoDetectVersionColumnSqlType()
public void setAutoDetectVersionColumnSqlType(boolean autoDetectVersionColumnSqlType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||