Package de.pisa.psa.rst.obj
Class PsaRstApiObjLis<T>
java.lang.Object
de.pisa.psa.rst.obj.PsaRstApiObjLis<T>
- Type Parameters:
T
- type of the results
REST API: result list for multiple objects
- Since:
- 04.07.2023
- Author:
- weiland
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add a resultstatic <T> PsaRstApiObjLis<T>
construct the object from a JSONget the continuation keyget resultsvoid
setContinuation
(String continuation) set the continuation keyint
size()
get the number of resultstoString()
-
Field Details
-
CONTINUATION_KEY
name of the continuation parameter- See Also:
-
-
Constructor Details
-
PsaRstApiObjLis
public PsaRstApiObjLis()Constructor
-
-
Method Details
-
getContinuation
get the continuation key- Returns:
- key
-
setContinuation
set the continuation key- Parameters:
continuation
- key
-
getResults
get results- Returns:
- list of results
-
size
public int size()get the number of results- Returns:
- count
-
addResult
add a result- Parameters:
result
- result to add
-
toString
-
fromJson
public static <T> PsaRstApiObjLis<T> fromJson(String json, Class<T> type) throws com.fasterxml.jackson.core.JsonProcessingException construct the object from a JSON- Type Parameters:
T
- type of the result elements- Parameters:
json
- JSONtype
- type of the result elements- Returns:
- list
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-