com.github.aidensuen.mongo.common.base.find.FindCountDao 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;
/**
* Generic Dao query interface
*
* @param Can not be null
* @author aidensuen
*/
@RegisterMongoDao
public interface FindCountDao {
/**
* Return count according to the attributes in the entity.
*
* @param record
* @return
*/
@FindProvider(type = BaseFindProvider.class, operationType = OperationType.COUNT)
long count(T record);
/**
* Return count according to the query.
*
* @param query
* @return
*/
@FindProvider(type = BaseFindProvider.class, operationType = OperationType.COUNT)
long count(Query query);
/**
* Return count according to the ExampleStr.
*
* @param o
* @return
*/
@FindProvider(type = BaseFindProvider.class, operationType = OperationType.COUNT)
long count(ExampleStr o);
}