Commit c8f6dad5 by wuchao

新版本

parent 81257c05
package com.chenyang.nse.bussiness.bean;
import com.alibaba.druid.sql.ast.SQLExpr;
public class Column {
private String columnName;
private String value;
private String columnAlisa;
private boolean isSubQuery;
private String subAlisa;
private String schema;
private String table;
private boolean isMethod;
private SQLExpr expr;
private String primarykey;
public Column(String columnName, String columnAlisa, boolean isSubQuery, String subAlisa) {
this.columnName = columnName;
this.columnAlisa = columnAlisa;
this.isSubQuery = isSubQuery;
this.subAlisa = subAlisa;
}
public Column() {
}
public Column(boolean isMethod, SQLExpr expr) {
this.isMethod = isMethod;
this.expr = expr;
}
public Column(String columnName, String schema, String table) {
this.columnName = columnName;
this.schema = schema;
this.table = table;
}
public String getColumnName() {
return this.columnName;
}
public void setColumnName(String columnName) {
this.columnName = columnName;
}
public boolean isSubQuery() {
return this.isSubQuery;
}
public void setSubQuery(boolean subQuery) {
this.isSubQuery = subQuery;
}
public String getColumnAlisa() {
return this.columnAlisa;
}
public void setColumnAlisa(String columnAlisa) {
this.columnAlisa = columnAlisa;
}
public String getSubAlisa() {
return this.subAlisa;
}
public void setSubAlisa(String subAlisa) {
this.subAlisa = subAlisa;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getSchema() {
return this.schema;
}
public void setSchema(String schema) {
this.schema = schema;
}
public String getTable() {
return this.table;
}
public void setTable(String table) {
this.table = table;
}
public boolean isMethod() {
return this.isMethod;
}
public void setMethod(boolean method) {
this.isMethod = method;
}
public SQLExpr getExpr() {
return this.expr;
}
public void setExpr(SQLExpr expr) {
this.expr = expr;
}
public String getPrimarykey() {
return this.primarykey;
}
public void setPrimarykey(String primarykey) {
this.primarykey = primarykey;
}
}
package com.chenyang.nse.bussiness.dao.table.core.encryption;
import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.encryption.ColumnPrimaryKeyInfo;
import java.util.List;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;
@Repository
public class ColumnPrimaryKeyInfoDao extends BaseDao<ColumnPrimaryKeyInfo, String> {
public List<ColumnPrimaryKeyInfo> queryColumnPrimaryKeyInfoList(String dataSystemId, String projectId, String schema, String tableName) {
String sql = "SELECT id as id,primary_key_columns FROM COLUMN_PRIMARY_KEY_INFO WHERE datasystem_id = '" + dataSystemId + "' and project_id = '" + projectId + "' and tschema='" + schema + "' and tname='" + tableName + "'";
return this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(ColumnPrimaryKeyInfo.class)).getResultList();
}
}
package com.chenyang.nse.bussiness.engine.infa.powercenter961.simplesubdata;
import com.chenyang.nse.bussiness.engine.infa.basic.xmlbean.SOURCE;
import com.chenyang.nse.bussiness.engine.infa.basic.xmlbean.SOURCEFIELD;
import com.chenyang.nse.bussiness.engine.infa.powercenter961.pubbean.SourceBean;
import java.util.ArrayList;
import java.util.List;
public class ChildSeSourceUtil {
public List<SOURCE> getSeChildSource(List<SourceBean> sb) {
List<SOURCE> so_list = new ArrayList();
if (sb != null && sb.size() > 0) {
for(int i = 0; i < sb.size(); ++i) {
SOURCE source = new SOURCE();
source.setBUSINESSNAME(((SourceBean)sb.get(i)).getBusinessname());
source.setDATABASETYPE(((SourceBean)sb.get(i)).getDatabasetype());
source.setDBDNAME(((SourceBean)sb.get(i)).getDbdname());
source.setDESCRIPTION(((SourceBean)sb.get(i)).getDescripion());
source.setNAME(((SourceBean)sb.get(i)).getSo_name());
source.setOBJECTVERSION("1");
source.setOWNERNAME(((SourceBean)sb.get(i)).getSo_ownname());
source.setVERSIONNUMBER("1");
for(SOURCEFIELD sourcefield : this.getConvertTableInfoToSOURCEFIELD(((SourceBean)sb.get(i)).getCb().getKeytype(), ((SourceBean)sb.get(i)).getCb().getNameList(), ((SourceBean)sb.get(i)).getCb().getTypeList(), ((SourceBean)sb.get(i)).getCb().getLengthList(), ((SourceBean)sb.get(i)).getCb().getScalelist(), ((SourceBean)sb.get(i)).getCb().getPrecisionList())) {
source.getSOURCEFIELD().add(sourcefield);
}
so_list.add(source);
}
}
return so_list;
}
public List<SOURCEFIELD> getConvertTableInfoToSOURCEFIELD(List<String> keytype, List<String> nameList, List<String> typeList, List<String> lengthList, List<String> scalelist, List<String> precisionlist) {
String tmpFieldName = "";
List sourceFieldList = new ArrayList();
int phyOffset = 0;
int prePhyOffset = 0;
int offset = 0;
int preOffset = 0;
String[] sourceFieldInfoStr = null;
for(int i = 0; i < nameList.size(); ++i) {
SOURCEFIELD sourceField = new SOURCEFIELD();
sourceField.setBUSINESSNAME("");
sourceField.setDATATYPE((String)typeList.get(i));
sourceField.setDESCRIPTION("");
sourceField.setFIELDNUMBER(i + 1 + "");
sourceField.setFIELDPROPERTY("0");
sourceField.setFIELDTYPE("ELEMITEM");
sourceField.setHIDDEN("NO");
sourceField.setKEYTYPE((String)keytype.get(i));
sourceField.setLENGTH((String)lengthList.get(i));
sourceField.setLEVEL("0");
sourceField.setNAME((String)nameList.get(i));
if ("PRIMARY KEY".equals(keytype.get(i))) {
sourceField.setNULLABLE("NOTNULL");
} else {
sourceField.setNULLABLE("NULL");
}
sourceField.setOCCURS("0");
offset += preOffset;
sourceField.setOFFSET(offset + "");
sourceField.setPHYSICALLENGTH((String)lengthList.get(i));
phyOffset += prePhyOffset;
sourceField.setPHYSICALOFFSET(phyOffset + "");
sourceField.setPICTURETEXT("");
sourceField.setPRECISION((String)precisionlist.get(i));
sourceField.setSCALE((String)scalelist.get(i));
sourceField.setUSAGEFLAGS("");
sourceFieldList.add(sourceField);
}
return sourceFieldList;
}
}
package com.chenyang.nse.bussiness.engine.infa.powercenter961.simplesubdata;
import com.chenyang.nse.bussiness.engine.infa.basic.xmlbean.TARGET;
import com.chenyang.nse.bussiness.engine.infa.basic.xmlbean.TARGETFIELD;
import com.chenyang.nse.bussiness.engine.infa.powercenter961.pubbean.TargetBean;
import java.util.ArrayList;
import java.util.List;
public class ChildSeTargetUtil {
public List<TARGET> getSeChildTarget(List<TargetBean> tb) {
List<TARGET> tar_list = new ArrayList();
if (tb != null && tb.size() > 0) {
for(int i = 0; i < tb.size(); ++i) {
TARGET target = new TARGET();
target.setBUSINESSNAME("");
target.setCONSTRAINT("");
target.setDATABASETYPE(((TargetBean)tb.get(i)).getDatabasetype());
target.setDESCRIPTION("");
target.setNAME(((TargetBean)tb.get(i)).getTar_name());
target.setOBJECTVERSION("1");
target.setTABLEOPTIONS("");
target.setVERSIONNUMBER("1");
for(TARGETFIELD targetfield : this.getConvertTableInfoToTARGETFIELD(((TargetBean)tb.get(i)).getCb().getKeytype(), ((TargetBean)tb.get(i)).getCb().getNameList(), ((TargetBean)tb.get(i)).getCb().getTypeList(), ((TargetBean)tb.get(i)).getCb().getLengthList(), ((TargetBean)tb.get(i)).getCb().getScalelist(), ((TargetBean)tb.get(i)).getCb().getPrecisionList())) {
target.getTARGETFIELD().add(targetfield);
}
tar_list.add(target);
}
}
return tar_list;
}
public List<TARGETFIELD> getConvertTableInfoToTARGETFIELD(List<String> keytype, List<String> nameList, List<String> typeList, List<String> lengthList, List<String> scaleList, List<String> precisionlist) {
List targetFieldList = new ArrayList();
String[] targetFieldInfoStr = null;
for(int i = 0; i < nameList.size(); ++i) {
TARGETFIELD targetfield = new TARGETFIELD();
targetfield.setBUSINESSNAME("");
targetfield.setDATATYPE((String)typeList.get(i));
targetfield.setDESCRIPTION("");
targetfield.setFIELDNUMBER("" + (i + 1));
targetfield.setKEYTYPE((String)keytype.get(i));
targetfield.setNAME((String)nameList.get(i));
if ("PRIMARY KEY".equals(keytype.get(i))) {
targetfield.setNULLABLE("NOTNULL");
} else {
targetfield.setNULLABLE("NULL");
}
targetfield.setPICTURETEXT("");
targetfield.setPRECISION((String)precisionlist.get(i));
targetfield.setSCALE((String)scaleList.get(i));
targetFieldList.add(targetfield);
}
return targetFieldList;
}
}
package com.chenyang.nse.bussiness.entity;
public class Column {
private String name;
private String type;
private String length;
private String constraint;
private boolean primarykey;
public Column() {
}
public Column(String name, String type, String length, String constraint, boolean primarykey) {
this.name = name;
this.type = type;
this.length = length;
this.constraint = constraint;
this.primarykey = primarykey;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public String getLength() {
return this.length;
}
public void setLength(String length) {
this.length = length;
}
public String getConstraint() {
return this.constraint;
}
public void setConstraint(String constraint) {
this.constraint = constraint;
}
public boolean isPrimarykey() {
return this.primarykey;
}
public void setPrimarykey(boolean primarykey) {
this.primarykey = primarykey;
}
}
package com.chenyang.nse.bussiness.entity.param.maskingself;
public class ColumnInfoParam {
private String primarykey;
private String columnname;
private String typename;
private String columnsize;
private String decimaldigits;
private String isnullable;
private String remarks;
private String regextype;
private String maskingruleid;
private String maskingrulename;
private String foreignkey;
public String getPrimarykey() {
return this.primarykey;
}
public void setPrimarykey(String primarykey) {
this.primarykey = primarykey;
}
public String getColumnname() {
return this.columnname;
}
public void setColumnname(String columnname) {
this.columnname = columnname;
}
public String getTypename() {
return this.typename;
}
public void setTypename(String typename) {
this.typename = typename;
}
public String getColumnsize() {
return this.columnsize;
}
public void setColumnsize(String columnsize) {
this.columnsize = columnsize;
}
public String getDecimaldigits() {
return this.decimaldigits;
}
public void setDecimaldigits(String decimaldigits) {
this.decimaldigits = decimaldigits;
}
public String getIsnullable() {
return this.isnullable;
}
public void setIsnullable(String isnullable) {
this.isnullable = isnullable;
}
public String getRemarks() {
return this.remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getRegextype() {
return this.regextype;
}
public void setRegextype(String regextype) {
this.regextype = regextype;
}
public String getMaskingruleid() {
return this.maskingruleid;
}
public void setMaskingruleid(String maskingruleid) {
this.maskingruleid = maskingruleid;
}
public String getMaskingrulename() {
return this.maskingrulename;
}
public void setMaskingrulename(String maskingrulename) {
this.maskingrulename = maskingrulename;
}
public String getForeignkey() {
return this.foreignkey;
}
public void setForeignkey(String foreignkey) {
this.foreignkey = foreignkey;
}
}
package com.chenyang.nse.bussiness.entity.vo;
public class ComboboxVO {
private String value;
private String text;
private String flag;
private String filePath;
private String id;
private String dbType;
private String schmeid;
private String dataSystemId;
public ComboboxVO() {
}
public String getFlag() {
return this.flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getTid() {
return this.id;
}
public void setTid(String id) {
this.id = id;
}
public ComboboxVO(String valueandtext) {
this.value = valueandtext;
this.text = valueandtext;
}
public ComboboxVO(String value, String text) {
this.value = value;
this.text = text;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getText() {
return this.text;
}
public void setText(String text) {
this.text = text;
}
public String getFilePath() {
return this.filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getId() {
return this.id;
}
public String getDbType() {
return this.dbType;
}
public String getSchmeid() {
return this.schmeid;
}
public String getDataSystemId() {
return this.dataSystemId;
}
public void setId(final String id) {
this.id = id;
}
public void setDbType(final String dbType) {
this.dbType = dbType;
}
public void setSchmeid(final String schmeid) {
this.schmeid = schmeid;
}
public void setDataSystemId(final String dataSystemId) {
this.dataSystemId = dataSystemId;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ComboboxVO)) {
return false;
} else {
ComboboxVO other = (ComboboxVO)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$value = this.getValue();
Object other$value = other.getValue();
if (this$value == null) {
if (other$value != null) {
return false;
}
} else if (!this$value.equals(other$value)) {
return false;
}
Object this$text = this.getText();
Object other$text = other.getText();
if (this$text == null) {
if (other$text != null) {
return false;
}
} else if (!this$text.equals(other$text)) {
return false;
}
Object this$flag = this.getFlag();
Object other$flag = other.getFlag();
if (this$flag == null) {
if (other$flag != null) {
return false;
}
} else if (!this$flag.equals(other$flag)) {
return false;
}
Object this$filePath = this.getFilePath();
Object other$filePath = other.getFilePath();
if (this$filePath == null) {
if (other$filePath != null) {
return false;
}
} else if (!this$filePath.equals(other$filePath)) {
return false;
}
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$dbType = this.getDbType();
Object other$dbType = other.getDbType();
if (this$dbType == null) {
if (other$dbType != null) {
return false;
}
} else if (!this$dbType.equals(other$dbType)) {
return false;
}
Object this$schmeid = this.getSchmeid();
Object other$schmeid = other.getSchmeid();
if (this$schmeid == null) {
if (other$schmeid != null) {
return false;
}
} else if (!this$schmeid.equals(other$schmeid)) {
return false;
}
Object this$dataSystemId = this.getDataSystemId();
Object other$dataSystemId = other.getDataSystemId();
if (this$dataSystemId == null) {
if (other$dataSystemId != null) {
return false;
}
} else if (!this$dataSystemId.equals(other$dataSystemId)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ComboboxVO;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $value = this.getValue();
result = result * 59 + ($value == null ? 43 : $value.hashCode());
Object $text = this.getText();
result = result * 59 + ($text == null ? 43 : $text.hashCode());
Object $flag = this.getFlag();
result = result * 59 + ($flag == null ? 43 : $flag.hashCode());
Object $filePath = this.getFilePath();
result = result * 59 + ($filePath == null ? 43 : $filePath.hashCode());
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $dbType = this.getDbType();
result = result * 59 + ($dbType == null ? 43 : $dbType.hashCode());
Object $schmeid = this.getSchmeid();
result = result * 59 + ($schmeid == null ? 43 : $schmeid.hashCode());
Object $dataSystemId = this.getDataSystemId();
result = result * 59 + ($dataSystemId == null ? 43 : $dataSystemId.hashCode());
return result;
}
public String toString() {
return "ComboboxVO(value=" + this.getValue() + ", text=" + this.getText() + ", flag=" + this.getFlag() + ", filePath=" + this.getFilePath() + ", id=" + this.getId() + ", dbType=" + this.getDbType() + ", schmeid=" + this.getSchmeid() + ", dataSystemId=" + this.getDataSystemId() + ")";
}
}
package com.chenyang.nse.bussiness.entity.vo.maskingtask;
import com.chenyang.nse.bussiness.entity.db.ColumnInfo;
public class ColumnInfoVO extends ColumnInfo {
private String maskingruleid;
private String maskingrulename;
private String regextype;
private String targettypename;
private String dateTimeFormat;
private String secretkeyId;
private String secretkeyName;
private String datadomainId;
private String datadomainName;
private String isManual;
private String ischeckbox;
private String isDigest;
public String getIsDigest() {
return this.isDigest;
}
public void setIsDigest(String isDigest) {
this.isDigest = isDigest;
}
public String getMaskingruleid() {
return this.maskingruleid;
}
public void setMaskingruleid(String maskingruleid) {
this.maskingruleid = maskingruleid;
}
public String getMaskingrulename() {
return this.maskingrulename;
}
public void setMaskingrulename(String maskingrulename) {
this.maskingrulename = maskingrulename;
}
public String getRegextype() {
return this.regextype;
}
public void setRegextype(String regextype) {
this.regextype = regextype;
}
public String getTargettypename() {
return this.targettypename;
}
public void setTargettypename(String targettypename) {
this.targettypename = targettypename;
}
public String getDateTimeFormat() {
return this.dateTimeFormat;
}
public void setDateTimeFormat(String dateTimeFormat) {
this.dateTimeFormat = dateTimeFormat;
}
public String getSecretkeyId() {
return this.secretkeyId;
}
public void setSecretkeyId(String secretkeyId) {
this.secretkeyId = secretkeyId;
}
public String getSecretkeyName() {
return this.secretkeyName;
}
public void setSecretkeyName(String secretkeyName) {
this.secretkeyName = secretkeyName;
}
public String getDatadomainId() {
return this.datadomainId;
}
public void setDatadomainId(String datadomainId) {
this.datadomainId = datadomainId;
}
public String getDatadomainName() {
return this.datadomainName;
}
public void setDatadomainName(String datadomainName) {
this.datadomainName = datadomainName;
}
public String getIsManual() {
return this.isManual;
}
public void setIsManual(String isManual) {
this.isManual = isManual;
}
public String getIscheckbox() {
return this.ischeckbox;
}
public void setIscheckbox(String ischeckbox) {
this.ischeckbox = ischeckbox;
}
}
package com.chenyang.nse.bussiness.entity.vo.strategy;
public class ColumnInfoVO {
private String dataSystemId;
private String schema;
private String columnName;
private String columnType;
private String columnSize;
private String secretKeyId;
private String encryptionType;
private String secretKey;
private String tcoreencryptionfieldId;
private String isLike;
private String keepfirst;
private String realitycolumnsize;
private String encdigit;
private String twoindex;
private String[] isPrimaryKeys;
public String getKeepfirst() {
return this.keepfirst;
}
public void setKeepfirst(String keepfirst) {
this.keepfirst = keepfirst;
}
public String getEncdigit() {
return this.encdigit;
}
public void setEncdigit(String encdigit) {
this.encdigit = encdigit;
}
public String getDataSystemId() {
return this.dataSystemId;
}
public void setDataSystemId(String dataSystemId) {
this.dataSystemId = dataSystemId;
}
public String getSchema() {
return this.schema;
}
public void setSchema(String schema) {
this.schema = schema;
}
public String getEncryptionType() {
return this.encryptionType;
}
public void setEncryptionType(String encryptionType) {
this.encryptionType = encryptionType;
}
public String getSecretKey() {
return this.secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
public String getColumnName() {
return this.columnName;
}
public void setColumnName(String columnName) {
this.columnName = columnName;
}
public String getSecretKeyId() {
return this.secretKeyId;
}
public void setSecretKeyId(String secretKeyId) {
this.secretKeyId = secretKeyId;
}
public String[] getIsPrimaryKeys() {
return this.isPrimaryKeys;
}
public void setIsPrimaryKeys(String[] isPrimaryKeys) {
this.isPrimaryKeys = isPrimaryKeys;
}
public String getColumnType() {
return this.columnType;
}
public void setColumnType(String columnType) {
this.columnType = columnType;
}
public String getColumnSize() {
return this.columnSize;
}
public void setColumnSize(String columnSize) {
this.columnSize = columnSize;
}
public String getTcoreencryptionfieldId() {
return this.tcoreencryptionfieldId;
}
public void setTcoreencryptionfieldId(String tcoreencryptionfieldId) {
this.tcoreencryptionfieldId = tcoreencryptionfieldId;
}
public String getTwoindex() {
return this.twoindex;
}
public void setTwoindex(String twoindex) {
this.twoindex = twoindex;
}
public String getIsLike() {
return this.isLike;
}
public void setIsLike(String isLike) {
this.isLike = isLike;
}
public String getRealitycolumnsize() {
return this.realitycolumnsize;
}
public void setRealitycolumnsize(String realitycolumnsize) {
this.realitycolumnsize = realitycolumnsize;
}
}
package com.chenyang.nse.bussiness.enumeration.file;
public enum CodePage {
UTF8("0", "UTF-8"),
GBK("1", "GBK");
private String flag;
private String name;
private CodePage(String flag, String name) {
this.flag = flag;
this.name = name;
}
public String getFlag() {
return this.flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public static String getFlag(String name) {
for(CodePage f : values()) {
if (f.getName().equals(name)) {
return f.getFlag();
}
}
return null;
}
public static String getName(String flag) {
for(CodePage f : values()) {
if (f.getFlag().equals(flag)) {
return f.getName();
}
}
return null;
}
}
package com.chenyang.nse.bussiness.enumeration.file;
public enum ColumnType {
STRING("string"),
NUMBER("number"),
DATETIME("datetime"),
DOUBLE("double"),
BIGINT("bigint"),
INT("int"),
NSTRING("nstring");
private String name;
private ColumnType(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
}
package com.chenyang.nse.bussiness.exception;
public class ClientOutOfWhiteListException extends Exception {
public ClientOutOfWhiteListException() {
}
public ClientOutOfWhiteListException(String message) {
super(message);
}
public ClientOutOfWhiteListException(String message, Throwable cause) {
super(message, cause);
}
public ClientOutOfWhiteListException(Throwable cause) {
super(cause);
}
protected ClientOutOfWhiteListException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
package com.chenyang.nse.bussiness.interfaces;
import java.io.IOException;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.HashMap;
public class Click {
public static void main(String[] args) {
try {
IHiveRMI iRmi = (IHiveRMI)Naming.lookup("rmi://192.168.2.111:6666/My_RMI");
new ArrayList();
for(HashMap<String, String> hashMap : iRmi.getHdfsList("/data/transwarp4.8/", "hive", "hdfs://nameservice1/")) {
if (!"".equals(hashMap.get("path"))) {
System.out.println((String)hashMap.get("path"));
}
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (NotBoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
package com.chenyang.nse.bussiness.jar.db;
import com.chenyang.nse.bussiness.entity.vo.encyption.TCoreClientIpControlledVo;
import java.util.List;
public class ClientIpControlledReq {
List<TCoreClientIpControlledVo> ips;
String projectId;
public List<TCoreClientIpControlledVo> getIps() {
return this.ips;
}
public String getProjectId() {
return this.projectId;
}
public void setIps(final List<TCoreClientIpControlledVo> ips) {
this.ips = ips;
}
public void setProjectId(final String projectId) {
this.projectId = projectId;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ClientIpControlledReq)) {
return false;
} else {
ClientIpControlledReq other = (ClientIpControlledReq)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$ips = this.getIps();
Object other$ips = other.getIps();
if (this$ips == null) {
if (other$ips != null) {
return false;
}
} else if (!this$ips.equals(other$ips)) {
return false;
}
Object this$projectId = this.getProjectId();
Object other$projectId = other.getProjectId();
if (this$projectId == null) {
if (other$projectId != null) {
return false;
}
} else if (!this$projectId.equals(other$projectId)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ClientIpControlledReq;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $ips = this.getIps();
result = result * 59 + ($ips == null ? 43 : $ips.hashCode());
Object $projectId = this.getProjectId();
result = result * 59 + ($projectId == null ? 43 : $projectId.hashCode());
return result;
}
public String toString() {
return "ClientIpControlledReq(ips=" + this.getIps() + ", projectId=" + this.getProjectId() + ")";
}
}
package com.chenyang.nse.bussiness.rulesupply.controller;
public class Columninfo {
private String id;
private String columnname;
private String encryptiontype;
private String secretkey;
private String isLike;
private String keepfirst;
private String encdigit;
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public void setColumnname(String columnname) {
this.columnname = columnname;
}
public String getColumnname() {
return this.columnname;
}
public void setEncryptiontype(String encryptiontype) {
this.encryptiontype = encryptiontype;
}
public String getEncryptiontype() {
return this.encryptiontype;
}
public void setSecretkey(String secretkey) {
this.secretkey = secretkey;
}
public String getSecretkey() {
return this.secretkey;
}
public String getIsLike() {
return this.isLike;
}
public void setIsLike(String isLike) {
this.isLike = isLike;
}
public String getKeepfirst() {
return this.keepfirst;
}
public void setKeepfirst(String keepfirst) {
this.keepfirst = keepfirst;
}
public String getEncdigit() {
return this.encdigit;
}
public void setEncdigit(String encdigit) {
this.encdigit = encdigit;
}
}
package com.chenyang.nse.bussiness.tools.dataprocess;
public class ColumnEncryption {
public String columnName;
public String secretkeyId;
public String dataSystemId;
public boolean isPrimaryKey;
public void setColumnName(String columnNameTemp) {
this.columnName = columnNameTemp;
}
public String getColumnName() {
return this.columnName;
}
public void setSecretkeyId(String keyId) {
this.secretkeyId = keyId;
}
public String getSecretkeyId() {
return this.secretkeyId;
}
public void setDataSystemId(String dataSystemIdTemp) {
this.dataSystemId = dataSystemIdTemp;
}
public String getDataSystemId() {
return this.dataSystemId;
}
public void setPrimaryKey(boolean isPrimary) {
this.isPrimaryKey = isPrimary;
}
public boolean isPrimaryKey() {
return this.isPrimaryKey;
}
}
package com.chenyang.nse.bussiness.tools.dataprocess.common;
import java.sql.Blob;
public class ColumnBatchInfo {
private String secretKey;
private String encryptionType;
private String value;
private Blob blob;
private String isLike;
private String keepFirst;
private String encDigit;
private String twoIndex;
private Boolean isBlob;
public String getSecretKey() {
return this.secretKey;
}
public String getEncryptionType() {
return this.encryptionType;
}
public String getValue() {
return this.value;
}
public Blob getBlob() {
return this.blob;
}
public String getIsLike() {
return this.isLike;
}
public String getKeepFirst() {
return this.keepFirst;
}
public String getEncDigit() {
return this.encDigit;
}
public String getTwoIndex() {
return this.twoIndex;
}
public Boolean getIsBlob() {
return this.isBlob;
}
public void setSecretKey(final String secretKey) {
this.secretKey = secretKey;
}
public void setEncryptionType(final String encryptionType) {
this.encryptionType = encryptionType;
}
public void setValue(final String value) {
this.value = value;
}
public void setBlob(final Blob blob) {
this.blob = blob;
}
public void setIsLike(final String isLike) {
this.isLike = isLike;
}
public void setKeepFirst(final String keepFirst) {
this.keepFirst = keepFirst;
}
public void setEncDigit(final String encDigit) {
this.encDigit = encDigit;
}
public void setTwoIndex(final String twoIndex) {
this.twoIndex = twoIndex;
}
public void setIsBlob(final Boolean isBlob) {
this.isBlob = isBlob;
}
}
package com.chenyang.nse.bussiness.tools.http;
import com.chenyang.nse.bussiness.jar.util.JarSocketCallback;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
public class ClientUtil {
public static ExecutorService executorService = Executors.newFixedThreadPool(10);
public static String doClient(String url, String json) {
String result = "调用" + url + "接口结束!";
(new Thread(() -> {
System.out.println("doclienturl:" + url);
doPost(url, json);
})).start();
return result;
}
public static CloseableHttpClient buildHttpClient() {
CloseableHttpClient client = null;
HttpClientBuilder build = HttpClientBuilder.create();
client = build.build();
return SkipHttpsUtil.wrapClient();
}
public static String doPost(String url, String json) {
CloseableHttpClient httpClient = buildHttpClient();
HttpPost httpPost = new HttpPost(url);
String result = null;
try {
httpPost.setHeader("content-type", "application/json;charset=UTF-8");
StringEntity se = new StringEntity(json, "utf-8");
httpPost.setEntity(se);
HttpResponse response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
if (entity != null) {
result = EntityUtils.toString(entity, "UTF-8");
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return result;
}
public static String doPost(String url, String json, JarSocketCallback callback) {
CloseableHttpClient httpClient = buildHttpClient();
HttpPost httpPost = new HttpPost(url);
String result = null;
try {
httpPost.setHeader("content-type", "application/json;charset=UTF-8");
StringEntity se = new StringEntity(json, "utf-8");
httpPost.setEntity(se);
HttpResponse response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
if (entity != null) {
result = EntityUtils.toString(entity, "UTF-8");
}
callback.isSucc();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
callback.isFail();
} finally {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return result;
}
public static void main(String[] args) {
String url = "http://192.168.2.88:8182/initconfigfile/loadconfig";
}
}
package com.chenyang.nse.bussiness.tools.other;
import java.util.Random;
public class ColorTool {
public static String randomColor() {
Random random = new Random();
String red = Integer.toHexString(random.nextInt(256)).toUpperCase();
String green = Integer.toHexString(random.nextInt(256)).toUpperCase();
String blue = Integer.toHexString(random.nextInt(256)).toUpperCase();
red = red.length() == 1 ? "0" + red : red;
green = green.length() == 1 ? "0" + green : green;
blue = blue.length() == 1 ? "0" + blue : blue;
String color = "#" + red + green + blue;
return color;
}
}
package com.chenyang.nse.bussiness.tools.strategy;
import java.util.List;
public class ColumnInDesensitizationVo {
private String columnname;
private String dataareaid;
private String ruleid;
private String expression;
private List<String> userIdList;
public String getColumnname() {
return this.columnname;
}
public void setColumnname(String columnname) {
this.columnname = columnname;
}
public String getDataareaid() {
return this.dataareaid;
}
public void setDataareaid(String dataareaid) {
this.dataareaid = dataareaid;
}
public String getRuleid() {
return this.ruleid;
}
public void setRuleid(String ruleid) {
this.ruleid = ruleid;
}
public String getExpression() {
return this.expression;
}
public void setExpression(String expression) {
this.expression = expression;
}
public List<String> getUserIdList() {
return this.userIdList;
}
public void setUserIdList(List<String> userIdList) {
this.userIdList = userIdList;
}
}
package com.chenyang.nse.bussiness.tools.strategy;
public class ColumnInfoVo {
private String id;
private String columnname;
private String columnType;
private String encryptiontype;
private String secretkey;
private String isLike;
private String keepfirst;
private String encdigit;
private String twoindex;
public String getId() {
return this.id;
}
public String getColumnname() {
return this.columnname;
}
public String getColumnType() {
return this.columnType;
}
public String getEncryptiontype() {
return this.encryptiontype;
}
public String getSecretkey() {
return this.secretkey;
}
public String getIsLike() {
return this.isLike;
}
public String getKeepfirst() {
return this.keepfirst;
}
public String getEncdigit() {
return this.encdigit;
}
public String getTwoindex() {
return this.twoindex;
}
public void setId(final String id) {
this.id = id;
}
public void setColumnname(final String columnname) {
this.columnname = columnname;
}
public void setColumnType(final String columnType) {
this.columnType = columnType;
}
public void setEncryptiontype(final String encryptiontype) {
this.encryptiontype = encryptiontype;
}
public void setSecretkey(final String secretkey) {
this.secretkey = secretkey;
}
public void setIsLike(final String isLike) {
this.isLike = isLike;
}
public void setKeepfirst(final String keepfirst) {
this.keepfirst = keepfirst;
}
public void setEncdigit(final String encdigit) {
this.encdigit = encdigit;
}
public void setTwoindex(final String twoindex) {
this.twoindex = twoindex;
}
}
package com.chenyang.nse.bussiness.webtools.entity.vo;
public class ComboboxVO {
private String value;
private String text;
private String flag;
private String id;
private String dbType;
private String dataSystemId;
public ComboboxVO() {
}
public String getFlag() {
return this.flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getTid() {
return this.id;
}
public void setTid(String id) {
this.id = id;
}
public ComboboxVO(String valueandtext) {
this.value = valueandtext;
this.text = valueandtext;
}
public ComboboxVO(String value, String text) {
this.value = value;
this.text = text;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getText() {
return this.text;
}
public void setText(String text) {
this.text = text;
}
public String getId() {
return this.id;
}
public String getDbType() {
return this.dbType;
}
public String getDataSystemId() {
return this.dataSystemId;
}
public void setId(final String id) {
this.id = id;
}
public void setDbType(final String dbType) {
this.dbType = dbType;
}
public void setDataSystemId(final String dataSystemId) {
this.dataSystemId = dataSystemId;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ComboboxVO)) {
return false;
} else {
ComboboxVO other = (ComboboxVO)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$value = this.getValue();
Object other$value = other.getValue();
if (this$value == null) {
if (other$value != null) {
return false;
}
} else if (!this$value.equals(other$value)) {
return false;
}
Object this$text = this.getText();
Object other$text = other.getText();
if (this$text == null) {
if (other$text != null) {
return false;
}
} else if (!this$text.equals(other$text)) {
return false;
}
Object this$flag = this.getFlag();
Object other$flag = other.getFlag();
if (this$flag == null) {
if (other$flag != null) {
return false;
}
} else if (!this$flag.equals(other$flag)) {
return false;
}
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$dbType = this.getDbType();
Object other$dbType = other.getDbType();
if (this$dbType == null) {
if (other$dbType != null) {
return false;
}
} else if (!this$dbType.equals(other$dbType)) {
return false;
}
Object this$dataSystemId = this.getDataSystemId();
Object other$dataSystemId = other.getDataSystemId();
if (this$dataSystemId == null) {
if (other$dataSystemId != null) {
return false;
}
} else if (!this$dataSystemId.equals(other$dataSystemId)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ComboboxVO;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $value = this.getValue();
result = result * 59 + ($value == null ? 43 : $value.hashCode());
Object $text = this.getText();
result = result * 59 + ($text == null ? 43 : $text.hashCode());
Object $flag = this.getFlag();
result = result * 59 + ($flag == null ? 43 : $flag.hashCode());
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $dbType = this.getDbType();
result = result * 59 + ($dbType == null ? 43 : $dbType.hashCode());
Object $dataSystemId = this.getDataSystemId();
result = result * 59 + ($dataSystemId == null ? 43 : $dataSystemId.hashCode());
return result;
}
public String toString() {
return "ComboboxVO(value=" + this.getValue() + ", text=" + this.getText() + ", flag=" + this.getFlag() + ", id=" + this.getId() + ", dbType=" + this.getDbType() + ", dataSystemId=" + this.getDataSystemId() + ")";
}
}
package com.chenyang.nse.bussiness.webtools.entity.vo.maskingtask;
import com.chenyang.nse.bussiness.entity.db.ColumnInfo;
public class ColumnInfoVO extends ColumnInfo {
private String maskingruleid;
private String maskingrulename;
private String regextype;
private String targettypename;
private String dateTimeFormat;
private String secretkeyId;
private String secretkeyName;
private String datadomainId;
private String datadomainName;
public String getMaskingruleid() {
return this.maskingruleid;
}
public void setMaskingruleid(String maskingruleid) {
this.maskingruleid = maskingruleid;
}
public String getMaskingrulename() {
return this.maskingrulename;
}
public void setMaskingrulename(String maskingrulename) {
this.maskingrulename = maskingrulename;
}
public String getRegextype() {
return this.regextype;
}
public void setRegextype(String regextype) {
this.regextype = regextype;
}
public String getTargettypename() {
return this.targettypename;
}
public void setTargettypename(String targettypename) {
this.targettypename = targettypename;
}
public String getDateTimeFormat() {
return this.dateTimeFormat;
}
public void setDateTimeFormat(String dateTimeFormat) {
this.dateTimeFormat = dateTimeFormat;
}
public String getSecretkeyId() {
return this.secretkeyId;
}
public void setSecretkeyId(String secretkeyId) {
this.secretkeyId = secretkeyId;
}
public String getSecretkeyName() {
return this.secretkeyName;
}
public void setSecretkeyName(String secretkeyName) {
this.secretkeyName = secretkeyName;
}
public String getDatadomainId() {
return this.datadomainId;
}
public void setDatadomainId(String datadomainId) {
this.datadomainId = datadomainId;
}
public String getDatadomainName() {
return this.datadomainName;
}
public void setDatadomainName(String datadomainName) {
this.datadomainName = datadomainName;
}
}
package com.chenyang.nse.bussiness.webtools.tools.jdbc;
import java.io.IOException;
import java.io.Reader;
import java.sql.Clob;
import java.sql.SQLException;
public class ClobUtil {
public static String getBase64FromClob(Object objDate) throws IOException {
StringBuilder builder = new StringBuilder();
Clob clob = (Clob)objDate;
try {
if (null != clob) {
Reader rd = clob.getCharacterStream();
char[] str = new char[12];
while(rd.read(str) != -1) {
builder.append(new String(str));
}
}
} catch (SQLException e) {
e.printStackTrace();
}
return builder.toString();
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论