表结构
实体类
package com.chuangmei.mybatis.beans;
import java.util.Set;
public class NewsLabel {
//新闻栏目
private Integer id;
private String name;
//关联属性
private Set<NewsLabel> children;
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the children
*/
public Set<NewsLabel> getChildren() {
return children;
}
/**
* @param children the children to set
*/