use of com.marklogic.client.admin.QueryOptionsManager in project components by Talend.
the class MarkLogicCriteriaReader method prepareQueryOption.
private void prepareQueryOption() {
QueryOptionsManager qryOptMgr = connectionClient.newServerConfigManager().newQueryOptionsManager();
if (StringUtils.isNotEmpty(settings.queryOptionLiterals)) {
StringHandle strHandle = new StringHandle();
switch(settings.queryLiteralType) {
case "JSON":
{
strHandle.withFormat(Format.JSON);
break;
}
case "XML":
{
strHandle.withFormat(Format.XML);
break;
}
}
strHandle.set(settings.queryOptionLiterals);
qryOptMgr.writeOptions(settings.queryOptionName, strHandle);
}
}
Aggregations