public class ResourceSet extends Object
ResourceSet implement the operations on ResourceSet. It
provides the set of Resource.
This object can be created by MaximoConnector. The following code
shows how to create MaximoConnector
ResourceSet rs = mc.resourceSet(osName);
ResourceSet rs = mc.resourceSet(URL);
The following examples demonstrate how to build a new ResourceSet
ResourceSet rs = new ResourceSet(osName);
ResourceSet rs = new ResourceSet(maximoConnector);
ResourceSet rs = new ResourceSet(osName, maximoConnector);
ResourceSet rs = new ResourceSet(URL, maximoConnector);
The following examples show how to set ResourceSet data from
ResourceSet
rs.where(queryWhere).select(querySelect).hasTerms(terms).pageSize(pageSize)
rs.paging();
rs.stablePageing();
The following examples show how to fetch, load, reload, go to next page, go
back to previous page, get savedQuery for ResourceSet data
rs.fetch(mapOptions);
rs.load();
rs.reload();
rs.nextPage();
rs.previousPage();
rs.savedQuery(savedQuery);
rs.savedQuery(name, paramValues);
The following examples show how to get ResourceSet data from
ResourceSet
JsonObject jo = rs.toJSON();
byte[] jodata = rs.toJSONBytes();
The following examples show how to create, get and delete Resource
from ResourceSet
Resource rs = fetchMember(uri, properties);
Resource rs = member(index);
Resource rs = create(jsonObject, properties);
The following example shows how to get the this page size from
ResourceSet
int count = rs.count();
int totalCount = rs.totalCount();
int totalCount = rs.totalCount(true);
| Constructor and Description |
|---|
ResourceSet(MaximoConnector mc) |
ResourceSet(String osName) |
ResourceSet(String osName,
MaximoConnector mc) |
ResourceSet(URL publicURI,
MaximoConnector mc) |
| Modifier and Type | Method and Description |
|---|---|
BulkProcessor |
bulk() |
int |
configuredPageSize() |
int |
count()
get current number of Resource by calling RESTful API
|
Resource |
create(javax.json.JsonObject jo,
Map<String,Object> headers,
String... properties) |
Resource |
create(javax.json.JsonObject jo,
String... properties)
Create a new Resource with the properties in hearder
|
ResourceSet |
fetch()
Fetching the data for ResourceSet
|
ResourceSet |
fetch(Map options) |
Resource |
fetchMember(String uri,
String... properties) |
ResourceSet |
fetchWithAddtionalHeaders(Map<String,Object> additionalHeaders)
Fetching the data for ResourceSet with arbitrary headers
|
ResourceSet |
fetchWithAddtionalHeadersAndParams(Map<String,Object> additionalParams,
Map<String,Object> additionalHeaders)
Fetching the data for ResourceSet with arbitrary parameters and headers
|
ResourceSet |
fetchWithAddtionalParams(Map<String,Object> additionalParams)
Fetching the data for ResourceSet with arbitrary parameters
|
String |
getAppURI()
Get current URI
|
String |
getOsURI() |
String |
getPublicURI() |
Aggregation |
groupBy() |
boolean |
hasNextPage() |
ResourceSet |
hasTerms(String... terms) |
ResourceSet |
load()
Load the current data
|
Resource |
member(int index)
get the member in ResourceSet
|
Resource |
mergeSync(javax.json.JsonObject jo,
Map<String,Object> headers,
String... properties) |
Resource |
mergeSync(javax.json.JsonObject jo,
String... properties) |
ResourceSet |
nextPage()
Go to nextPage
|
ResourceSet |
orderBy(String... orderByProperties) |
ResourceSet |
pageSize(int pageSize) |
ResourceSet |
paging(boolean type) |
ResourceSet |
previousPage()
Go back to previous page
|
ResourceSet |
reload() |
ResourceSet |
savedQuery(SavedQuery qsaved) |
ResourceSet |
savedQuery(String name,
Map<String,Object> paramValues) |
ResourceSet |
searchAttributes(String... attributes) |
ResourceSet |
select(String... selectClause) |
ResourceSet |
stablePaging(boolean type) |
Resource |
sync(javax.json.JsonObject jo,
Map<String,Object> headers,
String... properties) |
Resource |
sync(javax.json.JsonObject jo,
String... properties) |
javax.json.JsonObject |
toJSON()
Get ResourceSet data in JSON
|
byte[] |
toJSONBytes()
Get ResourceSet data in JSONBytes
|
int |
totalCount()
Count the total number of Resources by calling RESTful API
|
int |
totalCount(boolean fromServer)
Count the total number of Resources.
|
ResourceSet |
where(QueryWhere where) |
ResourceSet |
where(String whereClause) |
public static final Logger logger
public ResourceSet(String osName)
public ResourceSet(MaximoConnector mc)
public ResourceSet(String osName, MaximoConnector mc)
public ResourceSet(URL publicURI, MaximoConnector mc)
public String getAppURI()
public String getPublicURI()
public String getOsURI()
public javax.json.JsonObject toJSON()
throws IOException,
OslcException
IOExceptionOslcExceptionpublic byte[] toJSONBytes()
throws OslcException,
IOException
IOExceptionOslcExceptionpublic ResourceSet where(String whereClause)
public ResourceSet where(QueryWhere where)
public ResourceSet searchAttributes(String... attributes)
public ResourceSet hasTerms(String... terms)
public ResourceSet select(String... selectClause)
public ResourceSet pageSize(int pageSize)
public ResourceSet paging(boolean type)
public ResourceSet stablePaging(boolean type)
public ResourceSet orderBy(String... orderByProperties)
public ResourceSet fetch() throws OslcException, IOException
OslcExceptionIOExceptionpublic ResourceSet fetchWithAddtionalParams(Map<String,Object> additionalParams) throws OslcException, IOException
additionalParams - OslcExceptionIOExceptionpublic ResourceSet fetchWithAddtionalHeaders(Map<String,Object> additionalHeaders) throws OslcException, IOException
additionalHeaders - OslcExceptionIOExceptionpublic ResourceSet fetchWithAddtionalHeadersAndParams(Map<String,Object> additionalParams, Map<String,Object> additionalHeaders) throws OslcException, IOException
additionalParams - additionalHeaders - OslcExceptionIOExceptionpublic ResourceSet fetch(Map options) throws OslcException, IOException
OslcExceptionIOExceptionpublic ResourceSet nextPage() throws IOException, OslcException
IOExceptionOslcExceptionpublic boolean hasNextPage()
throws IOException,
OslcException
IOExceptionOslcExceptionpublic ResourceSet previousPage() throws IOException, OslcException
IOExceptionOslcExceptionpublic ResourceSet load() throws OslcException, IOException
OslcExceptionIOExceptionpublic ResourceSet reload() throws OslcException, IOException
OslcExceptionIOExceptionpublic ResourceSet savedQuery(String name, Map<String,Object> paramValues)
public ResourceSet savedQuery(SavedQuery qsaved)
public Resource fetchMember(String uri, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionpublic Resource member(int index) throws OslcException, IOException
index - IOExceptionOslcExceptionpublic Resource create(javax.json.JsonObject jo, String... properties) throws IOException, OslcException
jo - properties - IOExceptionOslcExceptionpublic Resource create(javax.json.JsonObject jo, Map<String,Object> headers, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionpublic Resource sync(javax.json.JsonObject jo, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionpublic Resource sync(javax.json.JsonObject jo, Map<String,Object> headers, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionpublic Resource mergeSync(javax.json.JsonObject jo, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionpublic Resource mergeSync(javax.json.JsonObject jo, Map<String,Object> headers, String... properties) throws IOException, OslcException
IOExceptionOslcExceptionpublic int configuredPageSize()
public int totalCount()
throws IOException,
OslcException
IOExceptionOslcExceptionpublic int totalCount(boolean fromServer)
throws IOException,
OslcException
IOExceptionOslcExceptionpublic int count()
throws OslcException,
IOException
OslcExceptionIOExceptionpublic BulkProcessor bulk()
public Aggregation groupBy()
Copyright © 2018. All rights reserved.