|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.portalpages.rest.ARESTModel com.plumtree.portalpages.rest.dojo.AQueryStoreModel
public abstract class AQueryStoreModel
Abstract class for for QueryStoreModels
A QueryStore is a dojo toolkit concept for potentially large dataset where smaller partial data chunks
are lazily requested by the client.
Dojo QueryStore models will requests for pieces of the data store per request.
Besides the main query, requests will also sends parameters for:
- number of results to return
- index to start at
- property to sort results by
- specific query
These parameters are set by the QueryStoreControl
on the model with the
accessors defined on this interface.
USAGE:
- QueryStoreControl or child control sets parameters parsed from the REST Request
- DisplayPage calls GetQueryStoreResult
IMPLEMENTING CHILD MODEL
- Implement GetQueryStoreResult to perform search / query with the results
- Add property name to property id mapping by adding a static block to initialize mapping entries to
COLNAME_TO_PROPID_MAP
Field Summary | |
---|---|
static java.lang.String |
COL_CREATED
|
static java.lang.String |
COL_DESCRIPTION
|
static java.lang.String |
COL_LASTMODIFIED
|
static java.lang.String |
COL_NAME
|
static java.lang.String |
COL_OBJECTID
Property names for the JSON object returned in the response, don't change without also updating client javascript |
static java.lang.String |
COLNAME_PREFIX
|
protected static XPHashtable |
COLNAME_TO_PROPID_MAP
Stores mapping between JSON object property name and search property ids |
static java.lang.String |
CUSTOMPROP_TYPE_SESSIONMAP_NAME
|
static java.lang.String |
DATASTORE_PROP_IDENTIFIER
datastore response property with the column/property name in each result entry that serves as the unqiue id |
static java.lang.String |
DATASTORE_PROP_ITEMS
datastore response property containing the result set |
static java.lang.String |
DATASTORE_PROP_LABEL
datastore response property with the column/property name in each result entry that serves as the label |
static java.lang.String |
DATASTORE_PROP_TOTALRESULTS
datastore response property for total result set (not just returned in the response |
static int |
INVALID_PROPID
|
static int |
NO_PROPTYPE
|
static int |
PROP_GRIDTYPE_ICON
|
static int |
PROP_GRIDTYPE_URL
|
protected static XPHashtable |
PROPID_PROPTYPE_MAP
Stores mapping of property ids and their types |
protected static java.lang.Object |
PROPTYPE_LOCK
Lock to synchronize the PROPID_PROPTYPE_MAP hashtable |
Fields inherited from class com.plumtree.portalpages.rest.ARESTModel |
---|
m_error |
Constructor Summary | |
---|---|
AQueryStoreModel()
|
Method Summary | |
---|---|
protected static void |
AddColNameToSearchPropIdMapping(java.lang.String colName,
int searchPropId)
Helper to add property name to property id mapping entry |
protected void |
AddDataStoreMetaData(XPHashtable dsData,
IXPList dataItems,
int totalRows)
Helper to construct the DataStore response object |
protected static void |
AddPropIdToPropTypeMapping(int propId,
int propType)
Helper to add property id to property type mapping entry |
protected static int |
GetCustomPropType(int propId,
AActivitySpace space)
Custom properties are cached on the user session Only cache types for custom properties are stored since the default doc properties don't change |
int |
GetOrderById()
|
protected static int |
GetPropType(int propId,
AActivitySpace space)
|
java.lang.String |
GetQuery()
Getters and setters for common properties |
abstract XPHashtable |
GetQueryStoreResult()
Main method |
int |
GetResultSize()
|
int |
GetSearchPropIdFromColumnName(java.lang.String colName)
Helper method to lookup property id from property name |
int |
GetStartIndex()
|
void |
SetOrderById(int orderByColId)
|
void |
SetQuery(java.lang.String query)
|
void |
SetResultSize(int resultSize)
|
void |
SetStartIndex(int startIndex)
|
Methods inherited from class com.plumtree.portalpages.rest.ARESTModel |
---|
GetError, SetError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int INVALID_PROPID
public static int NO_PROPTYPE
public static final int PROP_GRIDTYPE_ICON
public static final int PROP_GRIDTYPE_URL
public static final java.lang.String COLNAME_PREFIX
public static final java.lang.String COL_OBJECTID
public static final java.lang.String COL_NAME
public static final java.lang.String COL_DESCRIPTION
public static final java.lang.String COL_CREATED
public static final java.lang.String COL_LASTMODIFIED
public static java.lang.String DATASTORE_PROP_ITEMS
public static java.lang.String DATASTORE_PROP_TOTALRESULTS
public static java.lang.String DATASTORE_PROP_IDENTIFIER
public static java.lang.String DATASTORE_PROP_LABEL
protected static XPHashtable COLNAME_TO_PROPID_MAP
protected static XPHashtable PROPID_PROPTYPE_MAP
public static final java.lang.String CUSTOMPROP_TYPE_SESSIONMAP_NAME
protected static java.lang.Object PROPTYPE_LOCK
Constructor Detail |
---|
public AQueryStoreModel()
Method Detail |
---|
public abstract XPHashtable GetQueryStoreResult()
protected void AddDataStoreMetaData(XPHashtable dsData, IXPList dataItems, int totalRows)
dsData
- The hashtable to set the properties ondataItems
- totalRows
- public int GetSearchPropIdFromColumnName(java.lang.String colName)
colName
-
protected static void AddColNameToSearchPropIdMapping(java.lang.String colName, int searchPropId)
colName
- searchPropId
-
XPIllegalStateException
- if mapping already existsprotected static void AddPropIdToPropTypeMapping(int propId, int propType)
propId
- propType
-
XPIllegalStateException
- if mapping already existsprotected static int GetPropType(int propId, AActivitySpace space)
protected static int GetCustomPropType(int propId, AActivitySpace space)
propId
- space
-
public java.lang.String GetQuery()
public void SetQuery(java.lang.String query)
public int GetResultSize()
public void SetResultSize(int resultSize)
public int GetStartIndex()
public void SetStartIndex(int startIndex)
public int GetOrderById()
public void SetOrderById(int orderByColId)
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |