--- /dev/null
+package com.liferay.contacts.util;
+
+public class ProxyList implements Comparable<ProxyList> {
+ private String name = "";
+ private String type = "";
+ private String listeId = "";
+ private String orgId = "";
+ private String etabId = "";
+ private String roleId = "";
+ private String parentList;
+ private String childrenList;
+ private boolean includeInOrgLoop;
+
+
+ public ProxyList(String name,
+ String type,
+ String listeId,
+ String orgId,
+ String etabId,
+ String roleId,
+ boolean includeInOrgLoop){
+ setName(name);
+ setType(type);
+ setListeId(listeId);
+ setOrgID(orgId);
+ setEtabId(etabId);
+ setRoleId(roleId);
+ setIncludeInOrgLoop(includeInOrgLoop);
+ setParentList("false");
+ setChildrenList("false");
+ }
+
+ public ProxyList(String name,
+ String type,
+ String listeId,
+ String orgId,
+ String etabId,
+ String roleId,
+ boolean includeInOrgLoop,
+ boolean isParentList,
+ boolean isChildrenList){
+ setName(name);
+ setType(type);
+ setListeId(listeId);
+ setOrgID(orgId);
+ setEtabId(etabId);
+ setRoleId(roleId);
+ setIncludeInOrgLoop(includeInOrgLoop);
+ setParentList(isParentList?"true":"false");
+ setChildrenList(isChildrenList?"true":"false");
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getListeId() {
+ return listeId;
+ }
+
+ public void setListeId(String listeId) {
+ this.listeId = listeId;
+ }
+
+ public String getOrgId() {
+ return orgId;
+ }
+
+ public void setOrgID(String orgId) {
+ this.orgId = orgId;
+ }
+
+ public String getEtabId() {
+ return etabId;
+ }
+
+ public void setEtabId(String etabId) {
+ this.etabId = etabId;
+ }
+
+ public String getRoleId() {
+ return roleId;
+ }
+
+ public void setRoleId(String roleId) {
+ this.roleId = roleId;
+ }
+
+ public String getParentList() {
+ return parentList;
+ }
+
+ public void setParentList(String parentList) {
+ this.parentList = parentList;
+ }
+
+ public String getChildrenList() {
+ return childrenList;
+ }
+
+ public void setChildrenList(String childrenList) {
+ this.childrenList = childrenList;
+ }
+
+ public boolean getIncludeInOrgLoop() {
+ return includeInOrgLoop;
+ }
+
+ public void setIncludeInOrgLoop(boolean includeInOrgLoop) {
+ this.includeInOrgLoop = includeInOrgLoop;
+ }
+
+ @Override public boolean equals(Object anObj) {
+ if ( this == anObj ) return true;
+ if ( !(anObj instanceof ProxyList) ) return false;
+
+ //cast to native object is now safe
+ ProxyList obj = (ProxyList)anObj;
+ return
+ this.getType().equals(obj.getType()) &&
+ this.getListeId().equals(obj.getListeId()) &&
+ this.getOrgId().equals(obj.getOrgId()) &&
+ this.getEtabId().equals(obj.getEtabId()) &&
+ this.getRoleId().equals(obj.getRoleId()) &&
+ this.getIncludeInOrgLoop() == obj.getIncludeInOrgLoop();
+ }
+
+
+ public int compareTo(ProxyList o) {
+ // TODO Auto-generated method stub
+ return o.getName().compareTo(this.getName());
+ }
+
+}