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

com.github.aidensuen.mongo.executor.Executor Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package com.github.aidensuen.mongo.executor;

import com.github.aidensuen.mongo.core.MongoDaoStatement;
import com.mongodb.client.result.DeleteResult;
import com.mongodb.client.result.UpdateResult;
import org.bson.Document;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.core.aggregation.AggregationResults;

import java.util.Collection;
import java.util.List;
import java.util.function.Function;

public interface Executor {

    Function DEFAULT_CONVERTER = Function.identity();

     T save(MongoDaoStatement ms, T objectToSave);

     T insert(MongoDaoStatement ms, T objectToSave);

     Collection insert(MongoDaoStatement ms, Collection batchToSave);

    DeleteResult remove(MongoDaoStatement ms, Object parameter);

     List find(MongoDaoStatement ms, Object parameter, Pageable pageable, Function converter);

    long count(MongoDaoStatement ms, Object parameter);

    boolean exists(MongoDaoStatement ms, Object parameter);

    UpdateResult update(MongoDaoStatement ms, Object parameter);

     AggregationResults aggregate(MongoDaoStatement ms, Object parameter);

    Document executeCommand(MongoDaoStatement ms, Object parameter);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy