com.anwen.mongo.aggregate.LambdaAggregateChainWrapper Maven / Gradle / Ivy
package com.anwen.mongo.aggregate;
import com.anwen.mongo.mapper.BaseMapper;
import java.util.List;
/**
* @author anwen
* @date 2024/6/19 下午11:37
*/
public class LambdaAggregateChainWrapper extends LambdaAggregateWrapper> implements ChainAggregate {
private final BaseMapper baseMapper;
private final Class clazz;
public LambdaAggregateChainWrapper(BaseMapper baseMapper, Class clazz) {
this.baseMapper = baseMapper;
this.clazz = clazz;
}
@Override
public List list() {
return list(clazz);
}
@Override
public List list(Class rClazz) {
return baseMapper.aggregateList(this,clazz,rClazz);
}
}