org.compass.gps.device.ibatis
Class SqlMapClientGpsDevice
java.lang.Object
org.compass.gps.device.AbstractGpsDevice
org.compass.gps.device.ibatis.SqlMapClientGpsDevice
- All Implemented Interfaces:
- CompassGpsDevice
public class SqlMapClientGpsDevice
- extends AbstractGpsDevice
A SqlMapClient device, provides support for iBatis 2 and the
index operation. The device holds a list of iBatis select
statements ids, executes them, and index the result.
The device must be initialized with a SqlMapClient instance.
When indexing the data, a SqlMapSession will be opened, and a
transaction will be started. The device will then execute the select
statement id, and use the iBatis PaginatedList to index the
data.
The page size for the PaginatedList can be controlled using
the pageSize property.
The select statment can have a parameter object associated with it. If one of
the select statements requires a parameter object, than the
statementsParameterObjects property must be set. It must have
the same size as the selectStatementsIds, and the matching
index of the selectStatementsIds should be set at the
statementsParameterObjects property.
- Author:
- kimchy
| Methods inherited from class org.compass.gps.device.AbstractGpsDevice |
buildMessage, doStop, getGps, getName, index, isFilteredForIndex, isPerformingIndexOperation, isRunning, setFilteredEntitiesForIndex, setGps, setName, shouldMirrorDataChanges, start, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlMapClientGpsDevice
public SqlMapClientGpsDevice()
SqlMapClientGpsDevice
public SqlMapClientGpsDevice(String deviceName,
com.ibatis.sqlmap.client.SqlMapClient sqlMapClient,
String[] selectStatementsIds)
SqlMapClientGpsDevice
public SqlMapClientGpsDevice(String deviceName,
com.ibatis.sqlmap.client.SqlMapClient sqlMapClient,
String[] selectStatementsIds,
Object[] statementsParameterObjects)
doStart
protected void doStart()
throws CompassGpsException
- Description copied from class:
AbstractGpsDevice
- Derived devices can implement it in case of start event notification.
- Overrides:
doStart in class AbstractGpsDevice
- Throws:
CompassGpsException
getSqlMapClient
public com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
setSqlMapClient
public void setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
doIndex
protected void doIndex(CompassSession session)
throws CompassGpsException
- Description copied from class:
AbstractGpsDevice
- Derived devices must implement the method to perform the actual indexing
operation.
- Specified by:
doIndex in class AbstractGpsDevice
- Throws:
CompassGpsException
getSelectStatementsIds
public String[] getSelectStatementsIds()
setSelectStatementsIds
public void setSelectStatementsIds(String[] statementsNames)
getPageSize
public int getPageSize()
setPageSize
public void setPageSize(int pageSize)
getStatementsParameterObjects
public Object[] getStatementsParameterObjects()
setStatementsParameterObjects
public void setStatementsParameterObjects(Object[] statementsParameterObjects)
Copyright (c) 2004-2006 The Compass Project.