SpaceDataSourceExceptionHandler
instead.@Deprecated public class SQLDataProviderExceptionHandler extends BulkDataPersisterExceptionHandler implements SQLDataProvider
exceptionHandler
dataSource
NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER
Constructor and Description |
---|
SQLDataProviderExceptionHandler(ManagedDataSource dataSource,
ExceptionHandler exceptionHandler)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
DataIterator |
iterator(SQLQuery sqlQuery)
Deprecated.
Create an iterator over all objects that match the given
SQLQuery . |
executeBulk
init, initialLoad, shutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, initialLoad, shutdown
public SQLDataProviderExceptionHandler(ManagedDataSource dataSource, ExceptionHandler exceptionHandler)
public DataIterator iterator(SQLQuery sqlQuery) throws DataSourceException
SQLDataProvider
Create an iterator over all objects that match the givenSQLQuery
. SQLQuery contains a string representation of SQL 'where' clause. The format matches thePreparedStatement
format(field1 = ? and field2 > ? and ....). The prepared values are accessible bySQLQuery
.getPreparedValues() method Example implementation with SQL PreparedStatement:PreparedStatement st = con.prepareStatement(query.getSelectAllQuery()); int index = 0; if(query.hasPreparedValues()) { for(Iterator iter = query.getPreparedValues().iterator();iter.hasNext()) { st.setObject(++index,iter.next()); } } ResultSet rs = st.executeQuery(); return new ResultSetIterator(rs);
iterator
in interface SQLDataProvider
DataIterator
or null if no data was found that match the given templateDataSourceException
Copyright © GigaSpaces.