com.github.aidensuen.mongo.common.base.find.FindDao Maven / Gradle / Ivy
package com.github.aidensuen.mongo.common.base.find;
import com.github.aidensuen.mongo.annotation.RegisterMongoDao;
import com.github.aidensuen.mongo.annotation.FindProvider;
import com.github.aidensuen.mongo.command.OperationType;
import com.github.aidensuen.mongo.mapping.ExampleStr;
import com.github.aidensuen.mongo.provider.base.BaseFindProvider;
import org.springframework.data.mongodb.core.query.Query;
import java.util.List;
/**
* Generic Dao query interface
*
* @param Can not be null
* @author aidensuen
*/
@RegisterMongoDao
public interface FindDao {
/**
* Return list according to the attributes in the entity.
*
* @param record
* @return
*/
@FindProvider(type = BaseFindProvider.class, operationType = OperationType.FIND)
List find(T record);
/**
* Return list according to the query.
*
* @param query
* @return
*/
@FindProvider(type = BaseFindProvider.class, operationType = OperationType.FIND)
List find(Query query);
/**
* Return list according to the ExampleStr.
*
* @param o
* @return
*/
@FindProvider(type = BaseFindProvider.class, operationType = OperationType.FIND)
List find(ExampleStr o);
}