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
Reviewed-on: http://review.couchbase.org/44618
Reviewed-by: Natasha Sullivan xxx@xxx.xxx
Tested-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

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

Change has been successfully cherry-picked as 401a77eb5bf0921937ee31d1669a0788655dcda5

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