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 KM_LIBRARY_TEMP extends BaseBean{ public final static Map KEYS = new HashMap(); private Map BEAN_VALUES = null; static { KEYS.put("id", "String"); KEYS.put("title", "String"); KEYS.put("tag", "String"); KEYS.put("summary", "String"); KEYS.put("content", "String"); KEYS.put("category_id", "String"); KEYS.put("category_name", "String"); KEYS.put("create_user_id", "String"); KEYS.put("create_user_name", "String"); KEYS.put("create_time", "Long"); KEYS.put("state", "Integer"); KEYS.put("version", "String"); KEYS.put("hits", "Integer"); KEYS.put("is_editor", "Integer"); KEYS.put("thirdlevel_name", "String"); KEYS.put("thirdlevel_id", "String"); KEYS.put("first_category_id", "String"); KEYS.put("first_category_name", "String"); KEYS.put("second_category_id", "String"); KEYS.put("second_category_name", "String"); KEYS.put("third_category_id", "String"); KEYS.put("third_category_name", "String"); KEYS.put("update_date", "Long"); KEYS.put("updater_id", "String"); KEYS.put("update_name", "String"); KEYS.put("second_knowcategory_id", "String"); KEYS.put("second_knowcategory_name", "String"); KEYS.put("first_knowcategory_id", "String"); KEYS.put("first_knowcategory_name", "String"); KEYS.put("secondlevel_name", "String"); KEYS.put("secondlevel_id", "String"); KEYS.put("firstlevel_name", "String"); KEYS.put("firstlevel_id", "String"); KEYS.put("content_state", "Integer"); KEYS.put("audit_userid", "String"); KEYS.put("audit_username", "String"); KEYS.put("audit_state", "Integer"); KEYS.put("apply_note", "String"); KEYS.put("audit_note", "String"); KEYS.put("original_id", "String"); KEYS.put("before_version", "Integer"); KEYS.put("after_version", "Integer"); KEYS.put("access_type", "Integer"); } public Map getColumnMap(){ return KEYS; } private String id; private Boolean isSetted_id = false;; private String title; private Boolean isSetted_title = false; private String tag; private Boolean isSetted_tag = false; private String summary; private Boolean isSetted_summary = false; private String content; private Boolean isSetted_content = false; private String category_id; private Boolean isSetted_category_id = false; private String category_name; private Boolean isSetted_category_name = false; private String create_user_id; private Boolean isSetted_create_user_id = false; private String create_user_name; private Boolean isSetted_create_user_name = false; private Long create_time; private Boolean isSetted_create_time = false; private Integer state; private Boolean isSetted_state = false; private String version; private Boolean isSetted_version = false; private Integer hits; private Boolean isSetted_hits = false; private Integer is_editor; private Boolean isSetted_is_editor = false; private String thirdlevel_name; private Boolean isSetted_thirdlevel_name = false; private String thirdlevel_id; private Boolean isSetted_thirdlevel_id = false; private String first_category_id; private Boolean isSetted_first_category_id = false; private String first_category_name; private Boolean isSetted_first_category_name = false; private String second_category_id; private Boolean isSetted_second_category_id = false; private String second_category_name; private Boolean isSetted_second_category_name = false; private String third_category_id; private Boolean isSetted_third_category_id = false; private String third_category_name; private Boolean isSetted_third_category_name = false; private Long update_date; private Boolean isSetted_update_date = false; private String updater_id; private Boolean isSetted_updater_id = false; private String update_name; private Boolean isSetted_update_name = false; private String second_knowcategory_id; private Boolean isSetted_second_knowcategory_id = false; private String second_knowcategory_name; private Boolean isSetted_second_knowcategory_name = false; private String first_knowcategory_id; private Boolean isSetted_first_knowcategory_id = false; private String first_knowcategory_name; private Boolean isSetted_first_knowcategory_name = false; private String secondlevel_name; private Boolean isSetted_secondlevel_name = false; private String secondlevel_id; private Boolean isSetted_secondlevel_id = false; private String firstlevel_name; private Boolean isSetted_firstlevel_name = false; private String firstlevel_id; private Boolean isSetted_firstlevel_id = false; private Integer content_state; private Boolean isSetted_content_state = false; private String audit_userid; private Boolean isSetted_audit_userid = false; private String audit_username; private Boolean isSetted_audit_username = false; private Integer audit_state; private Boolean isSetted_audit_state = false; private String apply_note; private Boolean isSetted_apply_note = false; private String audit_note; private Boolean isSetted_audit_note = false; private String original_id; private Boolean isSetted_original_id = false; private Integer before_version; private Boolean isSetted_before_version = false; private Integer after_version; private Boolean isSetted_after_version = false; private Integer access_type; private Boolean isSetted_access_type = false; private void initBeanValues(){ BEAN_VALUES = new HashMap(); BEAN_VALUES.put("id",id); BEAN_VALUES.put("title", null); BEAN_VALUES.put("tag", null); BEAN_VALUES.put("summary", null); BEAN_VALUES.put("content", null); BEAN_VALUES.put("category_id", null); BEAN_VALUES.put("category_name", null); BEAN_VALUES.put("create_user_id", null); BEAN_VALUES.put("create_user_name", null); BEAN_VALUES.put("create_time", null); BEAN_VALUES.put("state", null); BEAN_VALUES.put("version", null); BEAN_VALUES.put("hits", null); BEAN_VALUES.put("is_editor", null); BEAN_VALUES.put("thirdlevel_name", null); BEAN_VALUES.put("thirdlevel_id", null); BEAN_VALUES.put("first_category_id", null); BEAN_VALUES.put("first_category_name", null); BEAN_VALUES.put("second_category_id", null); BEAN_VALUES.put("second_category_name", null); BEAN_VALUES.put("third_category_id", null); BEAN_VALUES.put("third_category_name", null); BEAN_VALUES.put("update_date", null); BEAN_VALUES.put("updater_id", null); BEAN_VALUES.put("update_name", null); BEAN_VALUES.put("second_knowcategory_id", null); BEAN_VALUES.put("second_knowcategory_name", null); BEAN_VALUES.put("first_knowcategory_id", null); BEAN_VALUES.put("first_knowcategory_name", null); BEAN_VALUES.put("secondlevel_name", null); BEAN_VALUES.put("secondlevel_id", null); BEAN_VALUES.put("firstlevel_name", null); BEAN_VALUES.put("firstlevel_id", null); BEAN_VALUES.put("content_state", null); BEAN_VALUES.put("audit_userid", null); BEAN_VALUES.put("audit_username", null); BEAN_VALUES.put("audit_state", null); BEAN_VALUES.put("apply_note", null); BEAN_VALUES.put("audit_note", null); BEAN_VALUES.put("original_id", null); BEAN_VALUES.put("before_version", null); BEAN_VALUES.put("after_version", null); BEAN_VALUES.put("access_type", null); } public KM_LIBRARY_TEMP() { initBeanValues(); } public KM_LIBRARY_TEMP(String id) { super(); this.id = id; initBeanValues(); BEAN_VALUES.put("id",id); } /** * 获取ID */ public String getId() { return this.id; } /** * 设置ID */ public KM_LIBRARY_TEMP 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 KM_LIBRARY_TEMP set "); if (isSetted_title) { sBuffer.append("title=:title,"); } if (isSetted_tag) { sBuffer.append("tag=:tag,"); } if (isSetted_summary) { sBuffer.append("summary=:summary,"); } if (isSetted_content) { sBuffer.append("content=:content,"); } if (isSetted_category_id) { sBuffer.append("category_id=:category_id,"); } if (isSetted_category_name) { sBuffer.append("category_name=:category_name,"); } if (isSetted_create_user_id) { sBuffer.append("create_user_id=:create_user_id,"); } if (isSetted_create_user_name) { sBuffer.append("create_user_name=:create_user_name,"); } if (isSetted_create_time) { sBuffer.append("create_time=:create_time,"); } if (isSetted_state) { sBuffer.append("state=:state,"); } if (isSetted_version) { sBuffer.append("version=:version,"); } if (isSetted_hits) { sBuffer.append("hits=:hits,"); } if (isSetted_is_editor) { sBuffer.append("is_editor=:is_editor,"); } if (isSetted_thirdlevel_name) { sBuffer.append("thirdlevel_name=:thirdlevel_name,"); } if (isSetted_thirdlevel_id) { sBuffer.append("thirdlevel_id=:thirdlevel_id,"); } if (isSetted_first_category_id) { sBuffer.append("first_category_id=:first_category_id,"); } if (isSetted_first_category_name) { sBuffer.append("first_category_name=:first_category_name,"); } if (isSetted_second_category_id) { sBuffer.append("second_category_id=:second_category_id,"); } if (isSetted_second_category_name) { sBuffer.append("second_category_name=:second_category_name,"); } if (isSetted_third_category_id) { sBuffer.append("third_category_id=:third_category_id,"); } if (isSetted_third_category_name) { sBuffer.append("third_category_name=:third_category_name,"); } if (isSetted_update_date) { sBuffer.append("update_date=:update_date,"); } if (isSetted_updater_id) { sBuffer.append("updater_id=:updater_id,"); } if (isSetted_update_name) { sBuffer.append("update_name=:update_name,"); } if (isSetted_second_knowcategory_id) { sBuffer.append("second_knowcategory_id=:second_knowcategory_id,"); } if (isSetted_second_knowcategory_name) { sBuffer.append("second_knowcategory_name=:second_knowcategory_name,"); } if (isSetted_first_knowcategory_id) { sBuffer.append("first_knowcategory_id=:first_knowcategory_id,"); } if (isSetted_first_knowcategory_name) { sBuffer.append("first_knowcategory_name=:first_knowcategory_name,"); } if (isSetted_secondlevel_name) { sBuffer.append("secondlevel_name=:secondlevel_name,"); } if (isSetted_secondlevel_id) { sBuffer.append("secondlevel_id=:secondlevel_id,"); } if (isSetted_firstlevel_name) { sBuffer.append("firstlevel_name=:firstlevel_name,"); } if (isSetted_firstlevel_id) { sBuffer.append("firstlevel_id=:firstlevel_id,"); } if (isSetted_content_state) { sBuffer.append("content_state=:content_state,"); } if (isSetted_audit_userid) { sBuffer.append("audit_userid=:audit_userid,"); } if (isSetted_audit_username) { sBuffer.append("audit_username=:audit_username,"); } if (isSetted_audit_state) { sBuffer.append("audit_state=:audit_state,"); } if (isSetted_apply_note) { sBuffer.append("apply_note=:apply_note,"); } if (isSetted_audit_note) { sBuffer.append("audit_note=:audit_note,"); } if (isSetted_original_id) { sBuffer.append("original_id=:original_id,"); } if (isSetted_before_version) { sBuffer.append("before_version=:before_version,"); } if (isSetted_after_version) { sBuffer.append("after_version=:after_version,"); } if (isSetted_access_type) { sBuffer.append("access_type=:access_type,"); } String sql = sBuffer.toString(); return StringUtils.removeEnd(sql, ",") + " where id=:id"; } @Override public String getInsertSql() { StringBuffer sBuffer = new StringBuffer("insert into KM_LIBRARY_TEMP("); StringBuffer fileds = new StringBuffer("id,"); StringBuffer values = new StringBuffer(":id,"); fileds.append("title,"); values.append(":title,"); fileds.append("tag,"); values.append(":tag,"); fileds.append("summary,"); values.append(":summary,"); fileds.append("content,"); values.append(":content,"); fileds.append("category_id,"); values.append(":category_id,"); fileds.append("category_name,"); values.append(":category_name,"); fileds.append("create_user_id,"); values.append(":create_user_id,"); fileds.append("create_user_name,"); values.append(":create_user_name,"); fileds.append("create_time,"); values.append(":create_time,"); fileds.append("state,"); values.append(":state,"); fileds.append("version,"); values.append(":version,"); fileds.append("hits,"); values.append(":hits,"); fileds.append("is_editor,"); values.append(":is_editor,"); fileds.append("thirdlevel_name,"); values.append(":thirdlevel_name,"); fileds.append("thirdlevel_id,"); values.append(":thirdlevel_id,"); fileds.append("first_category_id,"); values.append(":first_category_id,"); fileds.append("first_category_name,"); values.append(":first_category_name,"); fileds.append("second_category_id,"); values.append(":second_category_id,"); fileds.append("second_category_name,"); values.append(":second_category_name,"); fileds.append("third_category_id,"); values.append(":third_category_id,"); fileds.append("third_category_name,"); values.append(":third_category_name,"); fileds.append("update_date,"); values.append(":update_date,"); fileds.append("updater_id,"); values.append(":updater_id,"); fileds.append("update_name,"); values.append(":update_name,"); fileds.append("second_knowcategory_id,"); values.append(":second_knowcategory_id,"); fileds.append("second_knowcategory_name,"); values.append(":second_knowcategory_name,"); fileds.append("first_knowcategory_id,"); values.append(":first_knowcategory_id,"); fileds.append("first_knowcategory_name,"); values.append(":first_knowcategory_name,"); fileds.append("secondlevel_name,"); values.append(":secondlevel_name,"); fileds.append("secondlevel_id,"); values.append(":secondlevel_id,"); fileds.append("firstlevel_name,"); values.append(":firstlevel_name,"); fileds.append("firstlevel_id,"); values.append(":firstlevel_id,"); fileds.append("content_state,"); values.append(":content_state,"); fileds.append("audit_userid,"); values.append(":audit_userid,"); fileds.append("audit_username,"); values.append(":audit_username,"); fileds.append("audit_state,"); values.append(":audit_state,"); fileds.append("apply_note,"); values.append(":apply_note,"); fileds.append("audit_note,"); values.append(":audit_note,"); fileds.append("original_id,"); values.append(":original_id,"); fileds.append("before_version,"); values.append(":before_version,"); fileds.append("after_version,"); values.append(":after_version,"); fileds.append("access_type,"); values.append(":access_type,"); sBuffer.append(StringUtils.removeEnd(fileds.toString(), ",") + ") values("+StringUtils.removeEnd(values.toString(), ",")+")"); return sBuffer.toString(); } /** * 获取标题
* 䣺2016-50-06 hh:07 */ public String getTitle() { return title; } /** * 设置标题
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setTitle(String title) { this.title = title; this.isSetted_title = true; BEAN_VALUES.put("title",title); return this; } /** * 获取标签,多个用空格分隔
* 䣺2016-50-06 hh:07 */ public String getTag() { return tag; } /** * 设置标签,多个用空格分隔
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setTag(String tag) { this.tag = tag; this.isSetted_tag = true; BEAN_VALUES.put("tag",tag); return this; } /** * 获取摘要
* 䣺2016-50-06 hh:07 */ public String getSummary() { return summary; } /** * 设置摘要
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setSummary(String summary) { this.summary = summary; this.isSetted_summary = true; BEAN_VALUES.put("summary",summary); return this; } /** * 获取内容
* 䣺2016-50-06 hh:07 */ public String getContent() { return content; } /** * 设置内容
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setContent(String content) { this.content = content; this.isSetted_content = true; BEAN_VALUES.put("content",content); return this; } /** * 获取知识分类三级编号
* 䣺2016-50-06 hh:07 */ public String getCategory_id() { return category_id; } /** * 设置知识分类三级编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setCategory_id(String category_id) { this.category_id = category_id; this.isSetted_category_id = true; BEAN_VALUES.put("category_id",category_id); return this; } /** * 获取知识分类三级名称
* 䣺2016-50-06 hh:07 */ public String getCategory_name() { return category_name; } /** * 设置知识分类三级名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setCategory_name(String category_name) { this.category_name = category_name; this.isSetted_category_name = true; BEAN_VALUES.put("category_name",category_name); return this; } /** * 获取记录创建人编号
* 䣺2016-50-06 hh:07 */ public String getCreate_user_id() { return create_user_id; } /** * 设置记录创建人编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setCreate_user_id(String create_user_id) { this.create_user_id = create_user_id; this.isSetted_create_user_id = true; BEAN_VALUES.put("create_user_id",create_user_id); return this; } /** * 获取记录创建人姓名
* 䣺2016-50-06 hh:07 */ public String getCreate_user_name() { return create_user_name; } /** * 设置记录创建人姓名
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setCreate_user_name(String create_user_name) { this.create_user_name = create_user_name; this.isSetted_create_user_name = true; BEAN_VALUES.put("create_user_name",create_user_name); return this; } /** * 获取记录创建时间
* 䣺2016-50-06 hh:07 */ public Long getCreate_time() { return create_time; } /** * 设置记录创建时间
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setCreate_time(Long create_time) { this.create_time = create_time; this.isSetted_create_time = true; BEAN_VALUES.put("create_time",create_time); return this; } /** * 获取记录状态(1=启用;2=禁用)
* 䣺2016-50-06 hh:07 */ public Integer getState() { return state; } /** * 设置记录状态(1=启用;2=禁用)
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setState(Integer state) { this.state = state; this.isSetted_state = true; BEAN_VALUES.put("state",state); return this; } /** * 获取版本号
* 䣺2016-50-06 hh:07 */ public String getVersion() { return version; } /** * 设置版本号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setVersion(String version) { this.version = version; this.isSetted_version = true; BEAN_VALUES.put("version",version); return this; } /** * 获取点击次数
* 䣺2016-50-06 hh:07 */ public Integer getHits() { return hits; } /** * 设置点击次数
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setHits(Integer hits) { this.hits = hits; this.isSetted_hits = true; BEAN_VALUES.put("hits",hits); return this; } /** * 获取是否允许编辑(1=是;2=否)
* 䣺2016-50-06 hh:07 */ public Integer getIs_editor() { return is_editor; } /** * 设置是否允许编辑(1=是;2=否)
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setIs_editor(Integer is_editor) { this.is_editor = is_editor; this.isSetted_is_editor = true; BEAN_VALUES.put("is_editor",is_editor); return this; } /** * 获取设备三级分类名称
* 䣺2016-50-06 hh:07 */ public String getThirdlevel_name() { return thirdlevel_name; } /** * 设置设备三级分类名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setThirdlevel_name(String thirdlevel_name) { this.thirdlevel_name = thirdlevel_name; this.isSetted_thirdlevel_name = true; BEAN_VALUES.put("thirdlevel_name",thirdlevel_name); return this; } /** * 获取设备三级分类编号
* 䣺2016-50-06 hh:07 */ public String getThirdlevel_id() { return thirdlevel_id; } /** * 设置设备三级分类编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setThirdlevel_id(String thirdlevel_id) { this.thirdlevel_id = thirdlevel_id; this.isSetted_thirdlevel_id = true; BEAN_VALUES.put("thirdlevel_id",thirdlevel_id); return this; } /** * 获取服务目录一级编号
* 䣺2016-50-06 hh:07 */ public String getFirst_category_id() { return first_category_id; } /** * 设置服务目录一级编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setFirst_category_id(String first_category_id) { this.first_category_id = first_category_id; this.isSetted_first_category_id = true; BEAN_VALUES.put("first_category_id",first_category_id); return this; } /** * 获取服务目录一级名称
* 䣺2016-50-06 hh:07 */ public String getFirst_category_name() { return first_category_name; } /** * 设置服务目录一级名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setFirst_category_name(String first_category_name) { this.first_category_name = first_category_name; this.isSetted_first_category_name = true; BEAN_VALUES.put("first_category_name",first_category_name); return this; } /** * 获取服务目录二级编号
* 䣺2016-50-06 hh:07 */ public String getSecond_category_id() { return second_category_id; } /** * 设置服务目录二级编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setSecond_category_id(String second_category_id) { this.second_category_id = second_category_id; this.isSetted_second_category_id = true; BEAN_VALUES.put("second_category_id",second_category_id); return this; } /** * 获取服务目录二级名称
* 䣺2016-50-06 hh:07 */ public String getSecond_category_name() { return second_category_name; } /** * 设置服务目录二级名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setSecond_category_name(String second_category_name) { this.second_category_name = second_category_name; this.isSetted_second_category_name = true; BEAN_VALUES.put("second_category_name",second_category_name); return this; } /** * 获取服务目录三级编号
* 䣺2016-50-06 hh:07 */ public String getThird_category_id() { return third_category_id; } /** * 设置服务目录三级编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setThird_category_id(String third_category_id) { this.third_category_id = third_category_id; this.isSetted_third_category_id = true; BEAN_VALUES.put("third_category_id",third_category_id); return this; } /** * 获取服务目录三级名称
* 䣺2016-50-06 hh:07 */ public String getThird_category_name() { return third_category_name; } /** * 设置服务目录三级名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setThird_category_name(String third_category_name) { this.third_category_name = third_category_name; this.isSetted_third_category_name = true; BEAN_VALUES.put("third_category_name",third_category_name); return this; } /** * 获取最后编辑时间
* 䣺2016-50-06 hh:07 */ public Long getUpdate_date() { return update_date; } /** * 设置最后编辑时间
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setUpdate_date(Long update_date) { this.update_date = update_date; this.isSetted_update_date = true; BEAN_VALUES.put("update_date",update_date); return this; } /** * 获取编辑人编号
* 䣺2016-50-06 hh:07 */ public String getUpdater_id() { return updater_id; } /** * 设置编辑人编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setUpdater_id(String updater_id) { this.updater_id = updater_id; this.isSetted_updater_id = true; BEAN_VALUES.put("updater_id",updater_id); return this; } /** * 获取编辑人姓名
* 䣺2016-50-06 hh:07 */ public String getUpdate_name() { return update_name; } /** * 设置编辑人姓名
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setUpdate_name(String update_name) { this.update_name = update_name; this.isSetted_update_name = true; BEAN_VALUES.put("update_name",update_name); return this; } /** * 获取知识分类二级编号
* 䣺2016-50-06 hh:07 */ public String getSecond_knowcategory_id() { return second_knowcategory_id; } /** * 设置知识分类二级编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setSecond_knowcategory_id(String second_knowcategory_id) { this.second_knowcategory_id = second_knowcategory_id; this.isSetted_second_knowcategory_id = true; BEAN_VALUES.put("second_knowcategory_id",second_knowcategory_id); return this; } /** * 获取知识分类二级名称
* 䣺2016-50-06 hh:07 */ public String getSecond_knowcategory_name() { return second_knowcategory_name; } /** * 设置知识分类二级名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setSecond_knowcategory_name(String second_knowcategory_name) { this.second_knowcategory_name = second_knowcategory_name; this.isSetted_second_knowcategory_name = true; BEAN_VALUES.put("second_knowcategory_name",second_knowcategory_name); return this; } /** * 获取知识分类一级编号
* 䣺2016-50-06 hh:07 */ public String getFirst_knowcategory_id() { return first_knowcategory_id; } /** * 设置知识分类一级编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setFirst_knowcategory_id(String first_knowcategory_id) { this.first_knowcategory_id = first_knowcategory_id; this.isSetted_first_knowcategory_id = true; BEAN_VALUES.put("first_knowcategory_id",first_knowcategory_id); return this; } /** * 获取知识分类一级名称
* 䣺2016-50-06 hh:07 */ public String getFirst_knowcategory_name() { return first_knowcategory_name; } /** * 设置知识分类一级名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setFirst_knowcategory_name(String first_knowcategory_name) { this.first_knowcategory_name = first_knowcategory_name; this.isSetted_first_knowcategory_name = true; BEAN_VALUES.put("first_knowcategory_name",first_knowcategory_name); return this; } /** * 获取设备二级分类名称
* 䣺2016-50-06 hh:07 */ public String getSecondlevel_name() { return secondlevel_name; } /** * 设置设备二级分类名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setSecondlevel_name(String secondlevel_name) { this.secondlevel_name = secondlevel_name; this.isSetted_secondlevel_name = true; BEAN_VALUES.put("secondlevel_name",secondlevel_name); return this; } /** * 获取设备二级分类编号
* 䣺2016-50-06 hh:07 */ public String getSecondlevel_id() { return secondlevel_id; } /** * 设置设备二级分类编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setSecondlevel_id(String secondlevel_id) { this.secondlevel_id = secondlevel_id; this.isSetted_secondlevel_id = true; BEAN_VALUES.put("secondlevel_id",secondlevel_id); return this; } /** * 获取设备一级分类名称
* 䣺2016-50-06 hh:07 */ public String getFirstlevel_name() { return firstlevel_name; } /** * 设置设备一级分类名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setFirstlevel_name(String firstlevel_name) { this.firstlevel_name = firstlevel_name; this.isSetted_firstlevel_name = true; BEAN_VALUES.put("firstlevel_name",firstlevel_name); return this; } /** * 获取设备一级分类编号
* 䣺2016-50-06 hh:07 */ public String getFirstlevel_id() { return firstlevel_id; } /** * 设置设备一级分类编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setFirstlevel_id(String firstlevel_id) { this.firstlevel_id = firstlevel_id; this.isSetted_firstlevel_id = true; BEAN_VALUES.put("firstlevel_id",firstlevel_id); return this; } /** * 获取状态(2=新增;3=编辑;)
* 䣺2016-50-06 hh:07 */ public Integer getContent_state() { return content_state; } /** * 设置状态(2=新增;3=编辑;)
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setContent_state(Integer content_state) { this.content_state = content_state; this.isSetted_content_state = true; BEAN_VALUES.put("content_state",content_state); return this; } /** * 获取审核人编号
* 䣺2016-50-06 hh:07 */ public String getAudit_userid() { return audit_userid; } /** * 设置审核人编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setAudit_userid(String audit_userid) { this.audit_userid = audit_userid; this.isSetted_audit_userid = true; BEAN_VALUES.put("audit_userid",audit_userid); return this; } /** * 获取审核人名称
* 䣺2016-50-06 hh:07 */ public String getAudit_username() { return audit_username; } /** * 设置审核人名称
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setAudit_username(String audit_username) { this.audit_username = audit_username; this.isSetted_audit_username = true; BEAN_VALUES.put("audit_username",audit_username); return this; } /** * 获取审核状态(1:待审核 2:审核通过 3:审核不通过)
* 䣺2016-50-06 hh:07 */ public Integer getAudit_state() { return audit_state; } /** * 设置审核状态(1:待审核 2:审核通过 3:审核不通过)
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setAudit_state(Integer audit_state) { this.audit_state = audit_state; this.isSetted_audit_state = true; BEAN_VALUES.put("audit_state",audit_state); return this; } /** * 获取申请备注
* 䣺2016-50-06 hh:07 */ public String getApply_note() { return apply_note; } /** * 设置申请备注
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setApply_note(String apply_note) { this.apply_note = apply_note; this.isSetted_apply_note = true; BEAN_VALUES.put("apply_note",apply_note); return this; } /** * 获取审核备注
* 䣺2016-50-06 hh:07 */ public String getAudit_note() { return audit_note; } /** * 设置审核备注
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setAudit_note(String audit_note) { this.audit_note = audit_note; this.isSetted_audit_note = true; BEAN_VALUES.put("audit_note",audit_note); return this; } /** * 获取原版编号
* 䣺2016-50-06 hh:07 */ public String getOriginal_id() { return original_id; } /** * 设置原版编号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setOriginal_id(String original_id) { this.original_id = original_id; this.isSetted_original_id = true; BEAN_VALUES.put("original_id",original_id); return this; } /** * 获取编辑前版本号
* 䣺2016-50-06 hh:07 */ public Integer getBefore_version() { return before_version; } /** * 设置编辑前版本号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setBefore_version(Integer before_version) { this.before_version = before_version; this.isSetted_before_version = true; BEAN_VALUES.put("before_version",before_version); return this; } /** * 获取编辑后版本号
* 䣺2016-50-06 hh:07 */ public Integer getAfter_version() { return after_version; } /** * 设置编辑后版本号
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setAfter_version(Integer after_version) { this.after_version = after_version; this.isSetted_after_version = true; BEAN_VALUES.put("after_version",after_version); return this; } /** * 获取
* 䣺2016-50-06 hh:07 */ public Integer getAccess_type() { return access_type; } /** * 设置
* 2016-50-06 hh:07 */ public KM_LIBRARY_TEMP setAccess_type(Integer access_type) { this.access_type = access_type; this.isSetted_access_type = true; BEAN_VALUES.put("access_type",access_type); return this; } /** * 使用ID删除Bean
*/ public void deleteById() { if (StringUtils.isBlank(id)) { throw new RuntimeException("删除bean时ID不能为空"); } dao.execute("delete from " + getTableName() + " where id = :id", BEAN_VALUES); } @Override public KM_LIBRARY_TEMP getInstanceById() { if (StringUtils.isBlank(id)) { throw new RuntimeException("获取Bean时ID不能为空"); } return dao.queryForBean("select * from " + getTableName() + " where id=:id", BEAN_VALUES, this); } @Override public KM_LIBRARY_TEMP queryForBean() { StringBuffer sBuffer = new StringBuffer("select * from KM_LIBRARY_TEMP where "); if(isSetted_id){ sBuffer.append("id=:id and "); } if (isSetted_title) { sBuffer.append("title=:title and "); } if (isSetted_tag) { sBuffer.append("tag=:tag and "); } if (isSetted_summary) { sBuffer.append("summary=:summary and "); } if (isSetted_content) { sBuffer.append("content=:content and "); } if (isSetted_category_id) { sBuffer.append("category_id=:category_id and "); } if (isSetted_category_name) { sBuffer.append("category_name=:category_name and "); } if (isSetted_create_user_id) { sBuffer.append("create_user_id=:create_user_id and "); } if (isSetted_create_user_name) { sBuffer.append("create_user_name=:create_user_name and "); } if (isSetted_create_time) { sBuffer.append("create_time=:create_time and "); } if (isSetted_state) { sBuffer.append("state=:state and "); } if (isSetted_version) { sBuffer.append("version=:version and "); } if (isSetted_hits) { sBuffer.append("hits=:hits and "); } if (isSetted_is_editor) { sBuffer.append("is_editor=:is_editor and "); } if (isSetted_thirdlevel_name) { sBuffer.append("thirdlevel_name=:thirdlevel_name and "); } if (isSetted_thirdlevel_id) { sBuffer.append("thirdlevel_id=:thirdlevel_id and "); } if (isSetted_first_category_id) { sBuffer.append("first_category_id=:first_category_id and "); } if (isSetted_first_category_name) { sBuffer.append("first_category_name=:first_category_name and "); } if (isSetted_second_category_id) { sBuffer.append("second_category_id=:second_category_id and "); } if (isSetted_second_category_name) { sBuffer.append("second_category_name=:second_category_name and "); } if (isSetted_third_category_id) { sBuffer.append("third_category_id=:third_category_id and "); } if (isSetted_third_category_name) { sBuffer.append("third_category_name=:third_category_name and "); } if (isSetted_update_date) { sBuffer.append("update_date=:update_date and "); } if (isSetted_updater_id) { sBuffer.append("updater_id=:updater_id and "); } if (isSetted_update_name) { sBuffer.append("update_name=:update_name and "); } if (isSetted_second_knowcategory_id) { sBuffer.append("second_knowcategory_id=:second_knowcategory_id and "); } if (isSetted_second_knowcategory_name) { sBuffer.append("second_knowcategory_name=:second_knowcategory_name and "); } if (isSetted_first_knowcategory_id) { sBuffer.append("first_knowcategory_id=:first_knowcategory_id and "); } if (isSetted_first_knowcategory_name) { sBuffer.append("first_knowcategory_name=:first_knowcategory_name and "); } if (isSetted_secondlevel_name) { sBuffer.append("secondlevel_name=:secondlevel_name and "); } if (isSetted_secondlevel_id) { sBuffer.append("secondlevel_id=:secondlevel_id and "); } if (isSetted_firstlevel_name) { sBuffer.append("firstlevel_name=:firstlevel_name and "); } if (isSetted_firstlevel_id) { sBuffer.append("firstlevel_id=:firstlevel_id and "); } if (isSetted_content_state) { sBuffer.append("content_state=:content_state and "); } if (isSetted_audit_userid) { sBuffer.append("audit_userid=:audit_userid and "); } if (isSetted_audit_username) { sBuffer.append("audit_username=:audit_username and "); } if (isSetted_audit_state) { sBuffer.append("audit_state=:audit_state and "); } if (isSetted_apply_note) { sBuffer.append("apply_note=:apply_note and "); } if (isSetted_audit_note) { sBuffer.append("audit_note=:audit_note and "); } if (isSetted_original_id) { sBuffer.append("original_id=:original_id and "); } if (isSetted_before_version) { sBuffer.append("before_version=:before_version and "); } if (isSetted_after_version) { sBuffer.append("after_version=:after_version and "); } if (isSetted_access_type) { sBuffer.append("access_type=:access_type and "); } String sql = sBuffer.toString(); sql = StringUtils.removeEnd(sql, " and "); return dao.queryForBean(sql,this); } @Override public String getTableName() { return "KM_LIBRARY_TEMP"; } public Map getBeanValues(){ return this.BEAN_VALUES; } @Override public KM_LIBRARY_TEMP insert() { if (StringUtils.isBlank(id)) { this.setId(StringUtil.getUUID()); } dao.execute(getInsertSql(),BEAN_VALUES); return this; } @Override public KM_LIBRARY_TEMP update() { if (StringUtils.isBlank(id)) { throw new RuntimeException("更新Bean时ID不能为空"); } dao.execute(getUpdateSql(),BEAN_VALUES); return this; } public KM_LIBRARY_TEMP 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 KM_LIBRARY_TEMP 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("TITLE"); BEAN_VALUES.put("title",obj); this.setTitle(ConvertUtil.obj2Str(obj)); obj = rs.getObject("TAG"); BEAN_VALUES.put("tag",obj); this.setTag(ConvertUtil.obj2Str(obj)); obj = rs.getObject("SUMMARY"); BEAN_VALUES.put("summary",obj); this.setSummary(ConvertUtil.obj2Str(obj)); obj = rs.getObject("CONTENT"); BEAN_VALUES.put("content",obj); this.setContent(ConvertUtil.obj2Str(obj)); obj = rs.getObject("CATEGORY_ID"); BEAN_VALUES.put("category_id",obj); this.setCategory_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("CATEGORY_NAME"); BEAN_VALUES.put("category_name",obj); this.setCategory_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("CREATE_USER_ID"); BEAN_VALUES.put("create_user_id",obj); this.setCreate_user_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("CREATE_USER_NAME"); BEAN_VALUES.put("create_user_name",obj); this.setCreate_user_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("CREATE_TIME"); BEAN_VALUES.put("create_time",obj); this.setCreate_time(ConvertUtil.obj2Long(obj)); obj = rs.getObject("STATE"); BEAN_VALUES.put("state",obj); this.setState(ConvertUtil.obj2Integer(obj)); obj = rs.getObject("VERSION"); BEAN_VALUES.put("version",obj); this.setVersion(ConvertUtil.obj2Str(obj)); obj = rs.getObject("HITS"); BEAN_VALUES.put("hits",obj); this.setHits(ConvertUtil.obj2Integer(obj)); obj = rs.getObject("IS_EDITOR"); BEAN_VALUES.put("is_editor",obj); this.setIs_editor(ConvertUtil.obj2Integer(obj)); obj = rs.getObject("THIRDLEVEL_NAME"); BEAN_VALUES.put("thirdlevel_name",obj); this.setThirdlevel_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("THIRDLEVEL_ID"); BEAN_VALUES.put("thirdlevel_id",obj); this.setThirdlevel_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("FIRST_CATEGORY_ID"); BEAN_VALUES.put("first_category_id",obj); this.setFirst_category_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("FIRST_CATEGORY_NAME"); BEAN_VALUES.put("first_category_name",obj); this.setFirst_category_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("SECOND_CATEGORY_ID"); BEAN_VALUES.put("second_category_id",obj); this.setSecond_category_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("SECOND_CATEGORY_NAME"); BEAN_VALUES.put("second_category_name",obj); this.setSecond_category_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("THIRD_CATEGORY_ID"); BEAN_VALUES.put("third_category_id",obj); this.setThird_category_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("THIRD_CATEGORY_NAME"); BEAN_VALUES.put("third_category_name",obj); this.setThird_category_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("UPDATE_DATE"); BEAN_VALUES.put("update_date",obj); this.setUpdate_date(ConvertUtil.obj2Long(obj)); obj = rs.getObject("UPDATER_ID"); BEAN_VALUES.put("updater_id",obj); this.setUpdater_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("UPDATE_NAME"); BEAN_VALUES.put("update_name",obj); this.setUpdate_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("SECOND_KNOWCATEGORY_ID"); BEAN_VALUES.put("second_knowcategory_id",obj); this.setSecond_knowcategory_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("SECOND_KNOWCATEGORY_NAME"); BEAN_VALUES.put("second_knowcategory_name",obj); this.setSecond_knowcategory_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("FIRST_KNOWCATEGORY_ID"); BEAN_VALUES.put("first_knowcategory_id",obj); this.setFirst_knowcategory_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("FIRST_KNOWCATEGORY_NAME"); BEAN_VALUES.put("first_knowcategory_name",obj); this.setFirst_knowcategory_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("SECONDLEVEL_NAME"); BEAN_VALUES.put("secondlevel_name",obj); this.setSecondlevel_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("SECONDLEVEL_ID"); BEAN_VALUES.put("secondlevel_id",obj); this.setSecondlevel_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("FIRSTLEVEL_NAME"); BEAN_VALUES.put("firstlevel_name",obj); this.setFirstlevel_name(ConvertUtil.obj2Str(obj)); obj = rs.getObject("FIRSTLEVEL_ID"); BEAN_VALUES.put("firstlevel_id",obj); this.setFirstlevel_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("CONTENT_STATE"); BEAN_VALUES.put("content_state",obj); this.setContent_state(ConvertUtil.obj2Integer(obj)); obj = rs.getObject("AUDIT_USERID"); BEAN_VALUES.put("audit_userid",obj); this.setAudit_userid(ConvertUtil.obj2Str(obj)); obj = rs.getObject("AUDIT_USERNAME"); BEAN_VALUES.put("audit_username",obj); this.setAudit_username(ConvertUtil.obj2Str(obj)); obj = rs.getObject("AUDIT_STATE"); BEAN_VALUES.put("audit_state",obj); this.setAudit_state(ConvertUtil.obj2Integer(obj)); obj = rs.getObject("APPLY_NOTE"); BEAN_VALUES.put("apply_note",obj); this.setApply_note(ConvertUtil.obj2Str(obj)); obj = rs.getObject("AUDIT_NOTE"); BEAN_VALUES.put("audit_note",obj); this.setAudit_note(ConvertUtil.obj2Str(obj)); obj = rs.getObject("ORIGINAL_ID"); BEAN_VALUES.put("original_id",obj); this.setOriginal_id(ConvertUtil.obj2Str(obj)); obj = rs.getObject("BEFORE_VERSION"); BEAN_VALUES.put("before_version",obj); this.setBefore_version(ConvertUtil.obj2Integer(obj)); obj = rs.getObject("AFTER_VERSION"); BEAN_VALUES.put("after_version",obj); this.setAfter_version(ConvertUtil.obj2Integer(obj)); obj = rs.getObject("ACCESS_TYPE"); BEAN_VALUES.put("access_type",obj); this.setAccess_type(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 KM_LIBRARY_TEMP newInstance(){ return new KM_LIBRARY_TEMP(); } }