All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aerospike.documentapi.JsonPathObject Maven / Gradle / Ivy

package com.aerospike.documentapi;

import com.aerospike.documentapi.pathparts.PathPart;

import java.util.ArrayList;
import java.util.List;

public class JsonPathObject {
    private final List pathParts;
    private String jsonPathSecondStepQuery;
    private boolean requiresJsonPathQuery;

    public JsonPathObject() {
        pathParts = new ArrayList<>();
    }

    public JsonPathObject copy() {
        String newJsonPathSecondStepQuery = getJsonPathSecondStepQuery();
        boolean newRequiresJsonPathQuery = requiresJsonPathQuery();

        JsonPathObject newJsonPathObject = new JsonPathObject();
        for (PathPart pathPart : pathParts) {
            newJsonPathObject.addPathPart(pathPart);
        }
        newJsonPathObject.setJsonPathSecondStepQuery(newJsonPathSecondStepQuery);
        newJsonPathObject.setRequiresJsonPathQuery(newRequiresJsonPathQuery);
        return newJsonPathObject;
    }

    public List getPathParts() {
        return pathParts;
    }

    public void addPathPart(PathPart pathPart) {
        pathParts.add(pathPart);
    }

    public boolean requiresJsonPathQuery() {
        return requiresJsonPathQuery;
    }

    public void setRequiresJsonPathQuery(boolean status) {
        requiresJsonPathQuery = status;
    }

    public String getJsonPathSecondStepQuery() {
        return jsonPathSecondStepQuery;
    }

    public void setJsonPathSecondStepQuery(String jsonPathSecondStepQuery) {
        this.jsonPathSecondStepQuery = jsonPathSecondStepQuery;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy