com.ptc.windchill.upgrade.dust
Class SparsePagingIteratorImpl

java.lang.Object
  extended bycom.ptc.windchill.upgrade.dust.PagingIteratorImpl
      extended bycom.ptc.windchill.upgrade.dust.SparsePagingIteratorImpl
All Implemented Interfaces:
Iterator, PagingIteratorIfc

public class SparsePagingIteratorImpl
extends PagingIteratorImpl

SparsePagingIteratorImpl selects a sample of objects for a given class rather than all of them. It will pick up every nth object, where n is the number given for the -m option at the command line.

See Also:
PagingIteratorImpl

Field Summary
private static boolean DEVELOPER_MODE
           
(package private)  int maxObjects
           
 
Fields inherited from class com.ptc.windchill.upgrade.dust.PagingIteratorImpl
conn, offset, pageSize, querySpec, result, savedException, sessionId, TEMP_TABLE__CLASS_NAME, TEMP_TABLE_NAME, TEMP_TABLE_OID, TEMP_TABLE_ROW_ORDER, TEMP_TABLE_SESSION_ID, totalSize
 
Constructor Summary
protected SparsePagingIteratorImpl()
           
 
Method Summary
private  int getMaxObjects()
           
protected  int initTempTable(long session_id, String id_col, String class_name)
           
static PagingIteratorIfc newPagingIterator(int page_size)
          Instantiates and initializes a SparsePagingIteratorImpl.
static PagingIteratorIfc newPagingIterator(int page_size, String release_level)
          Instantiates and initializes a SparsePagingIteratorImpl.
static PagingIteratorIfc newPagingIterator(int page_size, String release_level, int max_objects)
          Instantiates and initializes a SparsePagingIteratorImpl.
static PagingIteratorIfc newPagingIterator(long session_id, int page_size, String class_name)
          Instantiates and initializes a SparsePagingIteratorImpl.
private  void setMaxObjects(int max_objects)
           
 
Methods inherited from class com.ptc.windchill.upgrade.dust.PagingIteratorImpl
cleanup, closePagingSession, createTempTable, dropTempTable, executeStatement, fetchPagingSession, getPrimaryTableName, getSessionId, getTotalSize, hasNext, init, init, init, initPageQuerySpec, isRelease5, next, openPagingSession, remove, reportException, resetQuery, setRelease5
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVELOPER_MODE

private static final boolean DEVELOPER_MODE
See Also:
Constant Field Values

maxObjects

int maxObjects
Constructor Detail

SparsePagingIteratorImpl

protected SparsePagingIteratorImpl()
Method Detail

newPagingIterator

public static PagingIteratorIfc newPagingIterator(int page_size)
                                           throws WTException
Instantiates and initializes a SparsePagingIteratorImpl.

Throws:
WTException

newPagingIterator

public static PagingIteratorIfc newPagingIterator(int page_size,
                                                  String release_level)
                                           throws WTException
Instantiates and initializes a SparsePagingIteratorImpl.

Throws:
WTException

newPagingIterator

public static PagingIteratorIfc newPagingIterator(int page_size,
                                                  String release_level,
                                                  int max_objects)
                                           throws WTException
Instantiates and initializes a SparsePagingIteratorImpl.

Throws:
WTException

newPagingIterator

public static PagingIteratorIfc newPagingIterator(long session_id,
                                                  int page_size,
                                                  String class_name)
                                           throws WTException
Instantiates and initializes a SparsePagingIteratorImpl.

Throws:
WTException

initTempTable

protected int initTempTable(long session_id,
                            String id_col,
                            String class_name)
                     throws WTException
Overrides:
initTempTable in class PagingIteratorImpl
Throws:
WTException

getMaxObjects

private int getMaxObjects()

setMaxObjects

private void setMaxObjects(int max_objects)