package com.consum.model.po; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnore; import com.walker.jdbc.BasePo; /** * 表名:BASE_CATEGORY * * @author genrator */ @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) public class BaseCategory extends BasePo { // 序列化版本号 private static final long serialVersionUID = 1L; // 主键 private Long id = null; @JsonIgnore protected boolean isset_id = false; // 属性列表 private String categoryName = null; @JsonIgnore protected boolean isset_categoryName = false; private String classification = null; @JsonIgnore protected boolean isset_classification = false; private Integer orderNumber = null; @JsonIgnore protected boolean isset_orderNumber = false; private Integer states = null; @JsonIgnore protected boolean isset_states = false; private Integer levels = null; @JsonIgnore protected boolean isset_levels = false; private Long fatherCategoryId = null; @JsonIgnore protected boolean isset_fatherCategoryId = false; /** * 默认构造函数 */ public BaseCategory() { } /** * 根据主键构造对象 */ public BaseCategory(Long id) { this.setId(id); } /** * 设置主键值 */ @Override public void setPkValue(Object value) { this.setId((Long) value); } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; this.isset_id = true; } @JsonIgnore public boolean isEmptyId() { return this.id == null; } public String getCategoryName() { return this.categoryName; } public void setCategoryName(String categoryName) { this.categoryName = categoryName; this.isset_categoryName = true; } @JsonIgnore public boolean isEmptyCategoryName() { return this.categoryName == null || this.categoryName.length() == 0; } public String getClassification() { return this.classification; } public void setClassification(String classification) { this.classification = classification; this.isset_classification = true; } @JsonIgnore public boolean isEmptyClassification() { return this.classification == null || this.classification.length() == 0; } public Integer getOrderNumber() { return this.orderNumber; } public void setOrderNumber(Integer orderNumber) { this.orderNumber = orderNumber; this.isset_orderNumber = true; } @JsonIgnore public boolean isEmptyOrderNumber() { return this.orderNumber == null; } public Integer getStates() { return this.states; } public void setStates(Integer states) { this.states = states; this.isset_states = true; } @JsonIgnore public boolean isEmptyStates() { return this.states == null; } public Integer getLevels() { return this.levels; } public void setLevels(Integer levels) { this.levels = levels; this.isset_levels = true; } @JsonIgnore public boolean isEmptyLevels() { return this.levels == null; } public Long getFatherCategoryId() { return this.fatherCategoryId; } public void setFatherCategoryId(Long fatherCategoryId) { this.fatherCategoryId = fatherCategoryId; this.isset_fatherCategoryId = true; } @JsonIgnore public boolean isEmptyFatherCategoryId() { return this.fatherCategoryId == null; } /** * 重写 toString() 方法 */ @Override public String toString() { return new StringBuilder() .append("id=").append(this.id) .append("categoryName=").append(this.categoryName) .append("classification=").append(this.classification) .append("orderNumber=").append(this.orderNumber) .append("states=").append(this.states) .append("levels=").append(this.levels) .append("fatherCategoryId=").append(this.fatherCategoryId) .toString(); } /** * 克隆 */ public BaseCategory $clone() { BaseCategory base_category = new BaseCategory(); // 数据库名称 //base_category.setDatabaseName_(this.getDatabaseName_()); // 主键 if (this.isset_id) { base_category.setId(this.getId()); } // 普通属性 if (this.isset_categoryName) { base_category.setCategoryName(this.getCategoryName()); } if (this.isset_classification) { base_category.setClassification(this.getClassification()); } if (this.isset_orderNumber) { base_category.setOrderNumber(this.getOrderNumber()); } if (this.isset_states) { base_category.setStates(this.getStates()); } if (this.isset_levels) { base_category.setLevels(this.getLevels()); } if (this.isset_fatherCategoryId) { base_category.setFatherCategoryId(this.getFatherCategoryId()); } return base_category; } }