com.scudata.app.config.RaqsoftConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.app.config;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import com.scudata.common.DBConfig;
import com.scudata.common.JNDIConfig;
import com.scudata.common.SpringDBConfig;
/**
* ?????ļ?raqsoftConfig.xml
*
*/
public class RaqsoftConfig implements Cloneable, Externalizable {
private static final long serialVersionUID = -5119570158866655710L;
/** Runtime */
/** Database configuration list */
private List dbList = null;
/**
* Encrypt Level. ConfigConstsEE.ENCRYPT_NONE,
* ConfigConstsEE.ENCRYPT_PASSWORD,ConfigConstsEE.ENCRYPT_URL_USER_PASSWORD
*/
private byte encryptLevel = ConfigConsts.ENCRYPT_NONE;
private String pwdClass = null; // ???ܽ??ܹ?????
/** Esproc */
/** Main path */
private String mainPath = null;
/** Spl path list */
private List splPathList = null;
/** Temporary path */
private String tempPath = null;
/** Default charSet */
private String charSet = null;
/** Default date format */
private String dateFormat = null;
/** Default time format */
private String timeFormat = null;
/** Default date time format */
private String dateTimeFormat = null;
/** Default file buffer size */
private String bufSize = null;
/** Local host */
// private String localHost = null;
/** Local port */
// private String localPort = null;
/** List of automatically connected data source names */
private List autoConnectList = null;
/** Log level */
private String logLevel = null;
/**
* Log type
* ConfigConsts.LOG_DEFAULT,ConfigConsts.LOG_SLF
* ??????ʱ????ΪConfigConsts.LOG_DEFAULT
*/
private String logType = ConfigConsts.LOG_DEFAULT;
/** Parallel number */
private String parallelNum = null;
/** Cursor Parallel number */
private String cursorParallelNum = null;
/** Group table block size */
private String blockSize = null;
/** Comma separated missing values */
private String nullStrings = "nan,null,n/a";
/** The number of records fetched from the cursor each time */
private String fetchCount = null;
/** List of external libraries */
private List importLibs = null;
/** External library directory */
private String extLibsPath = null;
/** File path of custom functions **/
private String customFunctionFile = null;
/** Esproc serial number */
private String esprocSerialNo = null;
/** Remote store list */
private List remoteStoreList = null;
/** Default remote store */
private String defaultRemoteStore = null;
/** Server **/
/** Default data source **/
private String defDataSource = null;
/** JNDI data source list **/
private List jndiList = null;
/** Spring data source list **/
private List springDBList = null;
/** Server properties **/
private Properties serverProps = null;
/** Initialized spl **/
private String initSpl = null;
/** JDBC **/
/** Has JDBC node */
private boolean jdbcNode = false;
/** JDBC loading environment. Including Runtime and Server. */
private String jdbcLoad = "Runtime,Server";
/**
* After the SQL gateway is configured, select statements are parsed by spl. The
* parameters of the spl file are sql and args (sql parameter value sequence).
*/
private String gateway = null;
/** Unit list */
private List unitList = null;
/** XMLA list */
private List xmlaList = null; // ??ά???ݿ?????
/**
* Constructor
*/
public RaqsoftConfig() {
}
/**
* Get database configuration list
*
* @return
*/
public List getDBList() {
return dbList;
}
/**
* Set database configuration list
*
* @param dbList
*/
public void setDBList(List dbList) {
this.dbList = dbList;
}
/**
* Get encrypt Level. ConfigConstsReport.ENCRYPT_NONE,
* ConfigConstsReport.ENCRYPT_PASSWORD,ConfigConstsEE.ENCRYPT_URL_USER_PASSWORD
*
* @return
*/
public byte getEncryptLevel() {
return encryptLevel;
}
/**
* Set encrypt Level. ConfigConstsReport.ENCRYPT_NONE,
* ConfigConstsReport.ENCRYPT_PASSWORD,ConfigConstsEE.ENCRYPT_URL_USER_PASSWORD
*
* @param encryptLevel
*/
public void setEncryptLevel(byte encryptLevel) {
this.encryptLevel = encryptLevel;
}
/**
* ???ܽ??ܹ?????
* @return the pwdClass
*/
public String getPwdClass() {
return pwdClass;
}
/**
* ???ܽ??ܹ?????
* @param pwdClass the pwdClass to set
*/
public void setPwdClass(String pwdClass) {
this.pwdClass = pwdClass;
}
/**
* Get the main path
*
* @return
*/
public String getMainPath() {
return mainPath;
}
/**
* Set the main path
*
* @param mainPath
*/
public void setMainPath(String mainPath) {
this.mainPath = mainPath;
}
/**
* Get spl path list
*
* @return
*/
public List getSplPathList() {
return splPathList;
}
/**
* Set spl path list
*
* @param splPathList
*/
public void setSplPathList(List splPathList) {
this.splPathList = splPathList;
}
/**
* Get temporary path
*
* @return
*/
public String getTempPath() {
return tempPath;
}
/**
* Set temporary path
*
* @param tempPath
*/
public void setTempPath(String tempPath) {
this.tempPath = tempPath;
}
/**
* Get charSet
*
* @return
*/
public String getCharSet() {
return charSet;
}
/**
* Set charSet
*
* @param charSet
*/
public void setCharSet(String charSet) {
this.charSet = charSet;
}
/**
* Get default date format
*
* @return
*/
public String getDateFormat() {
return dateFormat;
}
/**
* Set default date format
*
* @param dateFormat
*/
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
}
/**
* Get default time format
*
* @return
*/
public String getTimeFormat() {
return timeFormat;
}
/**
* Set default time format
*
* @param timeFormat
*/
public void setTimeFormat(String timeFormat) {
this.timeFormat = timeFormat;
}
/**
* Get default date time format
*
* @return
*/
public String getDateTimeFormat() {
return dateTimeFormat;
}
/**
* Set default date format
*
* @param dateTimeFormat
*/
public void setDateTimeFormat(String dateTimeFormat) {
this.dateTimeFormat = dateTimeFormat;
}
/**
* Get default file buffer size
*
* @return
*/
public String getBufSize() {
return bufSize;
}
/**
* Set default file buffer size
*
* @param bufSize
*/
public void setBufSize(String bufSize) {
this.bufSize = bufSize;
}
/**
* Get group table block size
*
* @return
*/
public String getBlockSize() {
return blockSize;
}
/**
* Set group table block size
*
* @param blockSize
*/
public void setBlockSize(String blockSize) {
this.blockSize = blockSize;
}
/**
* Get Local host
*
* @return
*/
// public String getLocalHost() {
// return localHost;
// }
/**
* Set Local host
*
* @param localHost
*/
// public void setLocalHost(String localHost) {
// this.localHost = localHost;
// }
/**
* Get Local port
*
* @return
*/
// public String getLocalPort() {
// return localPort;
// }
/**
* Set Local port
*
* @param localPort
*/
// public void setLocalPort(String localPort) {
// this.localPort = localPort;
// }
/**
* Get List of automatically connected data source names
*
* @return
*/
public List getAutoConnectList() {
return autoConnectList;
}
/**
* Set List of automatically connected data source names
*
* @param autoConnectList
*/
public void setAutoConnectList(List autoConnectList) {
this.autoConnectList = autoConnectList;
}
/**
* Get Log level
*
* @return
*/
public String getLogLevel() {
return logLevel;
}
/**
* Set Log level
*
* @param logLevel
*/
public void setLogLevel(String logLevel) {
this.logLevel = logLevel;
}
/**
* Get Log type
*
* @return
*/
public String getLogType() {
return logType;
}
/**
* Set Log type
*
* @param logType
*/
public void setLogType(String logType) {
this.logType = logType;
}
/**
* @return the remoteStoreList
*/
public List getRemoteStoreList() {
return remoteStoreList;
}
/**
* @param remoteStoreList the remoteStoreList to set
*/
public void setRemoteStoreList(List remoteStoreList) {
this.remoteStoreList = remoteStoreList;
}
/**
* @return the defaultRemoteStore
*/
public String getDefaultRemoteStore() {
return defaultRemoteStore;
}
/**
* @param defaultRemoteStore the defaultRemoteStore to set
*/
public void setDefaultRemoteStore(String defaultRemoteStore) {
this.defaultRemoteStore = defaultRemoteStore;
}
/**
* Get List of external libraries
*
* @return
*/
public List getImportLibs() {
return importLibs;
}
/**
* Set List of external libraries
*
* @param importLibs
*/
public void setImportLibs(List importLibs) {
this.importLibs = importLibs;
}
/**
* Get JNDI data source list
*
* @return
*/
public List getJNDIList() {
return jndiList;
}
/**
* Set JNDI data source list
*
* @param jndiList
*/
public void setJNDIList(List jndiList) {
this.jndiList = jndiList;
}
/**
* Get Spring data source list
*
* @return
*/
public List getSpringDBList() {
return springDBList;
}
/**
* Set Spring data source list
*
* @param jndiList
*/
public void setSpringDBList(List springDBList) {
this.springDBList = springDBList;
}
/**
* Get Default data source
*
* @return
*/
public String getDefDataSource() {
return defDataSource;
}
/**
* Set Default data source
*
* @param defDataSource
*/
public void setDefDataSource(String defDataSource) {
this.defDataSource = defDataSource;
}
/**
* Get Server properties
*
* @return
*/
public Properties getServerProperties() {
return serverProps;
}
/**
* Set Server properties
*
* @param serverProps
*/
public void setServerProperties(Properties serverProps) {
this.serverProps = serverProps;
}
/**
* Get JDBC loading environment
*
* @return
*/
public String getJdbcLoad() {
return jdbcLoad;
}
/**
* Set JDBC loading environment
*
* @param jdbcLoad
*/
public void setJdbcLoad(String jdbcLoad) {
this.jdbcLoad = jdbcLoad;
}
/**
* Has JDBC node
*
* @return
*/
public boolean isJdbcNode() {
return jdbcNode;
}
/**
* Set has JDBC node
*
* @param jdbcNode
*/
public void setJdbcNode(boolean jdbcNode) {
this.jdbcNode = jdbcNode;
}
/**
* Get the gateway of JDBC. After the SQL gateway is configured, select
* statements are parsed by spl. The parameters of the spl file are sql and args
* (sql parameter value sequence).
*
* @return
*/
public String getGateway() {
return gateway;
}
/**
* Set the gateway of JDBC. After the SQL gateway is configured, select
* statements are parsed by spl. The parameters of the spl file are sql and args
* (sql parameter value sequence).
*
* @param gateway
*/
public void setGateway(String gateway) {
this.gateway = gateway;
}
/**
* Get unit list
*
* @return
*/
public List getUnitList() {
return unitList;
}
/**
* Set unit list
*
* @param unitList
*/
public void setUnitList(List unitList) {
this.unitList = unitList;
}
/**
* Get parallel number
*
* @return
*/
public String getParallelNum() {
return parallelNum;
}
/**
* Set parallel number
*
* @param parallelNum
*/
public void setParallelNum(String parallelNum) {
this.parallelNum = parallelNum;
}
/**
* Get Cursor Parallel Number
*
* @return
*/
public String getCursorParallelNum() {
return cursorParallelNum;
}
/**
* Set Cursor Parallel Number
*
* @param cursorParallelNum
*/
public void setCursorParallelNum(String cursorParallelNum) {
this.cursorParallelNum = cursorParallelNum;
}
/**
* Get comma separated missing values
*
* @return
*/
public String getNullStrings() {
return nullStrings;
}
/**
* Set comma separated missing values
*
* @param nullStrings
*/
public void setNullStrings(String nullStrings) {
this.nullStrings = nullStrings;
}
/**
* Get External library directory
*
* @return
*/
public String getExtLibsPath() {
return extLibsPath;
}
/**
* Set External library directory
*
* @param extLibsPath
*/
public void setExtLibsPath(String extLibsPath) {
this.extLibsPath = extLibsPath;
}
/**
* Get initialized spl
*
* @return
*/
public String getInitSpl() {
return initSpl;
}
/**
* Set initialized spl
*
* @param initSpl
*/
public void setInitSpl(String initSpl) {
this.initSpl = initSpl;
}
/**
* Get the number of records fetched from the cursor each time
*
* @return
*/
public String getFetchCount() {
return fetchCount;
}
/**
* Set the number of records fetched from the cursor each time
*
* @param fetchCount
*/
public void setFetchCount(String fetchCount) {
this.fetchCount = fetchCount;
}
/**
* Get XMLA list
*
* @return
*/
public List getXmlaList() {
return xmlaList;
}
/**
* Set XMLA list
*
* @param xmlaList
*/
public void setXmlaList(List xmlaList) {
this.xmlaList = xmlaList;
}
/**
* Get the path of the custom functions file
*
* @return file path
*/
public String getCustomFunctionFile() {
return customFunctionFile;
}
/**
* Set the path of the custom functions file
*
* @param customFunctionFile
*/
public void setCustomFunctionFile(String customFunctionFile) {
this.customFunctionFile = customFunctionFile;
}
/**
* Get the esproc serial number
* @return the esprocSerialNo
*/
public String getEsprocSerialNo() {
return esprocSerialNo;
}
/**
* Set the esproc serial number
* @param esprocSerialNo the esprocSerialNo to set
*/
public void setEsprocSerialNo(String esprocSerialNo) {
this.esprocSerialNo = esprocSerialNo;
}
/**
* Deep clone
*
* @return
*/
public RaqsoftConfig deepClone() {
RaqsoftConfig config = new RaqsoftConfig();
setConfig(config);
return config;
}
/**
* Set the configuration to the RaqsoftConfig object
*
* @param config
*/
protected void setConfig(RaqsoftConfig config) {
if (dbList != null) {
List cloneDBList = new ArrayList();
for (DBConfig dbc : dbList) {
cloneDBList.add(new DBConfig(dbc));
}
config.setDBList(cloneDBList);
}
config.setEncryptLevel(encryptLevel);
config.setPwdClass(pwdClass);
config.setMainPath(mainPath);
if (splPathList != null) {
List cloneSplPathList = new ArrayList();
cloneSplPathList.addAll(splPathList);
config.setSplPathList(cloneSplPathList);
}
config.setTempPath(tempPath);
config.setCharSet(charSet);
config.setDateFormat(dateFormat);
config.setTimeFormat(dateTimeFormat);
config.setDateTimeFormat(dateTimeFormat);
config.setBufSize(bufSize);
// config.setLocalHost(localHost);
// config.setLocalPort(localPort);
if (autoConnectList != null) {
List cloneAutoConnectList = new ArrayList();
cloneAutoConnectList.addAll(autoConnectList);
config.setAutoConnectList(cloneAutoConnectList);
}
config.setLogLevel(logLevel);
config.setLogType(logType);
config.setParallelNum(parallelNum);
config.setCursorParallelNum(cursorParallelNum);
config.setBlockSize(blockSize);
config.setNullStrings(nullStrings);
config.setFetchCount(fetchCount);
if (importLibs != null) {
List cloneImportLibs = new ArrayList();
cloneImportLibs.addAll(importLibs);
config.setImportLibs(cloneImportLibs);
}
config.setExtLibsPath(extLibsPath);
config.setCustomFunctionFile(customFunctionFile);
config.setEsprocSerialNo(esprocSerialNo);
if (remoteStoreList != null) {
List cloneRemoteStoreList = new ArrayList();
for (RemoteStoreConfig rs : remoteStoreList) {
cloneRemoteStoreList.add((RemoteStoreConfig) rs.deepClone());
}
config.setRemoteStoreList(cloneRemoteStoreList);
}
config.setDefaultRemoteStore(defaultRemoteStore);
config.setDefDataSource(defDataSource);
if (jndiList != null) {
List cloneJndiList = new ArrayList();
cloneJndiList.addAll(jndiList);
config.setJNDIList(cloneJndiList);
}
if (springDBList != null) {
List cloneSpringDBList = new ArrayList();
cloneSpringDBList.addAll(springDBList);
config.setSpringDBList(cloneSpringDBList);
}
if (serverProps != null) {
Properties cloneServerProps = new Properties();
cloneServerProps.putAll(serverProps);
config.setServerProperties(cloneServerProps);
}
config.setInitSpl(initSpl);
config.setJdbcLoad(jdbcLoad);
config.setGateway(gateway);
if (unitList != null) {
List cloneUnitList = new ArrayList();
cloneUnitList.addAll(unitList);
config.setUnitList(cloneUnitList);
}
config.setJdbcNode(jdbcNode);
if (xmlaList != null) {
List cloneXmlaList = new ArrayList();
for (Xmla xmla : xmlaList) {
cloneXmlaList.add(xmla.deepClone());
}
config.setXmlaList(cloneXmlaList);
}
}
/**
* Realize serialization
*/
public void writeExternal(ObjectOutput out) throws IOException {
/* Version type */
out.writeByte(7);
out.writeObject(dbList);
out.writeObject(mainPath);
out.writeObject(splPathList);
out.writeObject(tempPath);
out.writeObject(charSet);
out.writeObject(dateFormat);
out.writeObject(timeFormat);
out.writeObject(dateTimeFormat);
out.writeObject(bufSize);
// out.writeObject(localHost);
// out.writeObject(localPort);
out.writeObject(autoConnectList);
out.writeObject(logLevel);
out.writeObject(parallelNum);
out.writeObject(cursorParallelNum);
out.writeObject(blockSize);
out.writeObject(nullStrings);
out.writeObject(fetchCount);
out.writeObject(importLibs);
out.writeObject(extLibsPath);
out.writeObject(defDataSource);
out.writeObject(jndiList);
out.writeObject(serverProps);
out.writeObject(initSpl);
out.writeObject(jdbcLoad);
out.writeObject(gateway);
out.writeObject(unitList);
out.writeObject(xmlaList);
out.writeBoolean(jdbcNode);
out.writeObject(customFunctionFile);
out.writeObject(springDBList);
out.writeObject(esprocSerialNo);
out.writeByte(encryptLevel);
out.writeObject(pwdClass);
out.writeObject(remoteStoreList);
out.writeObject(defaultRemoteStore);
out.writeObject(logType);
}
/**
* Realize serialization
*/
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
/* Version type */
int version = in.readByte();
dbList = (List) in.readObject();
mainPath = (String) in.readObject();
splPathList = (List) in.readObject();
tempPath = (String) in.readObject();
charSet = (String) in.readObject();
dateFormat = (String) in.readObject();
timeFormat = (String) in.readObject();
dateTimeFormat = (String) in.readObject();
bufSize = (String) in.readObject();
if (version < 3) {
in.readObject(); // localHost = (String)
in.readObject(); // localPort = (String)
}
autoConnectList = (List) in.readObject();
logLevel = (String) in.readObject();
parallelNum = (String) in.readObject();
cursorParallelNum = (String) in.readObject();
blockSize = (String) in.readObject();
nullStrings = (String) in.readObject();
fetchCount = (String) in.readObject();
importLibs = (List) in.readObject();
extLibsPath = (String) in.readObject();
defDataSource = (String) in.readObject();
jndiList = (List) in.readObject();
serverProps = (Properties) in.readObject();
initSpl = (String) in.readObject();
jdbcLoad = (String) in.readObject();
gateway = (String) in.readObject();
unitList = (List) in.readObject();
xmlaList = (List) in.readObject();
jdbcNode = in.readBoolean();
if (version > 1) {
customFunctionFile = (String) in.readObject();
}
if (version > 2) {
springDBList = (List) in.readObject();
}
if (version > 3) {
esprocSerialNo = (String) in.readObject();
}
if (version > 4) {
encryptLevel = in.readByte();
pwdClass = (String) in.readObject();
}
if (version > 5) {
remoteStoreList = (List) in.readObject();
defaultRemoteStore = (String) in.readObject();
}
if (version > 6) {
logType = (String) in.readObject();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy