|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.dust.PagingIteratorImpl
PagingIteratorImpl determines which Paging mechanism to use depending upon what is available. The PDS paging API is available to release 6.0 and later versions of Windchill. For earlier release, use a simplied version of paging provided by this tool. In addition to this, PagingIteratorImpl also hides the fact that paging is occuring, i.e. the program using this class acts as though it is iterating through a simple ResultSet without bothering with the details of paging.
Field Summary | |
(package private) Connection |
conn
|
private static boolean |
DEVELOPER_MODE
|
(package private) int |
offset
|
(package private) int |
pageSize
|
(package private) QuerySpec |
querySpec
|
private boolean |
RELEASE_5
|
(package private) QueryResult |
result
|
(package private) Exception |
savedException
|
(package private) long |
sessionId
|
protected static String |
TEMP_TABLE__CLASS_NAME
|
protected static String |
TEMP_TABLE_NAME
|
protected static String |
TEMP_TABLE_OID
|
protected static String |
TEMP_TABLE_ROW_ORDER
|
protected static String |
TEMP_TABLE_SESSION_ID
|
(package private) int |
totalSize
|
Constructor Summary | |
protected |
PagingIteratorImpl()
|
Method Summary | |
void |
cleanup()
Clears out the previous query without starting a new one. |
protected void |
closePagingSession()
|
protected void |
createTempTable()
|
protected void |
dropTempTable()
|
protected int |
executeStatement(String statement)
|
protected QueryResult |
fetchPagingSession(int offset,
int page_size,
long session_id)
Returns the next object in the ResultSet. |
protected String |
getPrimaryTableName(String class_name)
|
long |
getSessionId()
The initial query stores OIDs in a temp table. |
int |
getTotalSize()
Returns the number of rows in the temp table for this session id. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
protected void |
init(int page_size)
|
protected void |
init(long session_id,
int page_size,
String class_name)
|
protected void |
init(long session_id,
String class_name)
|
protected QuerySpec |
initPageQuerySpec(String class_name)
|
protected int |
initTempTable(long session_id,
String id_col,
String class_name)
|
protected boolean |
isRelease5()
|
static PagingIteratorIfc |
newPagingIterator(int page_size)
Instantiates and initializes a PagingIteratorImpl. |
static PagingIteratorIfc |
newPagingIterator(int page_size,
String release_level)
Instantiates and initializes a PagingIteratorImpl. |
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 PagingIteratorImpl. |
Object |
next()
Returns the next element in the iteration. |
protected void |
openPagingSession(String class_name)
Returns the next object in the ResultSet. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). |
protected void |
reportException(Exception e)
|
void |
resetQuery(long session_id,
String class_name)
Clears out the previous query and starts a new paging query with the given QuerySpec. |
protected void |
setRelease5(String release_level)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final boolean DEVELOPER_MODE
protected static String TEMP_TABLE_NAME
protected static String TEMP_TABLE_OID
protected static String TEMP_TABLE_ROW_ORDER
protected static String TEMP_TABLE_SESSION_ID
protected static String TEMP_TABLE__CLASS_NAME
long sessionId
int totalSize
QueryResult result
int pageSize
int offset
QuerySpec querySpec
Exception savedException
Connection conn
private boolean RELEASE_5
Constructor Detail |
protected PagingIteratorImpl()
Method Detail |
public static PagingIteratorIfc newPagingIterator(int page_size) throws WTException
WTException
public static PagingIteratorIfc newPagingIterator(int page_size, String release_level) throws WTException
WTException
public static PagingIteratorIfc newPagingIterator(int page_size, String release_level, int max_objects) throws WTException
WTException
public static PagingIteratorIfc newPagingIterator(long session_id, int page_size, String class_name) throws WTException
WTException
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator
public int getTotalSize()
getTotalSize
in interface PagingIteratorIfc
public long getSessionId()
getSessionId
in interface PagingIteratorIfc
public void resetQuery(long session_id, String class_name) throws WTException
resetQuery
in interface PagingIteratorIfc
WTException
protected void init(int page_size) throws WTException
WTException
protected void init(long session_id, int page_size, String class_name) throws WTException
WTException
protected void init(long session_id, String class_name) throws WTException
WTException
public void cleanup() throws WTException
PagingIteratorIfc
cleanup
in interface PagingIteratorIfc
WTException
protected void createTempTable() throws WTException
WTException
protected void dropTempTable() throws WTException
WTException
protected int initTempTable(long session_id, String id_col, String class_name) throws WTException
WTException
protected String getPrimaryTableName(String class_name) throws WTException
WTException
protected QuerySpec initPageQuerySpec(String class_name) throws QueryException, WTException
QueryException
WTException
protected void openPagingSession(String class_name) throws WTException
WTException
protected QueryResult fetchPagingSession(int offset, int page_size, long session_id) throws WTException
WTException
protected void closePagingSession() throws WTException
WTException
protected void reportException(Exception e)
protected int executeStatement(String statement) throws Exception
Exception
protected boolean isRelease5()
protected void setRelease5(String release_level)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |