com.github.aidensuen.mongo.common.pageable.FindPageableDao Maven / Gradle / Ivy
package com.github.aidensuen.mongo.common.pageable;
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.pageable.PageableProvider;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.core.query.Query;
import java.util.List;
/**
* Generic Dao pageable query interface
*
* @param Can not be null
* @author aidensuen
*/
@RegisterMongoDao
public interface FindPageableDao {
/**
* Return list according to the attributes in the entity.
*
* @param record
* @param pageable
* @return
*/
@FindProvider(type = PageableProvider.class, operationType = OperationType.FIND)
List findByPageable(T record, Pageable pageable);
/**
* Return list according to the query.
*
* @param query
* @param pageable
* @return
*/
@FindProvider(type = PageableProvider.class, operationType = OperationType.FIND)
List findByPageable(Query query, Pageable pageable);
/**
* Return list according to the ExampleStr.
*
* @param o
* @param pageable
* @return
*/
@FindProvider(type = PageableProvider.class, operationType = OperationType.FIND)
List findByPageable(ExampleStr o, Pageable pageable);
}