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

org.redkalex.source.mongo.MongodbDataSource Maven / Gradle / Ivy

There is a newer version: 2.7.7
Show newest version
/*
 *
 */

package org.redkalex.source.mongo;

import com.mongodb.client.model.BsonField;
import com.mongodb.reactivestreams.client.MongoClient;
import com.mongodb.reactivestreams.client.MongoCollection;
import com.mongodb.reactivestreams.client.MongoDatabase;
import java.io.Serializable;
import java.util.List;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.redkale.source.AbstractDataSource;
import org.redkale.source.ColumnValue;
import org.redkale.source.EntityInfo;
import org.redkale.source.FilterFunc;
import org.redkale.source.FilterNode;
import org.redkale.source.Flipper;

/**
 *
 * @author zhangjx
 */
public abstract class MongodbDataSource extends AbstractDataSource {

    public abstract MongoClient getReadMongoClient();

    public abstract MongoDatabase getReadMongoDatabase();

    public abstract  MongoCollection getReadMongoCollection(EntityInfo info);

    public abstract  MongoCollection getReadMongoDocumentCollection(EntityInfo info);

    public abstract MongoClient getWriteMongoClient();

    public abstract MongoDatabase getWriteMongoDatabase();

    public abstract  MongoCollection getWriteMongoCollection(EntityInfo info);

    public abstract  MongoCollection getWriteMongoDocumentCollection(EntityInfo info);

    public abstract Bson createSortBson(Flipper flipper);

    public abstract  List createUpdateBson(EntityInfo info, ColumnValue... values);

    public abstract  Bson createUpdateBson(EntityInfo info, ColumnValue colval);

    public abstract BsonField createBsonField(FilterFunc func, String fieldName, Serializable column);

    public abstract  Bson createFilterBson(EntityInfo info, FilterNode node);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy