📄 inputparameters.java
字号:
num1 = 0;
}
if (num1 != -1)
sourceDataBase = source_DataBase;
else
sourceDataBase = source_DataBase + ";SelectMethod=cursor";
} else
sourceDataBase = source_DataBase;
} else {
String msg = "You must enter the place where is source database is placed (param -sdb)!";
LoaderException le = new LoaderException("Exception:", new Exception(msg));
this.logger.write("full", "Exception:" + "You must enter the place where is source database is placed (param -sdb)!"+le.getStackTraceAsString());
throw le;
}
// if (this.logger != null) {
// this.logger.write("full", "\tsetSourceDataBase is finished.");
// }
}
/**
* This method read the value of sourceDataBase parameter.
* @return value of parameter.
*/
public String getSourceDataBase() {
return sourceDataBase;
}
/**
* This method sets the value of targetDataBase parameter.
* @param target_DataBase is the value of the parameter.
* @throws LoaderException
*/
public void setTargetDataBase(String target_DataBase) throws LoaderException {
setLogger();
// if (this.logger != null) {
// this.logger.write("full", "\tsetTargetDataBase is started.");
// }
if (target_DataBase != null) {
if (this.targetDriverName.equalsIgnoreCase("microsoft")) {
int num1 = target_DataBase.indexOf("SelectMethod=");
int num2 = target_DataBase.indexOf("selectMethod=");
if (num2 != -1) {
// target_DataBase=target_DataBase.replaceFirst("selectMethod=","SelectMethod=");
if (target_DataBase.indexOf("selectMethod=") != -1)
target_DataBase = Utils.replaceAll(target_DataBase, "selectMethod=", "SelectMethod=");
num1 = 0;
}
if (num1 != -1)
targetDataBase = target_DataBase;
else
targetDataBase = target_DataBase + ";SelectMethod=cursor";
} else
targetDataBase = target_DataBase;
} else {
String msg = "You must enter the place where is target database is placed (param -tdb)!";
LoaderException le = new LoaderException("Exception:", new Exception(msg));
if (this.logger != null) {
this.logger.write("full", "Exception:" + "You must enter the place where is target database is placed (param -tdb)!"+le.getStackTraceAsString());
}
throw le;
}
// if (this.logger != null) {
// this.logger.write("full", "\tsetTargetDataBase is finished.");
// }
}
/**
* This method read the value of targetDataBase parameter.
* @return value of parameter.
*/
public String getTargetDataBase() {
return targetDataBase;
}
/**
* This method sets the value of valueMode parameter.
* @param value_Mode is the value of the parameter.
* @throws LoaderException
*/
public void setValueMode(String value_Mode) throws LoaderException {
setLogger();
// if (this.logger != null) {
// this.logger.write("full", "\tsetValueMode is started.");
// }
if (value_Mode != null) {
if (value_Mode.equalsIgnoreCase("copy")) {
valueMode = "Overwrite";
} else if (value_Mode.equalsIgnoreCase("sync")) {
valueMode = "Update";
} else {
String msg = "The possible value of value modes (param -m) are 'copy' or 'sync'.!";
LoaderException le = new LoaderException("Exception:", new Exception(msg));
if (this.logger != null) {
this.logger.write("full", "Exception:" + "The possible value of value modes (param -m) are 'copy' or 'sync'.!"+le.getStackTraceAsString());
}
throw le;
}
}
// if (this.logger != null) {
// this.logger.write("full", "\tsetValueMode is finished.");
// }
}
/**
* This method read the value of valueMode parameter.
* @return value of parameter.
*/
public String getValueMode() {
return valueMode;
}
/**
* This method sets the value of generatorOutput parameter.
* @param generator_Output is the value of the parameter.
*/
public void setGeneratorOutput(String generator_Output) {
if (generator_Output != null)
generatorOutput = generator_Output;
}
/**
* This method read the value of generatorOutput parameter.
* @return value of parameter.
*/
public String getGeneratorOutput() {
return generatorOutput;
}
/**
* This method sets the value of sourceUser parameter.
* @param source_User is the value of the parameter.
*/
public void setSourceUser(String source_User) {
if (source_User != null)
sourceUser = source_User;
}
/**
* This method read the value of sourceUser parameter.
* @return value of parameter.
*/
public String getSourceUser() {
return sourceUser;
}
/**
* This method sets the value of sourcePassword parameter.
* @param source_Password is the value of the parameter.
*/
public void setSourcePassword(String source_Password) {
if (source_Password != null)
sourcePassword = source_Password;
}
/**
* This method read the value of sourcePassword parameter.
* @return value of parameter.
*/
public String getSourcePassword() {
return sourcePassword;
}
/**
* This method sets the value of targetUser parameter.
* @param target_User is the value of the parameter.
*/
public void setTargetUser(String target_User) {
if (target_User != null)
targetUser = target_User;
}
/**
* This method read the value of targetUser parameter.
* @return value of parameter.
*/
public String getTargetUser() {
return targetUser;
}
/**
* This method sets the value of targetPassword parameter.
* @param target_Password is the value of the parameter.
*/
public void setTargetPassword(String target_Password) {
if (target_Password != null)
targetPassword = target_Password;
}
/**
* This method read the value of targetPassword parameter.
* @return value of parameter.
*/
public String getTargetPassword() {
return targetPassword;
}
/**
* This method sets the value of sourceDriverName parameter.
* @param source_DriverName is the value of parameter.
*/
public void setSourceDriverName(String source_DriverName) {
if (source_DriverName != null)
sourceDriverName = source_DriverName;
}
/**
* This method read the value of sourceDriverName parameter.
* @return value of parameter.
*/
public String getSourceDriverName() {
return sourceDriverName;
}
/**
* This method sets the value of targetDriverName parameter.
* @param target_DriverName is the value of the parameter.
*/
public void setTargetDriverName(String target_DriverName) {
if (target_DriverName != null)
targetDriverName = target_DriverName;
}
/**
* This method read the value of targetDriverName parameter.
* @return value of parameter.
*/
public String getTargetDriverName() {
return targetDriverName;
}
/**
* This method sets the value of domlPath parameter.
* @param doml_Path is the value of the parameter.
*/
public void setDomlPath(String doml_Path) {
if (doml_Path != null)
domlPath = doml_Path;
}
/**
* This method read the value of domlPath parameter.
* @return value of parameter.
*/
public String getDomlPath() {
return domlPath;
}
/**
* This method sets the value of packageName parameter.
* @param package_Name is the value of parameter.
* @throws LoaderException
*/
public void setPackageName(String package_Name) throws LoaderException {
setLogger();
// if (this.logger != null) {
// this.logger.write("full", "\tsetPackageName is started.");
// }
if (generateDoml.equalsIgnoreCase("true")) {
if (package_Name != null) {
packageName = package_Name;
} else {
String msg = "Sorry, but you must enter the package name (param -pack) for the doml file!";
LoaderException le = new LoaderException("Exception", new Exception(msg));
if (this.logger != null) {
this.logger.write("full", "Exception:" + "Sorry, but you must enter the package name (param -pack) for the doml file!"+le.getStackTraceAsString());
}
throw le;
}
}
// if (this.logger != null) {
// this.logger.write("full", "\tsetPackageName is finished.");
// }
}
/**
* This method read the value of packageName parameter.
* @return value of parameter.
*/
public String getPackageName() {
return packageName;
}
/**
* This method sets the value of alterTablePrimaryKey parameter.
* @param alter_TablePrimaryKey is the value of parameter.
*/
public void setAlterTablePrimaryKey(String alter_TablePrimaryKey) {
alterTablePrimaryKey = alter_TablePrimaryKey;
}
/**
* This method read the value of alterTablePrimaryKey parameter.
* @return value of parameter.ss
*/
public String getAlterTablePrimaryKey() {
return alterTablePrimaryKey;
}
/**
* This method set excluded tables
* @param value
*/
public void setExcludedTables(String value) {
StringTokenizer st = new StringTokenizer(value, ",");
this.excludedTables = new String[st.countTokens()];
int i = 0;
while (st.hasMoreTokens()) {
this.excludedTables[i] = st.nextToken();
i++;
}
}
/**
*This method returns excluded tables
* @return String[] with excluded tables
*/
public String[] getExcludedTables() {
return this.excludedTables;
}
/**
*This method set parameter confJar
*/
public void setConfJarStructure(String confJarStructure) {
if (confJarStructure != null)
this.confJarStructure = confJarStructure;
}
/**
*This method returns string with path to conf in jar
* @return String
*/
public String getConfJarStructure() {
return this.confJarStructure;
}
/**
* 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 + -