category.java
来自「网上商店 新增功能: 1」· Java 代码 · 共 75 行
JAVA
75 行
package netstore.businessobjects;
import java.io.Serializable;
import java.util.Set;
import java.util.HashSet;
import org.apache.commons.lang.builder.ToStringBuilder;
public class Category extends BaseBusinessObject implements Serializable {
//名称
private String name;
//父目录
private Category parentCategory;
//产品s
private Set items=new HashSet();
//子目录
private Set childCategories=new HashSet();
public Category(String name, Integer version, netstore.businessobjects.Category parentCategory, Set items, Set childCategories) {
super(version);
this.name = name;
this.parentCategory = parentCategory;
this.items = items;
this.childCategories = childCategories;
}
public Category() {
}
public Category(Set items, Set childCategories) {
this.items = items;
this.childCategories = childCategories;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Category getParentCategory() {
return this.parentCategory;
}
public void setParentCategory(Category parentCategory) {
this.parentCategory = parentCategory;
}
public Set getItems() {
return this.items;
}
public void setItems(Set items) {
this.items = items;
}
public Set getChildCategories() {
return this.childCategories;
}
public void setChildCategories(Set childCategories) {
this.childCategories = childCategories;
}
public String toString() {
return new ToStringBuilder(this)
.append("id", getId())
.toString();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?