Class PageParams

  • All Implemented Interfaces:
    org.opensearch.common.xcontent.ToXContent, org.opensearch.common.xcontent.ToXContentObject

    public class PageParams
    extends java.lang.Object
    implements org.opensearch.common.xcontent.ToXContentObject
    Paging parameters for GET requests
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent

        org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.opensearch.common.ParseField FROM  
      static org.opensearch.common.ParseField PAGE  
      static org.opensearch.common.xcontent.ConstructingObjectParser<PageParams,​java.lang.Void> PARSER  
      static org.opensearch.common.ParseField SIZE  
      • Fields inherited from interface org.opensearch.common.xcontent.ToXContent

        EMPTY_PARAMS
    • Constructor Summary

      Constructors 
      Constructor Description
      PageParams​(java.lang.Integer from, java.lang.Integer size)
      Constructs paging parameters
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.Integer getFrom()  
      java.lang.Integer getSize()  
      int hashCode()  
      org.opensearch.common.xcontent.XContentBuilder toXContent​(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.opensearch.common.xcontent.ToXContentObject

        isFragment
    • Field Detail

      • PAGE

        public static final org.opensearch.common.ParseField PAGE
      • FROM

        public static final org.opensearch.common.ParseField FROM
      • SIZE

        public static final org.opensearch.common.ParseField SIZE
      • PARSER

        public static final org.opensearch.common.xcontent.ConstructingObjectParser<PageParams,​java.lang.Void> PARSER
    • Constructor Detail

      • PageParams

        public PageParams​(@Nullable
                          java.lang.Integer from,
                          @Nullable
                          java.lang.Integer size)
        Constructs paging parameters
        Parameters:
        from - skips the specified number of items. When null the default value will be used.
        size - specifies the maximum number of items to obtain. When null the default value will be used.
    • Method Detail

      • getFrom

        public java.lang.Integer getFrom()
      • getSize

        public java.lang.Integer getSize()
      • toXContent

        public org.opensearch.common.xcontent.XContentBuilder toXContent​(org.opensearch.common.xcontent.XContentBuilder builder,
                                                                         org.opensearch.common.xcontent.ToXContent.Params params)
                                                                  throws java.io.IOException
        Specified by:
        toXContent in interface org.opensearch.common.xcontent.ToXContent
        Throws:
        java.io.IOException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object