SpaceDataSourceSplitter instead.@Deprecated public class SQLDataProviderSplitter extends BulkDataPersisterSplitter implements SQLDataProvider
dataSourcesNUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER| Constructor and Description |
|---|
SQLDataProviderSplitter(ManagedDataSourceEntriesProvider[] dataSources)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
DataIterator |
iterator(SQLQuery sqlQuery)
Deprecated.
Create an iterator over all objects that match the given
SQLQuery. |
executeBulkgetDataSource, init, initialLoad, setInitalLoadThreadPoolSize, shutdownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinit, initialLoad, shutdownpublic SQLDataProviderSplitter(ManagedDataSourceEntriesProvider[] dataSources)
public DataIterator iterator(SQLQuery sqlQuery) throws DataSourceException
SQLDataProviderCreate an iterator over all objects that match the givenSQLQuery. SQLQuery contains a string representation of SQL 'where' clause. The format matches thePreparedStatementformat(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 SQLDataProviderDataIterator or null if no data was found that match the given templateDataSourceExceptionCopyright © GigaSpaces.