1 2 22 23 package org.webdocwf.util.loader; 24 25 import java.sql.*; 26 import java.util.*; 27 28 35 public class QuerySet { 36 37 private String strQuery = new String ("select "); 38 private String oidColumnName="oid"; 39 private String versionColumnName="version"; 40 41 49 public QuerySet(int iTableInt, boolean bOidLogicCurrentTable, boolean isTOS, 50 Vector vecColumnNames, Vector vecTableTableName, 51 String oidColumnName, String versionColumnName ) { 52 53 this.oidColumnName=oidColumnName; 54 this.versionColumnName=versionColumnName; 55 56 if (bOidLogicCurrentTable) { 57 if(isTOS){ 58 strQuery = strQuery + this.oidColumnName+" "; 60 }else{ 61 strQuery = strQuery + this.oidColumnName+", "+this.versionColumnName+" "; 63 } 64 } 65 66 for (int i = 0; i < vecColumnNames.size(); i++) { 67 if(strQuery.length()>9) 68 strQuery = strQuery+ ", " + vecColumnNames.get(i).toString(); 69 else 70 strQuery = strQuery+ " " + vecColumnNames.get(i).toString(); 71 } 72 strQuery += " from " + vecTableTableName.get(iTableInt).toString(); 73 74 } 75 76 80 public String getQuerySet(){ 81 return this.strQuery; 82 } 83 84 } 85 | Popular Tags |