Class Query.Builder

  • Enclosing class:
    Query

    public static class Query.Builder
    extends java.lang.Object
    Builder for constructing a Query
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • dataSource

        public Query.Builder dataSource​(DocRef value)
        Parameters:
        value - A DocRef that points to the data source of the query
        Returns:
        The Query.Builder, enabling method chaining
      • dataSource

        public Query.Builder dataSource​(java.lang.String type,
                                        java.lang.String uuid,
                                        java.lang.String name)
        Shortcut function for creating the datasource DocRef in one go
        Parameters:
        type - The type of the datasource
        uuid - The UUID of the datasource
        name - The name of the datasource
        Returns:
        this builder, with the completed datasource added.
      • addParam

        public Query.Builder addParam​(java.lang.String key,
                                      java.lang.String value)
        Shortcut function to add a parameter and go straight back to building the query
        Parameters:
        key - The parameter key
        value - The parameter value
        Returns:
        this builder with the completed parameter added.
      • addParams

        public Query.Builder addParams​(Param... values)
        Parameters:
        values - A list of key/value pairs that provide additional information about the query
        Returns:
        The Query.Builder, enabling method chaining
      • build

        public Query build()