📄 configreader.java
字号:
//return (new Boolean(bValue.toString()).booleanValue());
return true;
}
}else{
LoaderException le = new LoaderException("Exception:",new Exception("Type "+s+" is not supported. You must add it in conf file for this database vendor."));
throw le;
}
return isNumber;
}
/**
* Method isNumber is used for checking column type.
* @param s String that represents column type.
* @return true if it is numeric and false if it is not.
*/
public boolean isBinaryObject(String s) throws LoaderException{
if( s != null )
s = s.toLowerCase();
boolean isBinaryObject = false;
//TODO TEST THIS!!!ZK added next line because of problems with LONG VARCHAR on DB2
//s = Utils.replaceAll(s," ","_");
//TODO ZK added next line because of problems with LONG VARCHAR on DB2
if (s.equalsIgnoreCase("LONG VARCHAR")){
s = "long_varchar";
}
//end
if (this.isBinaryObjectMap.containsKey(s)){
Object bValue = this.isBinaryObjectMap.get(s);
if( bValue != null && (bValue.toString()).equalsIgnoreCase("true")) {
//return (new Boolean(bValue.toString()).booleanValue());
return true;
}
}else{
LoaderException le = new LoaderException("Exception:",new Exception("Type "+s+" is not supported. You must add it in conf file for this database vendor."));
throw le;
}
return isBinaryObject;
}
/**
* Method isDate is used for checking column type.
* @param s String that represents column type.
* @return true if it is numeric and false if it is not.
*/
public boolean isDate(String s) throws LoaderException{
if (s != null)
s = s.toLowerCase();
boolean isDate = false;
//TODO TEST THIS!!!ZK added next line because of problems with LONG VARCHAR on DB2
//s = Utils.replaceAll(s," ","_");
//TODO ZK added next line because of problems with LONG VARCHAR on DB2
if (s.equalsIgnoreCase("LONG VARCHAR")){
s = "long_varchar";
}
//end
if (this.isDateMap.containsKey(s)){
Object dValue = this.isDateMap.get(s);
if ((dValue != null) && (dValue.toString()).equalsIgnoreCase("true")){
//return (new Boolean(dValue.toString()).booleanValue());
return true;
}
}else{
LoaderException le = new LoaderException("Exception:",new Exception("Type "+s+" is not supported. You must add it in conf file for this database vendor."));
throw le;
}
return isDate;
}
/**
* This method read value of bGetColumnsSupported parameter
* @return value of bGetColumnsSupported attribute.
*/
public boolean getColumnsSupported() {
return this.bGetColumnsSupported;
}
/**
* This method read value of bSetMaxRowsSupported parameter
* @return value of bSetMaxRowsSupported attribute.
*/
public boolean getMaxRowsSupported() {
return this.bSetMaxRowsSupported;
}
/**
* This method read value of oidColumnName parameter
* @return value of oidColumnName attribute.
*/
public String getOidColumnName() {
return this.oidColumnName;
}
/**
* This method read value of versionColumnName parameter
* @return value of versionColumnName attribute.
*/
public String getVersionColumnName() {
return this.versionColumnName;
}
/**
* This method read value of bConnectionPrefix parameter
* @return value of bConnectionPrefix attribute.
*/
public String getConnectionPrefix() {
return this.bConnectionPrefix;
}
/**
* This method read value of bReadingOrderRelevant parameter
* @return value of bReadingOrderRelevant attribute.
*/
public boolean getReadingOrderRelevant() {
return this.bReadingOrderRelevant;
}
/**
* This method read value of bSetEmptyStringAsNull parameter
* @return value of bSetEmptyStringAsNull attribute.
*/
public boolean getSetEmptyStringAsNull() {
return this.bSetEmptyStringAsNull;
}
/**
* This method read value of bSetCursorNameEnabled parameter
* @return value of bSetCursorNameEnabled attribute.
*/
public boolean getSetCursorNameEnabled() {
return this.bSetCursorNameEnabled;
}
/**
* This method read value of bSetFetchSizeEnabled parameter
* @return value of bSetFetchSizeEnabled attribute.
*/
public boolean getSetFetchSizeEnabled() {
return this.bSetFetchSizeEnabled;
}
/**
* This method read value of bRowCountEnabled parameter
* @return value of bRowCountEnabled attribute.
*/
public boolean getRowCountEnabled() {
return this.bRowCountEnabled;
}
/**
* This method read value of bEnableOrderBy parameter
* @return value of EnableOrderBy attribute.
*/
public boolean getEnableOrderBy() {
return this.bEnableOrderBy;
}
/**
* This method read value of bAfterLastRow parameter
* @return value of AfterLastRow attribute.
*/
public boolean getAfterLastRow() {
return this.bAfterLastRow;
}
/**
* This method read value of bFileSystemDatabase parameter
* @return value of bFileSystemDatabase attribute.
*/
public boolean getFileSystemDatabase() {
return this.bFileSystemDatabase;
}
/**
* This method read value of bEnableJumpResult parameter
* @return value of EnableJumpResult attribute.
*/
public boolean getEnableJumpResult() {
return this.bEnableJumpResult;
}
/**
* This method read value of bRequiredUser parameter
* @return value of RequiredUser attribute.
*/
public boolean getRequiredUser() {
return this.bRequiredUser;
}
/**
* This method read value of iFirstColumnResult parameter
* @return value of FirstColumnResult attribute.
*/
public int getFirstColumnResult() {
return this.iFirstColumnResult;
}
/**
* This method read value of strDriverClassName parameter
* @return value of SourceDriverClassName attribute.
*/
public String getDriverClassName() {
return this.strDriverClassName;
}
/**
* This method read value of strVendorFileName parameter
* @return value of VendorFileName attribute.
*/
public String getVendorFileName() {
return this.strVendorFileName;
}
/**
* This method set value of strVendorFileName parameter
* @param fileName set dbVendorFileName which is used for reading separated database conf files.
*/
public void setVendorFileName(String fileName) {
this.strVendorFileName = fileName;
}
/**
* This method set value of echo parameter
* @param logger set Logger which is used for log file.
*/
public void setLogger(Logger logger) {
this.logger = logger;
}
/**
* This method read value from parameter
* @return value of parameter
*/
public String getOidDbType() {
return this.oidDbType;
}
/**
* This method read value from parameter
* @return value of parameter
*/
public String getVersionDbType() {
return this.versionDbType;
}
/**
* This method read value from parameter
* @return value of parameter
*/
public String getDateFormat() {
return this.dateFormat;
}
/**
* This method set value of confJarStructure parameter
* @param confJarStructure is value of parameter
*/
public void setConfJarStructure(String confJarStructure) {
if (confJarStructure != null && !confJarStructure.equalsIgnoreCase("")) {
if (confJarStructure.endsWith("/") || confJarStructure.endsWith("\\"))
confJarStructure = confJarStructure.substring(0,
confJarStructure.length() - 1);
this.confJarStructure = confJarStructure;
this.useSeparateConfFiles = true;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -