1 package com.liferay.contacts.util;
3 public class ProxyList implements Comparable<ProxyList> {
4 private String name = "";
5 private String type = "";
6 private String listeId = "";
7 private String orgId = "";
8 private String etabId = "";
9 private String roleId = "";
10 private String parentList;
11 private String childrenList;
12 private boolean includeInOrgLoop;
15 public ProxyList(String name,
21 boolean includeInOrgLoop){
28 setIncludeInOrgLoop(includeInOrgLoop);
29 setParentList("false");
30 setChildrenList("false");
33 public ProxyList(String name,
39 boolean includeInOrgLoop,
41 boolean isChildrenList){
48 setIncludeInOrgLoop(includeInOrgLoop);
49 setParentList(isParentList?"true":"false");
50 setChildrenList(isChildrenList?"true":"false");
53 public String getName() {
57 public void setName(String name) {
61 public String getType() {
65 public void setType(String type) {
69 public String getListeId() {
73 public void setListeId(String listeId) {
74 this.listeId = listeId;
77 public String getOrgId() {
81 public void setOrgID(String orgId) {
85 public String getEtabId() {
89 public void setEtabId(String etabId) {
93 public String getRoleId() {
97 public void setRoleId(String roleId) {
101 public String getParentList() {
105 public void setParentList(String parentList) {
106 this.parentList = parentList;
109 public String getChildrenList() {
113 public void setChildrenList(String childrenList) {
114 this.childrenList = childrenList;
117 public boolean getIncludeInOrgLoop() {
118 return includeInOrgLoop;
121 public void setIncludeInOrgLoop(boolean includeInOrgLoop) {
122 this.includeInOrgLoop = includeInOrgLoop;
125 @Override public boolean equals(Object anObj) {
126 if ( this == anObj ) return true;
127 if ( !(anObj instanceof ProxyList) ) return false;
129 //cast to native object is now safe
130 ProxyList obj = (ProxyList)anObj;
132 this.getType().equals(obj.getType()) &&
133 this.getListeId().equals(obj.getListeId()) &&
134 this.getOrgId().equals(obj.getOrgId()) &&
135 this.getEtabId().equals(obj.getEtabId()) &&
136 this.getRoleId().equals(obj.getRoleId()) &&
137 this.getIncludeInOrgLoop() == obj.getIncludeInOrgLoop();
141 public int compareTo(ProxyList o) {
142 // TODO Auto-generated method stub
143 return o.getName().compareTo(this.getName());