public class JSONQuery
extends java.lang.Object
Constructor and Description |
---|
JSONQuery()
Constructor
|
JSONQuery(java.lang.String query,
MboRemote owner)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addSort(java.lang.String attr,
boolean asc)
Add order by to existing sort.
|
java.lang.String |
format()
Formats JSON query.
|
java.lang.String |
getJSONQuery()
Get formatted JSON query.
|
java.lang.String |
join(com.ibm.json.java.JSONObject jsonQuery2)
Add more parameters to existing JSON query.
|
java.lang.String |
join(java.lang.String query)
Add more parameters to existing query.
|
void |
remove(java.lang.String key)
Remove parameters.
|
void |
setFields(java.util.Set<java.lang.String> fields)
Set JSON fields.
|
void |
setLimit(int limit)
Set limit for paging.
|
void |
setSelectIDField()
Set ID field.
|
void |
setSkip(int skip)
Set skip for paging.
|
void |
setSort(com.ibm.json.java.JSONArray orderBy)
Set sort object.
|
void |
setSort(java.util.Map<java.lang.String,java.lang.Boolean> sortMap)
Set sort map.
|
public JSONQuery(java.lang.String query, MboRemote owner) throws MXException
query
- query.owner
- Owner business objectMXException
public JSONQuery()
public java.lang.String format() throws MXException, java.rmi.RemoteException
MXException
- Maximo Exceptionjava.rmi.RemoteException
- Remote Exceptionpublic java.lang.String join(java.lang.String query) throws MXException, java.rmi.RemoteException
query
- original query stringMXException
- Maximo Exceptionjava.rmi.RemoteException
- Remote Exceptionpublic java.lang.String join(com.ibm.json.java.JSONObject jsonQuery2) throws MXException, java.rmi.RemoteException
query
- original query objectMXException
- Maximo Exceptionjava.rmi.RemoteException
- Remote Exceptionpublic void setLimit(int limit)
limit
- page limitpublic void setSkip(int skip)
skip
- page recordspublic void remove(java.lang.String key)
key
- key to removepublic void setFields(java.util.Set<java.lang.String> fields)
fields
- set of fields to setpublic void setSelectIDField()
public void setSort(java.util.Map<java.lang.String,java.lang.Boolean> sortMap)
sortMap
- sort mappublic void addSort(java.lang.String attr, boolean asc)
attr
- sort fieldasc
- ascending or descendingpublic void setSort(com.ibm.json.java.JSONArray orderBy)
orderBy
- order by objectpublic java.lang.String getJSONQuery() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException