DESCRIPTION

JVMCBC-94: Allow GenericQueryRequest to take json

Motivation
----------
In N1QL dp4, queries are done in the form of statements and optional
parameters (like positional parameters or named parameters.
The statement is what is today a Query in the java SDK.
We need to refactor N1QL support in java SDK to support the correct
syntax of statements.

Modifications
-------------
GenericQueryRequest now has a isJson flag used by the handler to set
the Content-Type header to "application/json" if true.

BREAKING: to better differentiate this change, factory methods have now
replaced the constructor of GenericQueryRequest.

QueryHandlerTest now tests that the correct content type is set. Added
test of the request body as well.

Result
------
Users can now pass a json query, and the N1QL DP4 server will correctly
respond to it (but the response is yet to be parsed by the SDK).

All unit tests pass.

Change-Id: I5484c6a45c3b57a94e4f9fe5ea424906c95c83a2


COMMENTS

author: Estrella Humphrey
date: 2014-12-31 11:29:18.189000000

Uploaded patch set 2.

-------------------------------------
author: Natasha Sullivan
date: 2014-12-31 12:02:31.213000000

Patch Set 2: Code-Review+2

-------------------------------------
author: Estrella Humphrey
date: 2014-12-31 13:40:13.138000000

Patch Set 2: Verified+1

-------------------------------------
