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

io.github.afezeria.freedao.classic.runtime.SqlSignature Maven / Gradle / Ivy

package io.github.afezeria.freedao.classic.runtime;

import io.github.afezeria.freedao.StatementType;
import lombok.Getter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.function.Function;

/**
 * sql签名
 */
@Getter
public class SqlSignature {
    /**
     * sql类型
     */
    private final StatementType type;
    private final boolean isCustomSql;
    private final Class daoClass;
    private final String method;
    private final Class returnType;
    private final Class containerType;
    private final Class elementType;
    private final Class[] parameterTypeList;
    private final Function sqlBuilderClosure;
    private final SqlExecutor sqlExecutor;
    private final ResultHandler resultHandler;
    private final Logger logger;

    public SqlSignature(StatementType type,
                        boolean isCustomSql,
                        Class daoClass,
                        String method,
                        Class returnType,
                        Class containerType,
                        Class elementType,
                        Class[] parameterTypeList,
                        Function sqlBuilderClosure,
                        SqlExecutor sqlExecutor,
                        ResultHandler resultHandler) {
        this.type = type;
        this.isCustomSql = isCustomSql;
        this.daoClass = daoClass;
        this.method = method;
        this.returnType = returnType;
        this.containerType = containerType;
        this.elementType = elementType;
        this.sqlBuilderClosure = sqlBuilderClosure;
        this.parameterTypeList = parameterTypeList;
        this.sqlExecutor = sqlExecutor;
        this.resultHandler = resultHandler;
        this.logger = LoggerFactory.getLogger(daoClass.getName() + "." + method);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy