1. A computer-implemented query system, comprising: a server including memory and a processing unit for executing computer-executable components, the memory storing computer-executable components including: a programming model for providing a web service that supports defining a concrete custom query builder subclass derived from a query builder base class included in the programming model and defining a concrete arguments class that extends an arguments base class included in the programming model, wherein: the query builder base class is configured to use query parameters of the arguments base class to create queries; the concrete arguments class includes one or more custom query parameters specific to the concrete custom query builder subclass; the concrete custom query builder subclass is configured to dynamically create a custom query at runtime using parameter values of the one or more custom query parameters which are to be bound to the concrete custom query builder subclass at runtime; the concrete custom query builder subclass uses the custom query to dynamically create a query run at runtime, wherein the query run is configured to execute the custom query for returning query results based on the one or more custom query parameters; and the query builder base class includes a method for initializing an instance of the custom query builder subclass at runtime and a method for retrieving the query run created by the concrete query builder subclass; and a query service for providing an interface to expose data access functionality via the query builder base class included in the programming model, wherein the query service is configured to: accept, from a consumer application at runtime, a query request that includes a reference to the concrete custom query builder subclass; invoke the concrete custom query builder subclass to initialize the instance of the concrete custom query builder subclass and retrieve the query run created by the concrete custom query builder subclass; execute the query run created by the concrete custom query builder subclass for retrieving the query results based on the one or more custom query parameters; and return the query results to the consumer application at runtime.
1. A computer-implemented query system, comprising: a server including memory and a processing unit for executing computer-executable components, the memory storing computer-executable components including: a programming model for providing a web service that supports defining a concrete custom query builder subclass derived from a query builder base class included in the programming model and defining a concrete arguments class that extends an arguments base class included in the programming model, wherein: the query builder base class is configured to use query parameters of the arguments base class to create queries; the concrete arguments class includes one or more custom query parameters specific to the concrete custom query builder subclass; the concrete custom query builder subclass is configured to dynamically create a custom query at runtime using parameter values of the one or more custom query parameters which are to be bound to the concrete custom query builder subclass at runtime; the concrete custom query builder subclass uses the custom query to dynamically create a query run at runtime, wherein the query run is configured to execute the custom query for returning query results based on the one or more custom query parameters; and the query builder base class includes a method for initializing an instance of the custom query builder subclass at runtime and a method for retrieving the query run created by the concrete query builder subclass; and a query service for providing an interface to expose data access functionality via the query builder base class included in the programming model, wherein the query service is configured to: accept, from a consumer application at runtime, a query request that includes a reference to the concrete custom query builder subclass; invoke the concrete custom query builder subclass to initialize the instance of the concrete custom query builder subclass and retrieve the query run created by the concrete custom query builder subclass; execute the query run created by the concrete custom query builder subclass for retrieving the query results based on the one or more custom query parameters; and return the query results to the consumer application at runtime. 2. The system of claim 1 , wherein the query service is configured to: execute a static query in response to receiving a query request that includes a name of the static query; and execute a client-defined query in response to receiving a query request that includes a query definition which fully describes the client-defined query.