class QueryServiceArtifact extends CatalogQuery {

    @Override
    public String JSON2(boolean isArray, boolean isEmbed) {
        StringBuilder sb = new StringBuilder();
        if (!isEmbed && isArray)
            sb.append("{ ");
        if (isArray)
            sb.append("\"serviceArtifact\": [");
        Map<String, String> valueMap = new HashMap<>();
        String sep = "";
        boolean first = true;

        for (ServiceArtifact o : serviceArtifactList) {
            if (first)
                sb.append("\n");
            first = false;

            boolean vrNull = o == null;

            put(valueMap, "ARTIFACT_UUID", vrNull ? null : o.getArtifactUUID());
            put(valueMap, "TYPE", vrNull ? null : o.getType());
            put(valueMap, "NAME", vrNull ? null : o.getName());
            put(valueMap, "VERSION", vrNull ? null : o.getVersion());
            put(valueMap, "DESCRIPTION", vrNull ? null : o.getDescription());
            put(valueMap, "CONTENT", vrNull ? null : o.getContent());
            put(valueMap, "CHECKSUM", vrNull ? null : o.getChecksum());
            sb.append(sep).append(this.setTemplate(TEMPLATE, valueMap));
            sep = ",\n";
        }
        if (!first)
            sb.append("\n");
        if (isArray)
            sb.append("]");
        if (!isEmbed && isArray)
            sb.append("}");
        return sb.toString();
    }

    public  QueryServiceArtifact();
    public  QueryServiceArtifact(List<ServiceArtifact> alist);

}