zoukankan      html  css  js  c++  java
  • 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;
    	}
    
    	
    }

  • 相关阅读:
    NET Office 组件Spire
    Tasks.Parallel
    vue 2.0-1
    ESLint 检查代码质量
    找到 OSChina 早上 8 点钟容易宕机的原因 ?
    MySQL索引 专题
    SqlMapConfig.xml全局配置文件解析
    mybatis mapper namespace
    resultMap之collection聚集
    Uploadify 控件上传图片 + 预览
  • 原文地址:https://www.cnblogs.com/a1111/p/12816276.html
Copyright © 2011-2022 走看看