📄 queryset.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;
import java.sql.*;
import java.util.*;
/**
*
* QuerySet class sets the first part of sql statement
* table_Name
* @author Radoslav Dutina
* @version 1.0
*/
public class QuerySet {
private String strQuery = new String("select ");
private String oidColumnName="oid";
private String versionColumnName="version";
/**
* Construct object QuerySet with associated parameters.
* @param iTableInt is the number of target table.
* @param bOidLogicCurrentTable is boolean which decide odi logic
* @param isTOS is boolean which decide odi logic
* @param vecColumnNames is vector of column names in a target table.
* @param vecTableTableName is vector of source (target) table names.
*/
public QuerySet(int iTableInt, boolean bOidLogicCurrentTable, boolean isTOS,
Vector vecColumnNames, Vector vecTableTableName,
String oidColumnName, String versionColumnName ) {
this.oidColumnName=oidColumnName;
this.versionColumnName=versionColumnName;
if (bOidLogicCurrentTable) {
if(isTOS){
// strQuery = strQuery + "oid ";
strQuery = strQuery + this.oidColumnName+" ";
}else{
// strQuery = strQuery + "oid, version ";
strQuery = strQuery + this.oidColumnName+", "+this.versionColumnName+" ";
}
}
for (int i = 0; i < vecColumnNames.size(); i++) {
if(strQuery.length()>9)
strQuery = strQuery+ ", " + vecColumnNames.get(i).toString();
else
strQuery = strQuery+ " " + vecColumnNames.get(i).toString();
}
strQuery += " from " + vecTableTableName.get(iTableInt).toString();
}
/**
* This method read value of strQuery parameter
* @return value of parameter
*/
public String getQuerySet(){
return this.strQuery;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -