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

com.aerospike.documentapi.pathparts.PathPart Maven / Gradle / Ivy

Go to download

This project provides an API which allows Aerospike CDT (Collection Data Type) objects to be accessed and mutated using JSON like syntax. Effectively this provides what can be termed a document API as CDT objects can be used to represent JSON in the Aerospike database.

There is a newer version: 2.0.3
Show newest version
package com.aerospike.documentapi.pathparts;

import com.aerospike.client.Operation;
import com.aerospike.client.Value;
import com.aerospike.client.cdt.CTX;
import com.aerospike.client.cdt.ListOperation;

/**
 * AccessPathPart analysis is ultimately used to create CTX (context) objects and operations
 */
public abstract class PathPart {
    public abstract CTX toAerospikeContext();

    public abstract Operation toAerospikeGetOperation(String binName, CTX[] contexts);

    public abstract Operation toAerospikePutOperation(String binName, Object object, CTX[] contexts);

    public Operation toAerospikeAppendOperation(String binName, Object object, CTX[] contexts) {
        return ListOperation.append(binName, Value.get(object), contexts);
    }

    public abstract Operation toAerospikeDeleteOperation(String binName, CTX[] contexts);

    public abstract PathPartTypeEnum getType();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy