f92d6d691a89fa1637f0d76ee6a3d2dfdd49d3b0.svn-base 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. package com.sinosoft.lz.system.menu.vo;
  2. import java.util.ArrayList;
  3. public class SysMenuTreeNode{
  4. // 菜单树辅助类
  5. // private String fd_objectid;
  6. private String id; // menu_id;
  7. private String parentId; // parent_menu_id;
  8. private String menu_name;
  9. private String menu_url;
  10. private String sortno;
  11. private String menu_img;
  12. private String isParent;
  13. private ArrayList<SysMenuTreeNode> children = new ArrayList<SysMenuTreeNode>();
  14. public SysMenuTreeNode(String id, String parentId, String menu_name, String menu_url,
  15. String sortno, String menu_img) {
  16. super();
  17. this.id = id;
  18. this.parentId = parentId;
  19. this.menu_name = menu_name;
  20. this.menu_url = menu_url;
  21. this.sortno = sortno;
  22. this.menu_img = menu_img;
  23. }
  24. public SysMenuTreeNode(String id, String parentId, String menu_name, String menu_url,
  25. String sortno, String menu_img, String isParent) {
  26. super();
  27. this.id = id;
  28. this.parentId = parentId;
  29. this.menu_name = menu_name;
  30. this.menu_url = menu_url;
  31. this.sortno = sortno;
  32. this.menu_img = menu_img;
  33. this.isParent = isParent;
  34. }
  35. public void add(SysMenuTreeNode node) {// 递归添加节点
  36. if ("0".equals(node.parentId)) {
  37. this.children.add(node);
  38. } else if (node.parentId.equals(this.id)) {
  39. this.children.add(node);
  40. } else {
  41. for (SysMenuTreeNode tmp_node : children) {
  42. tmp_node.add(node);
  43. }
  44. }
  45. }
  46. public String getId() {
  47. return id;
  48. }
  49. public void setId(String id) {
  50. this.id = id;
  51. }
  52. public String getParentId() {
  53. return parentId;
  54. }
  55. public void setParentId(String parentId) {
  56. this.parentId = parentId;
  57. }
  58. public String getMenu_name() {
  59. return menu_name;
  60. }
  61. public void setMenu_name(String menu_name) {
  62. this.menu_name = menu_name;
  63. }
  64. public String getMenu_url() {
  65. return menu_url;
  66. }
  67. public void setMenu_url(String menu_url) {
  68. this.menu_url = menu_url;
  69. }
  70. public String getSortno() {
  71. return sortno;
  72. }
  73. public void setSortno(String sortno) {
  74. this.sortno = sortno;
  75. }
  76. public String getMenu_img() {
  77. return menu_img;
  78. }
  79. public void setMenu_img(String menu_img) {
  80. this.menu_img = menu_img;
  81. }
  82. public ArrayList<SysMenuTreeNode> getChildren() {
  83. return children;
  84. }
  85. public void setChildren(ArrayList<SysMenuTreeNode> children) {
  86. this.children = children;
  87. }
  88. public String getIsParent() {
  89. return isParent;
  90. }
  91. public void setIsParent(String isParent) {
  92. this.isParent = isParent;
  93. }
  94. }