Class SQLDataProviderExceptionHandler
java.lang.Object
org.openspaces.persistency.patterns.AbstractManagedDataSourceDelegator
org.openspaces.persistency.patterns.BulkDataPersisterExceptionHandler
org.openspaces.persistency.patterns.SQLDataProviderExceptionHandler
- All Implemented Interfaces:
BulkDataPersister, ManagedDataSource, SQLDataProvider
@Deprecated
public class SQLDataProviderExceptionHandler
extends BulkDataPersisterExceptionHandler
implements SQLDataProvider
Deprecated.
- Author:
- kimchy
-
Field Summary
Fields inherited from class BulkDataPersisterExceptionHandler
exceptionHandlerFields inherited from class AbstractManagedDataSourceDelegator
dataSourceFields inherited from interface ManagedDataSource
NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER -
Constructor Summary
ConstructorsConstructorDescriptionSQLDataProviderExceptionHandler(ManagedDataSource dataSource, ExceptionHandler exceptionHandler) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Create an iterator over all objects that match the givenSQLQuery.Methods inherited from class BulkDataPersisterExceptionHandler
executeBulkMethods inherited from class AbstractManagedDataSourceDelegator
init, initialLoad, shutdownMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ManagedDataSource
init, initialLoad, shutdown
-
Constructor Details
-
SQLDataProviderExceptionHandler
public SQLDataProviderExceptionHandler(ManagedDataSource dataSource, ExceptionHandler exceptionHandler) Deprecated.
-
-
Method Details
-
iterator
Deprecated.Description copied from interface:SQLDataProviderCreate an iterator over all objects that match the given
SQLQuery. 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);- Specified by:
iteratorin interfaceSQLDataProvider- Returns:
- a
DataIteratoror null if no data was found that match the given template - Throws:
DataSourceException
-
SpaceDataSourceExceptionHandlerinstead.