Class PsaRstApiObjLis<T>

  • Type Parameters:
    T - type of the results

    public class PsaRstApiObjLis<T>
    extends java.lang.Object
    REST API: result list for multiple objects
    Since:
    04.07.2023
    Author:
    weiland
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONTINUATION_KEY
      name of the continuation parameter
    • Constructor Summary

      Constructors 
      Constructor Description
      PsaRstApiObjLis()
      Constructor
    • Field Detail

      • CONTINUATION_KEY

        public static final java.lang.String CONTINUATION_KEY
        name of the continuation parameter
        See Also:
        Constant Field Values
    • Constructor Detail

      • PsaRstApiObjLis

        public PsaRstApiObjLis()
        Constructor
    • Method Detail

      • getContinuation

        public java.lang.String getContinuation()
        get the continuation key
        Returns:
        key
      • setContinuation

        public void setContinuation​(java.lang.String continuation)
        set the continuation key
        Parameters:
        continuation - key
      • getResults

        public java.util.List<T> getResults()
        get results
        Returns:
        list of results
      • size

        public int size()
        get the number of results
        Returns:
        count
      • addResult

        public void addResult​(T result)
        add a result
        Parameters:
        result - result to add
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • fromJson

        public static <T> PsaRstApiObjLis<T> fromJson​(java.lang.String json,
                                                      java.lang.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 - JSON
        type - type of the result elements
        Returns:
        list
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException