com.dream.chain.def.AbstractChainQuery Maven / Gradle / Ivy
package com.dream.chain.def;
import com.dream.antlr.smt.QueryStatement;
import com.dream.flex.def.AbstractQuery;
import com.dream.flex.def.Query;
import com.dream.flex.factory.QueryCreatorFactory;
import com.dream.flex.mapper.FlexMapper;
import com.dream.system.config.Page;
import java.util.List;
public abstract class AbstractChainQuery extends AbstractQuery implements Query, ChainQuery {
private FlexMapper flexMapper;
public AbstractChainQuery(QueryStatement statement, QueryCreatorFactory queryCreatorFactory, FlexMapper flexMapper) {
super(statement, queryCreatorFactory);
this.flexMapper = flexMapper;
}
@Override
public T one(Class type) {
return flexMapper.selectOne(this, type);
}
@Override
public List list(Class type) {
return flexMapper.selectList(this, type);
}
@Override
public Page page(Class type, Page page) {
return flexMapper.selectPage(this, type, page);
}
}