com.plumtree.portaluiinfrastructure.resultwrapper
Class PTSortedDocumentsQueryWrapper

java.lang.Object
  extended by com.plumtree.uiinfrastructure.arraywrapper.PTSortedArrayWrapper
      extended by com.plumtree.portaluiinfrastructure.resultwrapper.APTQueryWrapper
          extended by com.plumtree.portaluiinfrastructure.resultwrapper.PTSortedDocumentsQueryWrapper
All Implemented Interfaces:
IASQueryResult

public class PTSortedDocumentsQueryWrapper
extends APTQueryWrapper

APTSortedQueryWrapper: The PTSortedDocumentsQueryWrapper class wraps the IPTTurboQueryResult Server object that's returned by the various Query methods of IPTFolder. This wrapper handles the details of retrieving a subset of the data, sorting on the client when necessary, etc.

Author:
rupap

Field Summary
protected  boolean m_bShowUnapproved
          RP- false to show only approved docs, true to show unapproved docs also
protected  int m_iPropIDMask
          MES- The Property ID mask we're using, if we need to requery to resort
protected  int m_nSkippedRows
          SCC - Number of rows to skip (used when doing displaying ranges of Documents
protected  IPTFolder m_ptFolder
          MES- The Folder ID we're using, if we need to requery to resort
protected  java.lang.Object[][] m_ptqf
          DH- The query filter we're using, if we need to requery to resort
 
Fields inherited from class com.plumtree.portaluiinfrastructure.resultwrapper.APTQueryWrapper
m_iMaxRows, m_iMode, PTTQRW_DEFAULT_MAX_ROWS, PTTQRW_MODE_CLIENT, PTTQRW_MODE_TRUNCATED
 
Fields inherited from class com.plumtree.uiinfrastructure.arraywrapper.PTSortedArrayWrapper
m_arrData, m_arrSort, m_bSortOptimized, m_hashPropIDtoColumn, m_lstRowMapping, PTSAW_NEWITEMSINFO_INDEX, PTSAW_NEWITEMSINFO_NEWVALUE, PTSAW_NEWITEMSINFO_PROPERTYID, PTSAW_SORT_ASCENDING, PTSAW_SORT_DESCENDING, PTSAW_SORT_ROW_DIRECTION, PTSAW_SORT_ROW_PROPID
 
Constructor Summary
PTSortedDocumentsQueryWrapper(IPTFolder ptFolder)
          RP- The constructor is used by clients to attach this instance to a Catalog Folder.
 
Method Summary
 void Initialize(int[] arrColumnIDs, java.lang.Object[][] arrData, int[][] arrSort, boolean bRequiresSort)
          MES- This version of Initialize masks the Initialize of our superclass- we want to make sure that clients don't call the wrong version of Initialize.
 boolean QueryCards(int iPropIDMask, boolean bShowUnapproved, int[][] arrSort, java.lang.Object[][] queryFilter)
          MES- Query wraps the IPTFolder call of the same name
 void SetSkippedRows(int nSkippedRows)
          Set the number of rows to skip when Querying Cards
 void Sort(int[][] arrSort)
          MES- Sort is used to resort the data.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.resultwrapper.APTQueryWrapper
GetFields, IsComplete, MaxRows, SetMaxRows
 
Methods inherited from class com.plumtree.uiinfrastructure.arraywrapper.PTSortedArrayWrapper
ContainsPropID, GetCount, GetItem, GetSort, MapColumnIDs, SetItem, SetItems, SortInternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.portaluiinfrastructure.resultwrapper.IASQueryResult
GetCount
 

Field Detail

m_ptFolder

protected IPTFolder m_ptFolder
MES- The Folder ID we're using, if we need to requery to resort


m_ptqf

protected java.lang.Object[][] m_ptqf
DH- The query filter we're using, if we need to requery to resort


m_iPropIDMask

protected int m_iPropIDMask
MES- The Property ID mask we're using, if we need to requery to resort


m_bShowUnapproved

protected boolean m_bShowUnapproved
RP- false to show only approved docs, true to show unapproved docs also


m_nSkippedRows

protected int m_nSkippedRows
SCC - Number of rows to skip (used when doing displaying ranges of Documents

Constructor Detail

PTSortedDocumentsQueryWrapper

public PTSortedDocumentsQueryWrapper(IPTFolder ptFolder)
RP- The constructor is used by clients to attach this instance to a Catalog Folder.

Parameters:
ptFolder - is the folder we should be querying
Method Detail

Initialize

public void Initialize(int[] arrColumnIDs,
                       java.lang.Object[][] arrData,
                       int[][] arrSort,
                       boolean bRequiresSort)
MES- This version of Initialize masks the Initialize of our superclass- we want to make sure that clients don't call the wrong version of Initialize.

Overrides:
Initialize in class PTSortedArrayWrapper
Parameters:
arrColumnIDs - is not used
arrData - is not used
arrSort - is not used
bRequiresSort - is not used
Throws:
XPException - is not used

QueryCards

public boolean QueryCards(int iPropIDMask,
                          boolean bShowUnapproved,
                          int[][] arrSort,
                          java.lang.Object[][] queryFilter)
MES- Query wraps the IPTFolder call of the same name

Parameters:
iPropIDMask - is a bitmask of the properties to be returned as columns
iShowUnapproved -
arrSort - is a 2D int array of PropertyIDs to sort by. It should contain a column for each sort. The first row holds the PropertyID, and the second row holds the sort direction, PTSAW_SORT_ASCENDING or PTSAW_SORT_DESCENDING
queryFilter - is a 2D Object array that is a query filter
Returns:
boolean indicating success or failure

SetSkippedRows

public void SetSkippedRows(int nSkippedRows)
Set the number of rows to skip when Querying Cards


Sort

public void Sort(int[][] arrSort)
MES- Sort is used to resort the data. Sort will do an in-memory sort, or will requery the server, as needed.

Overrides:
Sort in class PTSortedArrayWrapper
Parameters:
arrSort - is a 2D int array of PropertyIDs to sort by. It should contain a column for each sort. The first row holds the PropertyID, and the second row holds the sort direction, PTSAW_SORT_ASCENDING or PTSAW_SORT_DESCENDING
Throws:
XPException



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.