All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dream.chain.def.AbstractChainQueryDef Maven / Gradle / Ivy

The newest version!
package com.dream.chain.def;

import com.dream.antlr.smt.QueryStatement;
import com.dream.flex.def.AbstractQueryDef;
import com.dream.flex.def.QueryDef;
import com.dream.flex.factory.FlexQueryFactory;
import com.dream.flex.mapper.FlexMapper;
import com.dream.system.config.Page;
import com.dream.util.tree.Tree;

import java.util.List;

public abstract class AbstractChainQueryDef extends AbstractQueryDef implements QueryDef, ChainQuery {
    protected FlexMapper flexMapper;

    public AbstractChainQueryDef(QueryStatement statement, FlexQueryFactory flexQueryFactory, FlexMapper flexMapper) {
        super(statement, flexQueryFactory);
        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  List tree(Class type) {
        return flexMapper.selectTree(this, type);
    }

    @Override
    public  Page page(Class type, Page page) {
        return flexMapper.selectPage(this, type, page);
    }

    @Override
    public boolean exists() {
        return flexMapper.exists(this);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy