
com.marklogic.client.impl.PlanDocColsIdentifierImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-client-api Show documentation
Show all versions of marklogic-client-api Show documentation
The official MarkLogic Java client API.
The newest version!
package com.marklogic.client.impl;
import com.marklogic.client.impl.BaseTypeImpl.BaseArgImpl;
import com.marklogic.client.type.PlanColumn;
import com.marklogic.client.type.PlanDocColsIdentifier;
import java.util.Map;
public class PlanDocColsIdentifierImpl implements PlanDocColsIdentifier, BaseArgImpl {
private String template;
public PlanDocColsIdentifierImpl(Map mapping) {
StringBuilder sb = new StringBuilder("{");
// Keys are not validated here as they will be caught by the server, and
// restricting the set of keys could cause issues with future server releases
boolean firstOne = true;
for (String key : mapping.keySet()) {
if (!firstOne) {
sb.append(", ");
}
sb.append(String.format("\"%s\": ", key));
((BaseArgImpl) mapping.get(key)).exportAst(sb);
firstOne = false;
}
this.template = sb.append("}").toString();
}
@Override
public StringBuilder exportAst(StringBuilder strb) {
return strb.append(this.template);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy