package cn.ksource.beans;
|
|
import java.sql.ResultSet;
|
import java.sql.SQLException;
|
import java.util.HashMap;
|
import java.util.Iterator;
|
import java.util.List;
|
import java.util.Map;
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import cn.ksource.core.dao.BaseBean;
|
import cn.ksource.core.util.ConvertUtil;
|
import cn.ksource.core.util.StringUtil;
|
|
/**
|
* 配置表
|
*/
|
public class CMDB_CI_BASE extends BaseBean{
|
|
public final static Map<String, String> KEYS = new HashMap<String, String>();
|
private Map BEAN_VALUES = null;
|
|
static {
|
KEYS.put("id", "String");
|
KEYS.put("cus_id", "String");
|
KEYS.put("cus_name", "String");
|
KEYS.put("sub_cus_id", "String");
|
KEYS.put("sub_cus_name", "String");
|
KEYS.put("bus_id", "String");
|
KEYS.put("ciname", "String");
|
KEYS.put("searchcode", "String");
|
KEYS.put("code", "String");
|
KEYS.put("sn_no", "String");
|
KEYS.put("zr_name", "String");
|
KEYS.put("zr_dept", "String");
|
KEYS.put("lv1_id", "String");
|
KEYS.put("lv1_name", "String");
|
KEYS.put("lv2_id", "String");
|
KEYS.put("lv2_name", "String");
|
KEYS.put("lv3_id", "String");
|
KEYS.put("lv3_name", "String");
|
KEYS.put("mft_id", "String");
|
KEYS.put("mft_name", "String");
|
KEYS.put("igt_id", "String");
|
KEYS.put("igt_name", "String");
|
KEYS.put("create_id", "String");
|
KEYS.put("create_name", "String");
|
KEYS.put("create_time", "Long");
|
KEYS.put("admin_id", "String");
|
KEYS.put("position", "String");
|
KEYS.put("last_up_time", "Long");
|
KEYS.put("note", "String");
|
KEYS.put("buy_time", "Long");
|
KEYS.put("gb_time", "Long");
|
KEYS.put("xb_time", "Long");
|
KEYS.put("xbgb_time", "Long");
|
KEYS.put("state", "Integer");
|
}
|
public Map getColumnMap(){
|
return KEYS;
|
}
|
|
private String id;
|
private Boolean isSetted_id = false;;
|
|
private String cus_id;
|
private Boolean isSetted_cus_id = false;
|
private String cus_name;
|
private Boolean isSetted_cus_name = false;
|
private String sub_cus_id;
|
private Boolean isSetted_sub_cus_id = false;
|
private String sub_cus_name;
|
private Boolean isSetted_sub_cus_name = false;
|
private String bus_id;
|
private Boolean isSetted_bus_id = false;
|
private String ciname;
|
private Boolean isSetted_ciname = false;
|
private String searchcode;
|
private Boolean isSetted_searchcode = false;
|
private String code;
|
private Boolean isSetted_code = false;
|
private String sn_no;
|
private Boolean isSetted_sn_no = false;
|
private String zr_name;
|
private Boolean isSetted_zr_name = false;
|
private String zr_dept;
|
private Boolean isSetted_zr_dept = false;
|
private String lv1_id;
|
private Boolean isSetted_lv1_id = false;
|
private String lv1_name;
|
private Boolean isSetted_lv1_name = false;
|
private String lv2_id;
|
private Boolean isSetted_lv2_id = false;
|
private String lv2_name;
|
private Boolean isSetted_lv2_name = false;
|
private String lv3_id;
|
private Boolean isSetted_lv3_id = false;
|
private String lv3_name;
|
private Boolean isSetted_lv3_name = false;
|
private String mft_id;
|
private Boolean isSetted_mft_id = false;
|
private String mft_name;
|
private Boolean isSetted_mft_name = false;
|
private String igt_id;
|
private Boolean isSetted_igt_id = false;
|
private String igt_name;
|
private Boolean isSetted_igt_name = false;
|
private String create_id;
|
private Boolean isSetted_create_id = false;
|
private String create_name;
|
private Boolean isSetted_create_name = false;
|
private Long create_time;
|
private Boolean isSetted_create_time = false;
|
private String admin_id;
|
private Boolean isSetted_admin_id = false;
|
private String position;
|
private Boolean isSetted_position = false;
|
private Long last_up_time;
|
private Boolean isSetted_last_up_time = false;
|
private String note;
|
private Boolean isSetted_note = false;
|
private Long buy_time;
|
private Boolean isSetted_buy_time = false;
|
private Long gb_time;
|
private Boolean isSetted_gb_time = false;
|
private Long xb_time;
|
private Boolean isSetted_xb_time = false;
|
private Long xbgb_time;
|
private Boolean isSetted_xbgb_time = false;
|
private Integer state;
|
private Boolean isSetted_state = false;
|
|
private void initBeanValues(){
|
BEAN_VALUES = new HashMap<String, Object>();
|
BEAN_VALUES.put("id",id);
|
BEAN_VALUES.put("cus_id", null);
|
BEAN_VALUES.put("cus_name", null);
|
BEAN_VALUES.put("sub_cus_id", null);
|
BEAN_VALUES.put("sub_cus_name", null);
|
BEAN_VALUES.put("bus_id", null);
|
BEAN_VALUES.put("ciname", null);
|
BEAN_VALUES.put("searchcode", null);
|
BEAN_VALUES.put("code", null);
|
BEAN_VALUES.put("sn_no", null);
|
BEAN_VALUES.put("zr_name", null);
|
BEAN_VALUES.put("zr_dept", null);
|
BEAN_VALUES.put("lv1_id", null);
|
BEAN_VALUES.put("lv1_name", null);
|
BEAN_VALUES.put("lv2_id", null);
|
BEAN_VALUES.put("lv2_name", null);
|
BEAN_VALUES.put("lv3_id", null);
|
BEAN_VALUES.put("lv3_name", null);
|
BEAN_VALUES.put("mft_id", null);
|
BEAN_VALUES.put("mft_name", null);
|
BEAN_VALUES.put("igt_id", null);
|
BEAN_VALUES.put("igt_name", null);
|
BEAN_VALUES.put("create_id", null);
|
BEAN_VALUES.put("create_name", null);
|
BEAN_VALUES.put("create_time", null);
|
BEAN_VALUES.put("admin_id", null);
|
BEAN_VALUES.put("position", null);
|
BEAN_VALUES.put("last_up_time", null);
|
BEAN_VALUES.put("note", null);
|
BEAN_VALUES.put("buy_time", null);
|
BEAN_VALUES.put("gb_time", null);
|
BEAN_VALUES.put("xb_time", null);
|
BEAN_VALUES.put("xbgb_time", null);
|
BEAN_VALUES.put("state", null);
|
}
|
|
public CMDB_CI_BASE() {
|
initBeanValues();
|
}
|
|
public CMDB_CI_BASE(String id) {
|
super();
|
this.id = id;
|
initBeanValues();
|
BEAN_VALUES.put("id",id);
|
}
|
|
/**
|
* 获取ID
|
*/
|
public String getId() {
|
return this.id;
|
}
|
/**
|
* 设置ID
|
*/
|
public CMDB_CI_BASE setId(String id) {
|
this.id = id;
|
this.isSetted_id = true;
|
BEAN_VALUES.put("id",id);
|
return this;
|
}
|
|
@Override
|
public String getUpdateSql() {
|
StringBuffer sBuffer = new StringBuffer("update CMDB_CI_BASE set ");
|
if (isSetted_cus_id) {
|
sBuffer.append("cus_id=:cus_id,");
|
}
|
if (isSetted_cus_name) {
|
sBuffer.append("cus_name=:cus_name,");
|
}
|
if (isSetted_sub_cus_id) {
|
sBuffer.append("sub_cus_id=:sub_cus_id,");
|
}
|
if (isSetted_sub_cus_name) {
|
sBuffer.append("sub_cus_name=:sub_cus_name,");
|
}
|
if (isSetted_bus_id) {
|
sBuffer.append("bus_id=:bus_id,");
|
}
|
if (isSetted_ciname) {
|
sBuffer.append("ciname=:ciname,");
|
}
|
if (isSetted_searchcode) {
|
sBuffer.append("searchcode=:searchcode,");
|
}
|
if (isSetted_code) {
|
sBuffer.append("code=:code,");
|
}
|
if (isSetted_sn_no) {
|
sBuffer.append("sn_no=:sn_no,");
|
}
|
if (isSetted_zr_name) {
|
sBuffer.append("zr_name=:zr_name,");
|
}
|
if (isSetted_zr_dept) {
|
sBuffer.append("zr_dept=:zr_dept,");
|
}
|
if (isSetted_lv1_id) {
|
sBuffer.append("lv1_id=:lv1_id,");
|
}
|
if (isSetted_lv1_name) {
|
sBuffer.append("lv1_name=:lv1_name,");
|
}
|
if (isSetted_lv2_id) {
|
sBuffer.append("lv2_id=:lv2_id,");
|
}
|
if (isSetted_lv2_name) {
|
sBuffer.append("lv2_name=:lv2_name,");
|
}
|
if (isSetted_lv3_id) {
|
sBuffer.append("lv3_id=:lv3_id,");
|
}
|
if (isSetted_lv3_name) {
|
sBuffer.append("lv3_name=:lv3_name,");
|
}
|
if (isSetted_mft_id) {
|
sBuffer.append("mft_id=:mft_id,");
|
}
|
if (isSetted_mft_name) {
|
sBuffer.append("mft_name=:mft_name,");
|
}
|
if (isSetted_igt_id) {
|
sBuffer.append("igt_id=:igt_id,");
|
}
|
if (isSetted_igt_name) {
|
sBuffer.append("igt_name=:igt_name,");
|
}
|
if (isSetted_create_id) {
|
sBuffer.append("create_id=:create_id,");
|
}
|
if (isSetted_create_name) {
|
sBuffer.append("create_name=:create_name,");
|
}
|
if (isSetted_create_time) {
|
sBuffer.append("create_time=:create_time,");
|
}
|
if (isSetted_admin_id) {
|
sBuffer.append("admin_id=:admin_id,");
|
}
|
if (isSetted_position) {
|
sBuffer.append("position=:position,");
|
}
|
if (isSetted_last_up_time) {
|
sBuffer.append("last_up_time=:last_up_time,");
|
}
|
if (isSetted_note) {
|
sBuffer.append("note=:note,");
|
}
|
if (isSetted_buy_time) {
|
sBuffer.append("buy_time=:buy_time,");
|
}
|
if (isSetted_gb_time) {
|
sBuffer.append("gb_time=:gb_time,");
|
}
|
if (isSetted_xb_time) {
|
sBuffer.append("xb_time=:xb_time,");
|
}
|
if (isSetted_xbgb_time) {
|
sBuffer.append("xbgb_time=:xbgb_time,");
|
}
|
if (isSetted_state) {
|
sBuffer.append("state=:state,");
|
}
|
String sql = sBuffer.toString();
|
return StringUtils.removeEnd(sql, ",") + " where id=:id";
|
}
|
|
|
@Override
|
public String getInsertSql() {
|
StringBuffer sBuffer = new StringBuffer("insert into CMDB_CI_BASE(");
|
StringBuffer fileds = new StringBuffer("id,");
|
StringBuffer values = new StringBuffer(":id,");
|
fileds.append("cus_id,");
|
values.append(":cus_id,");
|
fileds.append("cus_name,");
|
values.append(":cus_name,");
|
fileds.append("sub_cus_id,");
|
values.append(":sub_cus_id,");
|
fileds.append("sub_cus_name,");
|
values.append(":sub_cus_name,");
|
fileds.append("bus_id,");
|
values.append(":bus_id,");
|
fileds.append("ciname,");
|
values.append(":ciname,");
|
fileds.append("searchcode,");
|
values.append(":searchcode,");
|
fileds.append("code,");
|
values.append(":code,");
|
fileds.append("sn_no,");
|
values.append(":sn_no,");
|
fileds.append("zr_name,");
|
values.append(":zr_name,");
|
fileds.append("zr_dept,");
|
values.append(":zr_dept,");
|
fileds.append("lv1_id,");
|
values.append(":lv1_id,");
|
fileds.append("lv1_name,");
|
values.append(":lv1_name,");
|
fileds.append("lv2_id,");
|
values.append(":lv2_id,");
|
fileds.append("lv2_name,");
|
values.append(":lv2_name,");
|
fileds.append("lv3_id,");
|
values.append(":lv3_id,");
|
fileds.append("lv3_name,");
|
values.append(":lv3_name,");
|
fileds.append("mft_id,");
|
values.append(":mft_id,");
|
fileds.append("mft_name,");
|
values.append(":mft_name,");
|
fileds.append("igt_id,");
|
values.append(":igt_id,");
|
fileds.append("igt_name,");
|
values.append(":igt_name,");
|
fileds.append("create_id,");
|
values.append(":create_id,");
|
fileds.append("create_name,");
|
values.append(":create_name,");
|
fileds.append("create_time,");
|
values.append(":create_time,");
|
fileds.append("admin_id,");
|
values.append(":admin_id,");
|
fileds.append("position,");
|
values.append(":position,");
|
fileds.append("last_up_time,");
|
values.append(":last_up_time,");
|
fileds.append("note,");
|
values.append(":note,");
|
fileds.append("buy_time,");
|
values.append(":buy_time,");
|
fileds.append("gb_time,");
|
values.append(":gb_time,");
|
fileds.append("xb_time,");
|
values.append(":xb_time,");
|
fileds.append("xbgb_time,");
|
values.append(":xbgb_time,");
|
fileds.append("state,");
|
values.append(":state,");
|
sBuffer.append(StringUtils.removeEnd(fileds.toString(), ",") + ") values("+StringUtils.removeEnd(values.toString(), ",")+")");
|
return sBuffer.toString();
|
}
|
|
|
/**
|
* 获取<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getCus_id() {
|
return cus_id;
|
}
|
/**
|
* 设置<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setCus_id(String cus_id) {
|
this.cus_id = cus_id;
|
this.isSetted_cus_id = true;
|
BEAN_VALUES.put("cus_id",cus_id);
|
return this;
|
}
|
/**
|
* 获取<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getCus_name() {
|
return cus_name;
|
}
|
/**
|
* 设置<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setCus_name(String cus_name) {
|
this.cus_name = cus_name;
|
this.isSetted_cus_name = true;
|
BEAN_VALUES.put("cus_name",cus_name);
|
return this;
|
}
|
/**
|
* 获取<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getSub_cus_id() {
|
return sub_cus_id;
|
}
|
/**
|
* 设置<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setSub_cus_id(String sub_cus_id) {
|
this.sub_cus_id = sub_cus_id;
|
this.isSetted_sub_cus_id = true;
|
BEAN_VALUES.put("sub_cus_id",sub_cus_id);
|
return this;
|
}
|
/**
|
* 获取<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getSub_cus_name() {
|
return sub_cus_name;
|
}
|
/**
|
* 设置<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setSub_cus_name(String sub_cus_name) {
|
this.sub_cus_name = sub_cus_name;
|
this.isSetted_sub_cus_name = true;
|
BEAN_VALUES.put("sub_cus_name",sub_cus_name);
|
return this;
|
}
|
/**
|
* 获取业务ID<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getBus_id() {
|
return bus_id;
|
}
|
/**
|
* 设置业务ID<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setBus_id(String bus_id) {
|
this.bus_id = bus_id;
|
this.isSetted_bus_id = true;
|
BEAN_VALUES.put("bus_id",bus_id);
|
return this;
|
}
|
/**
|
* 获取名称<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getCiname() {
|
return ciname;
|
}
|
/**
|
* 设置名称<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setCiname(String ciname) {
|
this.ciname = ciname;
|
this.isSetted_ciname = true;
|
BEAN_VALUES.put("ciname",ciname);
|
return this;
|
}
|
/**
|
* 获取搜索代码<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getSearchcode() {
|
return searchcode;
|
}
|
/**
|
* 设置搜索代码<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setSearchcode(String searchcode) {
|
this.searchcode = searchcode;
|
this.isSetted_searchcode = true;
|
BEAN_VALUES.put("searchcode",searchcode);
|
return this;
|
}
|
/**
|
* 获取配置编号<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getCode() {
|
return code;
|
}
|
/**
|
* 设置配置编号<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setCode(String code) {
|
this.code = code;
|
this.isSetted_code = true;
|
BEAN_VALUES.put("code",code);
|
return this;
|
}
|
/**
|
* 获取SN编号<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getSn_no() {
|
return sn_no;
|
}
|
/**
|
* 设置SN编号<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setSn_no(String sn_no) {
|
this.sn_no = sn_no;
|
this.isSetted_sn_no = true;
|
BEAN_VALUES.put("sn_no",sn_no);
|
return this;
|
}
|
/**
|
* 获取责任人<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getZr_name() {
|
return zr_name;
|
}
|
/**
|
* 设置责任人<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setZr_name(String zr_name) {
|
this.zr_name = zr_name;
|
this.isSetted_zr_name = true;
|
BEAN_VALUES.put("zr_name",zr_name);
|
return this;
|
}
|
/**
|
* 获取负责科室<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getZr_dept() {
|
return zr_dept;
|
}
|
/**
|
* 设置负责科室<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setZr_dept(String zr_dept) {
|
this.zr_dept = zr_dept;
|
this.isSetted_zr_dept = true;
|
BEAN_VALUES.put("zr_dept",zr_dept);
|
return this;
|
}
|
/**
|
* 获取一级编号<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getLv1_id() {
|
return lv1_id;
|
}
|
/**
|
* 设置一级编号<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setLv1_id(String lv1_id) {
|
this.lv1_id = lv1_id;
|
this.isSetted_lv1_id = true;
|
BEAN_VALUES.put("lv1_id",lv1_id);
|
return this;
|
}
|
/**
|
* 获取一级分类<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getLv1_name() {
|
return lv1_name;
|
}
|
/**
|
* 设置一级分类<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setLv1_name(String lv1_name) {
|
this.lv1_name = lv1_name;
|
this.isSetted_lv1_name = true;
|
BEAN_VALUES.put("lv1_name",lv1_name);
|
return this;
|
}
|
/**
|
* 获取二级编号<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getLv2_id() {
|
return lv2_id;
|
}
|
/**
|
* 设置二级编号<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setLv2_id(String lv2_id) {
|
this.lv2_id = lv2_id;
|
this.isSetted_lv2_id = true;
|
BEAN_VALUES.put("lv2_id",lv2_id);
|
return this;
|
}
|
/**
|
* 获取二级分类<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getLv2_name() {
|
return lv2_name;
|
}
|
/**
|
* 设置二级分类<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setLv2_name(String lv2_name) {
|
this.lv2_name = lv2_name;
|
this.isSetted_lv2_name = true;
|
BEAN_VALUES.put("lv2_name",lv2_name);
|
return this;
|
}
|
/**
|
* 获取三级编号<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getLv3_id() {
|
return lv3_id;
|
}
|
/**
|
* 设置三级编号<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setLv3_id(String lv3_id) {
|
this.lv3_id = lv3_id;
|
this.isSetted_lv3_id = true;
|
BEAN_VALUES.put("lv3_id",lv3_id);
|
return this;
|
}
|
/**
|
* 获取三级分类<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getLv3_name() {
|
return lv3_name;
|
}
|
/**
|
* 设置三级分类<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setLv3_name(String lv3_name) {
|
this.lv3_name = lv3_name;
|
this.isSetted_lv3_name = true;
|
BEAN_VALUES.put("lv3_name",lv3_name);
|
return this;
|
}
|
/**
|
* 获取厂商编号<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getMft_id() {
|
return mft_id;
|
}
|
/**
|
* 设置厂商编号<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setMft_id(String mft_id) {
|
this.mft_id = mft_id;
|
this.isSetted_mft_id = true;
|
BEAN_VALUES.put("mft_id",mft_id);
|
return this;
|
}
|
/**
|
* 获取厂商名称<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getMft_name() {
|
return mft_name;
|
}
|
/**
|
* 设置厂商名称<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setMft_name(String mft_name) {
|
this.mft_name = mft_name;
|
this.isSetted_mft_name = true;
|
BEAN_VALUES.put("mft_name",mft_name);
|
return this;
|
}
|
/**
|
* 获取集成商编号<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getIgt_id() {
|
return igt_id;
|
}
|
/**
|
* 设置集成商编号<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setIgt_id(String igt_id) {
|
this.igt_id = igt_id;
|
this.isSetted_igt_id = true;
|
BEAN_VALUES.put("igt_id",igt_id);
|
return this;
|
}
|
/**
|
* 获取集成商名称<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getIgt_name() {
|
return igt_name;
|
}
|
/**
|
* 设置集成商名称<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setIgt_name(String igt_name) {
|
this.igt_name = igt_name;
|
this.isSetted_igt_name = true;
|
BEAN_VALUES.put("igt_name",igt_name);
|
return this;
|
}
|
/**
|
* 获取创建人ID<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getCreate_id() {
|
return create_id;
|
}
|
/**
|
* 设置创建人ID<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setCreate_id(String create_id) {
|
this.create_id = create_id;
|
this.isSetted_create_id = true;
|
BEAN_VALUES.put("create_id",create_id);
|
return this;
|
}
|
/**
|
* 获取创建人<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getCreate_name() {
|
return create_name;
|
}
|
/**
|
* 设置创建人<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setCreate_name(String create_name) {
|
this.create_name = create_name;
|
this.isSetted_create_name = true;
|
BEAN_VALUES.put("create_name",create_name);
|
return this;
|
}
|
/**
|
* 获取创建时间<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public Long getCreate_time() {
|
return create_time;
|
}
|
/**
|
* 设置创建时间<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setCreate_time(Long create_time) {
|
this.create_time = create_time;
|
this.isSetted_create_time = true;
|
BEAN_VALUES.put("create_time",create_time);
|
return this;
|
}
|
/**
|
* 获取CI管理员<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getAdmin_id() {
|
return admin_id;
|
}
|
/**
|
* 设置CI管理员<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setAdmin_id(String admin_id) {
|
this.admin_id = admin_id;
|
this.isSetted_admin_id = true;
|
BEAN_VALUES.put("admin_id",admin_id);
|
return this;
|
}
|
/**
|
* 获取存放位置<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getPosition() {
|
return position;
|
}
|
/**
|
* 设置存放位置<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setPosition(String position) {
|
this.position = position;
|
this.isSetted_position = true;
|
BEAN_VALUES.put("position",position);
|
return this;
|
}
|
/**
|
* 获取最后更新时间<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public Long getLast_up_time() {
|
return last_up_time;
|
}
|
/**
|
* 设置最后更新时间<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setLast_up_time(Long last_up_time) {
|
this.last_up_time = last_up_time;
|
this.isSetted_last_up_time = true;
|
BEAN_VALUES.put("last_up_time",last_up_time);
|
return this;
|
}
|
/**
|
* 获取备注<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public String getNote() {
|
return note;
|
}
|
/**
|
* 设置备注<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setNote(String note) {
|
this.note = note;
|
this.isSetted_note = true;
|
BEAN_VALUES.put("note",note);
|
return this;
|
}
|
/**
|
* 获取购买时间<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public Long getBuy_time() {
|
return buy_time;
|
}
|
/**
|
* 设置购买时间<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setBuy_time(Long buy_time) {
|
this.buy_time = buy_time;
|
this.isSetted_buy_time = true;
|
BEAN_VALUES.put("buy_time",buy_time);
|
return this;
|
}
|
/**
|
* 获取过保时间<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public Long getGb_time() {
|
return gb_time;
|
}
|
/**
|
* 设置过保时间<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setGb_time(Long gb_time) {
|
this.gb_time = gb_time;
|
this.isSetted_gb_time = true;
|
BEAN_VALUES.put("gb_time",gb_time);
|
return this;
|
}
|
/**
|
* 获取续保时间<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public Long getXb_time() {
|
return xb_time;
|
}
|
/**
|
* 设置续保时间<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setXb_time(Long xb_time) {
|
this.xb_time = xb_time;
|
this.isSetted_xb_time = true;
|
BEAN_VALUES.put("xb_time",xb_time);
|
return this;
|
}
|
/**
|
* 获取续保过保时间<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public Long getXbgb_time() {
|
return xbgb_time;
|
}
|
/**
|
* 设置续保过保时间<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setXbgb_time(Long xbgb_time) {
|
this.xbgb_time = xbgb_time;
|
this.isSetted_xbgb_time = true;
|
BEAN_VALUES.put("xbgb_time",xbgb_time);
|
return this;
|
}
|
/**
|
* 获取状态(0未启用 1正常;2废弃;3维护中; 4备用;)<BR/>
|
* 䣺2016-31-18 hh:07
|
*/
|
public Integer getState() {
|
return state;
|
}
|
/**
|
* 设置状态(0未启用 1正常;2废弃;3维护中; 4备用;)<BR/>
|
* 2016-31-18 hh:07
|
*/
|
public CMDB_CI_BASE setState(Integer state) {
|
this.state = state;
|
this.isSetted_state = true;
|
BEAN_VALUES.put("state",state);
|
return this;
|
}
|
|
/**
|
* 使用ID删除Bean<BR/>
|
*/
|
public void deleteById() {
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("删除bean时ID不能为空");
|
}
|
dao.execute("delete from " + getTableName() + " where id = :id", BEAN_VALUES);
|
}
|
|
@Override
|
public CMDB_CI_BASE getInstanceById() {
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("获取Bean时ID不能为空");
|
}
|
return dao.queryForBean("select * from " + getTableName() + " where id=:id", BEAN_VALUES, this);
|
}
|
|
|
|
@Override
|
public CMDB_CI_BASE queryForBean() {
|
StringBuffer sBuffer = new StringBuffer("select * from CMDB_CI_BASE where ");
|
if(isSetted_id){
|
sBuffer.append("id=:id and ");
|
}
|
if (isSetted_cus_id) {
|
sBuffer.append("cus_id=:cus_id and ");
|
}
|
if (isSetted_cus_name) {
|
sBuffer.append("cus_name=:cus_name and ");
|
}
|
if (isSetted_sub_cus_id) {
|
sBuffer.append("sub_cus_id=:sub_cus_id and ");
|
}
|
if (isSetted_sub_cus_name) {
|
sBuffer.append("sub_cus_name=:sub_cus_name and ");
|
}
|
if (isSetted_bus_id) {
|
sBuffer.append("bus_id=:bus_id and ");
|
}
|
if (isSetted_ciname) {
|
sBuffer.append("ciname=:ciname and ");
|
}
|
if (isSetted_searchcode) {
|
sBuffer.append("searchcode=:searchcode and ");
|
}
|
if (isSetted_code) {
|
sBuffer.append("code=:code and ");
|
}
|
if (isSetted_sn_no) {
|
sBuffer.append("sn_no=:sn_no and ");
|
}
|
if (isSetted_zr_name) {
|
sBuffer.append("zr_name=:zr_name and ");
|
}
|
if (isSetted_zr_dept) {
|
sBuffer.append("zr_dept=:zr_dept and ");
|
}
|
if (isSetted_lv1_id) {
|
sBuffer.append("lv1_id=:lv1_id and ");
|
}
|
if (isSetted_lv1_name) {
|
sBuffer.append("lv1_name=:lv1_name and ");
|
}
|
if (isSetted_lv2_id) {
|
sBuffer.append("lv2_id=:lv2_id and ");
|
}
|
if (isSetted_lv2_name) {
|
sBuffer.append("lv2_name=:lv2_name and ");
|
}
|
if (isSetted_lv3_id) {
|
sBuffer.append("lv3_id=:lv3_id and ");
|
}
|
if (isSetted_lv3_name) {
|
sBuffer.append("lv3_name=:lv3_name and ");
|
}
|
if (isSetted_mft_id) {
|
sBuffer.append("mft_id=:mft_id and ");
|
}
|
if (isSetted_mft_name) {
|
sBuffer.append("mft_name=:mft_name and ");
|
}
|
if (isSetted_igt_id) {
|
sBuffer.append("igt_id=:igt_id and ");
|
}
|
if (isSetted_igt_name) {
|
sBuffer.append("igt_name=:igt_name and ");
|
}
|
if (isSetted_create_id) {
|
sBuffer.append("create_id=:create_id and ");
|
}
|
if (isSetted_create_name) {
|
sBuffer.append("create_name=:create_name and ");
|
}
|
if (isSetted_create_time) {
|
sBuffer.append("create_time=:create_time and ");
|
}
|
if (isSetted_admin_id) {
|
sBuffer.append("admin_id=:admin_id and ");
|
}
|
if (isSetted_position) {
|
sBuffer.append("position=:position and ");
|
}
|
if (isSetted_last_up_time) {
|
sBuffer.append("last_up_time=:last_up_time and ");
|
}
|
if (isSetted_note) {
|
sBuffer.append("note=:note and ");
|
}
|
if (isSetted_buy_time) {
|
sBuffer.append("buy_time=:buy_time and ");
|
}
|
if (isSetted_gb_time) {
|
sBuffer.append("gb_time=:gb_time and ");
|
}
|
if (isSetted_xb_time) {
|
sBuffer.append("xb_time=:xb_time and ");
|
}
|
if (isSetted_xbgb_time) {
|
sBuffer.append("xbgb_time=:xbgb_time and ");
|
}
|
if (isSetted_state) {
|
sBuffer.append("state=:state and ");
|
}
|
String sql = sBuffer.toString();
|
sql = StringUtils.removeEnd(sql, " and ");
|
return dao.queryForBean(sql,this);
|
}
|
|
@Override
|
public String getTableName() {
|
return "CMDB_CI_BASE";
|
}
|
|
|
public Map getBeanValues(){
|
return this.BEAN_VALUES;
|
}
|
|
@Override
|
public CMDB_CI_BASE insert() {
|
if (StringUtils.isBlank(id)) {
|
this.setId(StringUtil.getUUID());
|
}
|
dao.execute(getInsertSql(),BEAN_VALUES);
|
return this;
|
}
|
|
@Override
|
public CMDB_CI_BASE update() {
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("更新Bean时ID不能为空");
|
}
|
dao.execute(getUpdateSql(),BEAN_VALUES);
|
return this;
|
}
|
|
public CMDB_CI_BASE insertOrUpdate(){
|
if (StringUtils.isNotBlank(id)) {
|
return update();
|
} else {
|
return insert();
|
}
|
}
|
|
/**
|
* 通过ID获取该条信息的Map结构
|
*/
|
public Map getBeanMapById() {
|
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("ID不能为空!");
|
}
|
|
return dao.queryForMap("select * from CMDB_CI_BASE where id=:id",BEAN_VALUES);
|
}
|
|
public Object mapRow(ResultSet rs, int rownum) throws SQLException {
|
Object id = rs.getObject("ID");
|
this.setId(ConvertUtil.obj2Str(id));
|
BEAN_VALUES.put("id",id);
|
Object obj = null;
|
obj = rs.getObject("CUS_ID");
|
BEAN_VALUES.put("cus_id",obj);
|
this.setCus_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CUS_NAME");
|
BEAN_VALUES.put("cus_name",obj);
|
this.setCus_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("SUB_CUS_ID");
|
BEAN_VALUES.put("sub_cus_id",obj);
|
this.setSub_cus_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("SUB_CUS_NAME");
|
BEAN_VALUES.put("sub_cus_name",obj);
|
this.setSub_cus_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("BUS_ID");
|
BEAN_VALUES.put("bus_id",obj);
|
this.setBus_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CINAME");
|
BEAN_VALUES.put("ciname",obj);
|
this.setCiname(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("SEARCHCODE");
|
BEAN_VALUES.put("searchcode",obj);
|
this.setSearchcode(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CODE");
|
BEAN_VALUES.put("code",obj);
|
this.setCode(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("SN_NO");
|
BEAN_VALUES.put("sn_no",obj);
|
this.setSn_no(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("ZR_NAME");
|
BEAN_VALUES.put("zr_name",obj);
|
this.setZr_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("ZR_DEPT");
|
BEAN_VALUES.put("zr_dept",obj);
|
this.setZr_dept(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("LV1_ID");
|
BEAN_VALUES.put("lv1_id",obj);
|
this.setLv1_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("LV1_NAME");
|
BEAN_VALUES.put("lv1_name",obj);
|
this.setLv1_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("LV2_ID");
|
BEAN_VALUES.put("lv2_id",obj);
|
this.setLv2_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("LV2_NAME");
|
BEAN_VALUES.put("lv2_name",obj);
|
this.setLv2_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("LV3_ID");
|
BEAN_VALUES.put("lv3_id",obj);
|
this.setLv3_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("LV3_NAME");
|
BEAN_VALUES.put("lv3_name",obj);
|
this.setLv3_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("MFT_ID");
|
BEAN_VALUES.put("mft_id",obj);
|
this.setMft_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("MFT_NAME");
|
BEAN_VALUES.put("mft_name",obj);
|
this.setMft_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("IGT_ID");
|
BEAN_VALUES.put("igt_id",obj);
|
this.setIgt_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("IGT_NAME");
|
BEAN_VALUES.put("igt_name",obj);
|
this.setIgt_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CREATE_ID");
|
BEAN_VALUES.put("create_id",obj);
|
this.setCreate_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CREATE_NAME");
|
BEAN_VALUES.put("create_name",obj);
|
this.setCreate_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CREATE_TIME");
|
BEAN_VALUES.put("create_time",obj);
|
this.setCreate_time(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("ADMIN_ID");
|
BEAN_VALUES.put("admin_id",obj);
|
this.setAdmin_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("POSITION");
|
BEAN_VALUES.put("position",obj);
|
this.setPosition(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("LAST_UP_TIME");
|
BEAN_VALUES.put("last_up_time",obj);
|
this.setLast_up_time(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("NOTE");
|
BEAN_VALUES.put("note",obj);
|
this.setNote(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("BUY_TIME");
|
BEAN_VALUES.put("buy_time",obj);
|
this.setBuy_time(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("GB_TIME");
|
BEAN_VALUES.put("gb_time",obj);
|
this.setGb_time(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("XB_TIME");
|
BEAN_VALUES.put("xb_time",obj);
|
this.setXb_time(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("XBGB_TIME");
|
BEAN_VALUES.put("xbgb_time",obj);
|
this.setXbgb_time(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("STATE");
|
BEAN_VALUES.put("state",obj);
|
this.setState(ConvertUtil.obj2Integer(obj));
|
return this;
|
}
|
|
|
public String toString() {
|
StringBuffer sb = new StringBuffer("[");
|
for (Iterator iterator = KEYS.keySet().iterator(); iterator.hasNext();) {
|
String key = (String) iterator.next();
|
sb.append(key+"=" + BEAN_VALUES.get(key)+",");
|
}
|
sb.append("]");
|
return sb.toString();
|
}
|
|
public CMDB_CI_BASE newInstance(){
|
return new CMDB_CI_BASE();
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|