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

db.sql.api.cmd.basic.CmdList Maven / Gradle / Ivy

There is a newer version: 1.7.6-RC2
Show newest version
package db.sql.api.cmd.basic;

import db.sql.api.Cmd;
import db.sql.api.SqlBuilderContext;
import db.sql.api.tookit.CmdUtils;

import java.util.List;

public class CmdList implements Cmd {

    private final char[] operator;

    private final List cmdList;

    public CmdList(char[] operator, List cmdList) {
        this.operator = operator;
        this.cmdList = cmdList;
    }

    @Override
    public StringBuilder sql(Cmd module, Cmd parent, SqlBuilderContext context, StringBuilder sqlBuilder) {
        sqlBuilder.append(this.operator);
        CmdUtils.join(module, this, context, sqlBuilder, this.cmdList);
        return sqlBuilder;
    }

    @Override
    public boolean contain(Cmd cmd) {
        return CmdUtils.contain(cmd, this.cmdList);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy