java实现遍历树形菜单方法——实体类VoteTree

package org.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * 
*    
* 项目名称:testTree   
* 类名称:VoteTree   
* 类描述:   树形菜单实体类
* 创建人:Mu Xiongxiong  
* 创建时间:2017-5-23 下午6:18:29   
* 修改人:Mu Xiongxiong   
* 修改时间:2017-5-23 下午6:18:29   
* 修改备注:   
* @version    
*
 */
public class VoteTree implements java.io.Serializable {

	// Fields

	/**
	* @Fields id : 编号
	*/
	private Long id;
	/**
	* @Fields text : 文字
	*/
	private String text;
	/**
	* @Fields pid :父目录的id
	*/
	private Long pid;
	/**
	* @Fields levels : 所在级别
	*/
	private Long levels;
	/**
	* @Fields children : 子节点集合
	*/
	private List children = new ArrayList();

	// Constructors


	/** minimal constructor */
	public VoteTree(Long id, String text) {
		this.id = id;
		this.text = text;
	}

	
	/** full constructor */
	public VoteTree(Long id, String text, Long pid) {
		this.id = id;
		this.text = text;
		this.pid = pid;
	}

	// Property accessors

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Long getPid() {
		return this.pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	

	public List getChildren() {
		return children;
	}


	public void setChildren(List children) {
		this.children = children;
	}


	public VoteTree(Long id, String text, Long pid, List children) {
		super();
		this.id = id;
		this.text = text;
		this.pid = pid;
		this.children = children;
	}


	public VoteTree() {
		super();
	}


	public Long getLevels() {
		return levels;
	}


	public void setLevels(Long levels) {
		this.levels = levels;
	}

	
}

posted @ 2017-05-23 19:19  穆雄雄  阅读(573)  评论(0编辑  收藏  举报