⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqltagattributes.java

📁 数据仓库工具
💻 JAVA
字号:

/*
LoaderGenerator - tool for generated xml, sql and doml file needed for Octopus.


    Copyright (C) 2003  Together

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

package org.webdocwf.util.loader.generator;



import org.webdocwf.util.loader.logging.Logger;
import org.webdocwf.util.loader.logging.StandardLogger;

/**
 *
 * SqlTagAttributes class stores the parameters of sqlTag tag for LoaderJob.xml file.
 * @author Radoslav Dutina
 * @version 1.0
 */
public class SqlTagAttributes {

    private String name = "CreateTables";
    private String logMode = "normal";
    private String onErrorContinue = "false";
    private String commit = "true";
    private String href = "sql/CreateTables.sql";
    private String parse = "text";
    private Logger logger;

    /**
     * Construct object SqlTagAttributes with an associated parameter.
     * @param sqlFileType represents the sql files wich will be created.
     * sqlFileType=0, created file is CreateTables.sql
     * sqlFileType=1, created file is CreateIndex.sql
     * sqlFileType=2, created file is CreatePrimary.sql
     * sqlFileType=3, created file is CreateIntegrity.sql
     * sqlFileType=4, created file is DropTables.sql
     * sqlFileType=5, created file is DropIntegrity.sql
     */
    public SqlTagAttributes(int sqlFileType) {
        setLogger();
        this.logger.write("full", "SqlTagAttributes is started.");
        if (sqlFileType == 0) {
            this.name = "DropIntegrity";
            this.logMode = "normal";
            this.onErrorContinue = "true";
            this.commit = "true";
            this.href = "sql/DropIntegrity.sql";
            this.parse = "text";
        }
        if (sqlFileType == 1) {
            this.name = "DropTables";
            this.logMode = "normal";
            this.onErrorContinue = "true";
            this.commit = "true";
            this.href = "sql/DropTables.sql";
            this.parse = "text";
        }

        if (sqlFileType == 2) {
            this.name = "CreateTables";
            this.logMode = "normal";
            this.onErrorContinue = "false";
            this.commit = "true";
            this.href = "sql/CreateTables.sql";
            this.parse = "text";
        }

        if (sqlFileType == 3) {
            this.name = "CreateIndexes";
            this.logMode = "normal";
            this.onErrorContinue = "false";
            this.commit = "true";
            this.href = "sql/CreateIndex.sql";
            this.parse = "text";
        }

        if (sqlFileType == 4) {
            this.name = "CreatePrimary";
            this.logMode = "normal";
            this.onErrorContinue = "false";
            this.commit = "true";
            this.href = "sql/CreatePrimary.sql";
            this.parse = "text";
        }

        if (sqlFileType == 5) {
            this.name = "CreateForeigin";
            this.logMode = "normal";
            this.onErrorContinue = "false";
            this.commit = "true";
            this.href = "sql/CreateIntegrity.sql";
            this.parse = "text";
        }
        this.logger.write("full", "SqlTagAttributes is finished.");

    }

    /**
     * This method sets value of name parameter.
     * @param _name is value of parameter.
     */
    public void setName(String _name) {
        name = _name;
    }

    /**
     * This method read value of name parameter.
     * @return value of parameter.
     */
    public String getName() {
        return name;
    }

    /**
     * This method sets value of logMode parameter.
     * @param log_Mode is value of parameter.
     */
    public void setLogMode(String log_Mode) {
        logMode = log_Mode;
    }

    /**
     * This method read value of logMode parameter.
     * @return value of parameter.
     */
    public String getLogMode() {
        return logMode;
    }

    /**
     * This method sets value of onErrorContinue parameter.
     * @param on_Error_Continue is value of parameter.
     */
    public void setOnErrorContinue(String on_Error_Continue) {
        onErrorContinue = on_Error_Continue;
    }

    /**
     * This method read value of onErrorContinue parameter.
     * @return value of parameter.
     */
    public String getOnErrorContinue() {
        return onErrorContinue;
    }

    /**
     * This method sets value of commit parameter.
     * @param _Commit is value of parameter.
     */
    public void setCommit(String _Commit) {
        commit = _Commit;
    }

    /**
     * This method read value of commit parameter.
     * @return value of parameter.
     */
    public String getCommit() {
        return commit;
    }

    /**
     * This method sets value of href parameter.
     * @param _href is value of parameter.
     */
    public void setHref(String _href) {
        href = _href;
    }

    /**
     * This method read value of href parameter.
     * @return value of parameter.
     */
    public String getHref() {
        return href;
    }

    /**
     * This method sets value of parse parameter.
     * @param _parse is value of parameter.
     */
    public void setParse(String _parse) {
        parse = _parse;
    }

    /**
     * This method read value of parse parameter.
     * @return value of parameter.
     */
    public String getParse() {
        return parse;
    }
    /**
    			 * This method will set logger object
    			 * @param logger
    			 */
    private void setLogger() {
        this.logger = StandardLogger.getCentralLogger();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -