|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.util.PagedTableObjectIterator
PagedTableObjectIterator 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, PagedTableObjectIterator 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 | |
private StandardACProcessor |
acp_
|
(package private) Connection |
conn
|
private static boolean |
DEVELOPER_MODE
|
(package private) int |
offset
|
(package private) int |
pageSize
|
private PersistentObjectManager |
pom_
|
(package private) QuerySpec |
querySpec
|
private boolean |
RELEASE_5
|
(package private) QueryResult |
result
|
(package private) Exception |
savedException
|
(package private) long |
sessionId
|
private static String |
TEMP_TABLE__CLASS_NAME
|
private static String |
TEMP_TABLE_NAME
|
private static String |
TEMP_TABLE_OID
|
private static String |
TEMP_TABLE_ROW_ORDER
|
private static String |
TEMP_TABLE_SESSION_ID
|
(package private) int |
totalSize
|
Constructor Summary | |
private |
PagedTableObjectIterator(PersistentObjectManager pom)
|
Method Summary | |
void |
cleanup()
|
private void |
closePagingSession()
|
private void |
createTempTable()
|
private void |
dropTempTable()
|
private int |
executeStatement(String statement)
|
private QueryResult |
fetchPagingSession(int offset,
int page_size,
long session_id)
Returns the next object in the ResultSet. |
private 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. |
private void |
init(int page_size)
|
private void |
init(long session_id,
int page_size,
String class_name)
|
private void |
init(long session_id,
String class_name)
|
private QuerySpec |
initPageQuerySpec(String class_name)
|
private int |
initTempTable(long session_id,
String id_col,
String class_name)
|
private boolean |
isRelease5()
|
static PagedTableObjectIterator |
newPagingIterator(int page_size,
PersistentObjectManager pom)
Instantiates and initializes a PagedTableObjectIterator. |
static PagedTableObjectIterator |
newPagingIterator(long session_id,
int page_size,
String class_name,
PersistentObjectManager pom)
Instantiates and initializes a PagedTableObjectIterator. |
Object |
next()
Returns the next element in the iteration. |
private 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). |
private 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. |
private 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
private static String TEMP_TABLE_NAME
private static String TEMP_TABLE_OID
private static String TEMP_TABLE_ROW_ORDER
private static String TEMP_TABLE_SESSION_ID
private 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
private PersistentObjectManager pom_
private StandardACProcessor acp_
Constructor Detail |
private PagedTableObjectIterator(PersistentObjectManager pom)
Method Detail |
public static PagedTableObjectIterator newPagingIterator(int page_size, PersistentObjectManager pom) throws WTException
WTException
public static PagedTableObjectIterator newPagingIterator(long session_id, int page_size, String class_name, PersistentObjectManager pom) 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()
public long getSessionId()
public void resetQuery(long session_id, String class_name) throws WTException
WTException
private void init(int page_size) throws WTException
WTException
private void init(long session_id, int page_size, String class_name) throws WTException
WTException
private void init(long session_id, String class_name) throws WTException
WTException
public void cleanup() throws WTException
WTException
private void createTempTable() throws WTException
WTException
private void dropTempTable() throws WTException
WTException
private int initTempTable(long session_id, String id_col, String class_name) throws WTException
WTException
private String getPrimaryTableName(String class_name) throws WTException
WTException
private QuerySpec initPageQuerySpec(String class_name) throws QueryException, WTException
QueryException
WTException
private void openPagingSession(String class_name) throws WTException
WTException
private QueryResult fetchPagingSession(int offset, int page_size, long session_id) throws WTException
WTException
private void closePagingSession() throws WTException
WTException
private void reportException(Exception e)
private int executeStatement(String statement) throws Exception
Exception
private boolean isRelease5()
private void setRelease5(String release_level)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |