Interface URIBuilder


public interface URIBuilder
  • Method Details

    • addQueryOption

      URIBuilder addQueryOption(QueryOption option, String value)
      Adds the specified query option to the URI.
      Concatenates value if the specified query option already exists.
      Parameters:
      option - query option.
      value - query option value.
      Returns:
      current URIBuilder instance
    • replaceQueryOption

      URIBuilder replaceQueryOption(QueryOption option, String value)
      Adds/replaces the specified query option to the URI.
      Parameters:
      option - query option.
      value - query option value.
      Returns:
      current URIBuilder instance
    • addQueryOption

      URIBuilder addQueryOption(String option, String value, boolean replace)
      Adds/Replaces the specified (custom) query option to the URI.
      Parameters:
      option - query option.
      value - query option value.
      replace - if true then replace existing one.
      Returns:
      current URIBuilder instance.
    • addParameterAlias

      URIBuilder addParameterAlias(String alias, String exp)
      Adds the specified (custom) parameter alias to the URI.
      Parameters:
      alias - parameter alias.
      exp - expression value.
      Returns:
      current URIBuilder instance.
    • appendEntitySetSegment

      URIBuilder appendEntitySetSegment(String segmentValue)
      Appends EntitySet segment to the URI.
      Parameters:
      segmentValue - segment value.
      Returns:
      current URIBuilder instance
    • appendKeySegment

      URIBuilder appendKeySegment(Object val)
      Appends key segment to the URI.
      Parameters:
      val - segment value.
      Returns:
      current URIBuilder instance
    • appendKeySegment

      URIBuilder appendKeySegment(Map<String,Object> segmentValues)
      Appends key segment to the URI, for multiple keys.
      Parameters:
      segmentValues - segment values.
      Returns:
      current URIBuilder instance
    • appendPropertySegment

      URIBuilder appendPropertySegment(String segmentValue)
      Appends property segment to the URI.
      Parameters:
      segmentValue - segment value.
      Returns:
      current URIBuilder instance
    • appendNavigationSegment

      URIBuilder appendNavigationSegment(String segmentValue)
      Appends navigation segment to the URI.
      Parameters:
      segmentValue - segment value.
      Returns:
      current URIBuilder instance
    • appendDerivedEntityTypeSegment

      URIBuilder appendDerivedEntityTypeSegment(String segmentValue)
      Appends derived entity type segment to the URI.
      Parameters:
      segmentValue - segment value.
      Returns:
      current URIBuilder instance
    • appendValueSegment

      URIBuilder appendValueSegment()
      Appends value segment to the URI.
      Returns:
      current URIBuilder instance
    • appendCountSegment

      URIBuilder appendCountSegment()
      Appends count segment to the URI.
      Returns:
      current URIBuilder instance
    • appendOperationCallSegment

      URIBuilder appendOperationCallSegment(String operation)
      Appends operation (action or function) segment to the URI.
      Parameters:
      operation - Operation (action or function) name
      Returns:
      current URIBuilder instance
    • appendMetadataSegment

      URIBuilder appendMetadataSegment()
      Appends metadata segment to the URI.
      Returns:
      current URIBuilder instance
    • appendBatchSegment

      URIBuilder appendBatchSegment()
      Appends batch segment to the URI.
      Returns:
      current URIBuilder instance
    • count

      URIBuilder count()
      Adds count query option.
      Returns:
      current URIBuilder instance
    • expand

      URIBuilder expand(String... expandItems)
      Adds expand query option.
      Parameters:
      expandItems - items to be expanded in-line
      Returns:
      current URIBuilder instance
      See Also:
    • format

      URIBuilder format(String format)
      Adds format query option.
      Parameters:
      format - media type acceptable in a response.
      Returns:
      current URIBuilder instance
      See Also:
    • filter

      URIBuilder filter(URIFilter filter)
      Adds filter for filter query option.
      Parameters:
      filter - filter instance (to be obtained via FilterFactory); note that build() method will be immediately invoked.
      Returns:
      current URIBuilder instance
      See Also:
    • filter

      URIBuilder filter(String filter)
      Adds filter query option.
      Parameters:
      filter - filter string.
      Returns:
      current URIBuilder instance
      See Also:
    • select

      URIBuilder select(String... selectItems)
      Adds select query option.
      Parameters:
      selectItems - select items
      Returns:
      current URIBuilder instance
      See Also:
    • orderBy

      URIBuilder orderBy(String order)
      Adds orderby query option.
      Parameters:
      order - order string.
      Returns:
      current URIBuilder instance
      See Also:
    • top

      URIBuilder top(int top)
      Adds top query option.
      Parameters:
      top - maximum number of entities to be returned.
      Returns:
      current URIBuilder instance
      See Also:
    • skip

      URIBuilder skip(int skip)
      Adds skip query option.
      Parameters:
      skip - number of entities to be skipped into the response.
      Returns:
      current URIBuilder instance
      See Also:
    • skipToken

      URIBuilder skipToken(String skipToken)
      Adds skiptoken query option.
      Parameters:
      skipToken - opaque token.
      Returns:
      current URIBuilder instance
      See Also:
    • build

      URI build()
      Build OData URI.
      Returns:
      OData URI.
    • appendKeySegment

      URIBuilder appendKeySegment(EdmEnumType enumType, String memberName)
      Appends enum key segment to the URI.
      Parameters:
      enumType - enum type
      memberName - enum member name
      Returns:
      current URIBuilder instance
    • appendKeySegment

      URIBuilder appendKeySegment(Map<String,org.apache.commons.lang3.tuple.Pair<EdmEnumType,String>> enumValues, Map<String,Object> segmentValues)
      Appends key segment to the URI, for multiple keys.
      Parameters:
      enumValues - enum segment values.
      segmentValues - segment values.
      Returns:
      current URIBuilder instance
    • appendSingletonSegment

      URIBuilder appendSingletonSegment(String segmentValue)
      Appends Singleton segment to the URI.
      Parameters:
      segmentValue - segment value.
      Returns:
      current URIBuilder instance
    • appendEntityIdSegment

      URIBuilder appendEntityIdSegment(String segmentValue)
      Appends entity-id segment to the URI.
      Parameters:
      segmentValue - segment value
      Returns:
      current URIBuilder instance
    • appendRefSegment

      URIBuilder appendRefSegment()
      Appends ref segment to the URI.
      Returns:
      current URIBuilder instance
    • appendCrossjoinSegment

      URIBuilder appendCrossjoinSegment(String... segmentValues)
      Appends cross join segment to the URI.
      Parameters:
      segmentValues - segment values.
      Returns:
      current URIBuilder instance
    • appendAllSegment

      URIBuilder appendAllSegment()
      Appends all segment to the URI.
      Returns:
      current URIBuilder instance
    • id

      URIBuilder id(String idValue)
      Adds id query option.
      Parameters:
      idValue - opaque token.
      Returns:
      current URIBuilder instance
      See Also:
    • count

      URIBuilder count(boolean value)
      Appends count query option.
      Parameters:
      value - true or false
      Returns:
      current URIBuilder instance
      See Also:
    • search

      URIBuilder search(URISearch search)
      Appends search query option.
      Parameters:
      search - search expression
      Returns:
      current URIBuilder instance
      See Also:
    • search

      URIBuilder search(String expression)
      Appends search query option.
      Parameters:
      expression - search expression
      Returns:
      current URIBuilder instance
      See Also:
    • expandWithOptions

      URIBuilder expandWithOptions(String expandItem, Map<QueryOption,Object> options)
      The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].
      Parameters:
      expandItem - item to be expanded.
      options - System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count, $search, $expand, and $levels.
      Returns:
      current URIBuilder instance.
      See Also:
    • expandWithOptions

      URIBuilder expandWithOptions(String expandItem, boolean pathRef, boolean pathCount, Map<QueryOption,Object> options)
      The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].
      Parameters:
      expandItem - item to be expanded.
      pathRef - include the /$ref at the end of the $expand item's path;if true pathCount MUST be false
      pathCount - include /$count at the end of the $expand item's path;if true pathRef MUST be false
      options - System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count, $search, $expand, and $levels.
      Returns:
      current URIBuilder instance.
      See Also:
    • expandWithSelect

      URIBuilder expandWithSelect(String expandItem, String... selectItems)
      Properties of related entities can be specified by including the $select query option within the $expand.
      http://host/service/Products?$expand=Category($select=Name)
      Parameters:
      expandItem - related entity name.
      selectItems - properties to be selected.
      Returns:
      current URIBuilder instance.
      See Also:
    • appendActionCallSegment

      URIBuilder appendActionCallSegment(String action)
      Appends action segment to the URI.
      Parameters:
      action - Action name
      Returns:
      current URIBuilder instance
    • addCustomQueryOption

      URIBuilder addCustomQueryOption(String customName, String customValue)
      Adds/Replaces the specified custom query option to the URI.
      Parameters:
      option - .
      value - .
      Returns:
      current URIBuilder instance.