1 package org.tigris.scarab.reports; 2 3 41 42 import java.util.List ; 43 import java.util.ArrayList ; 44 import org.apache.fulcrum.intake.Retrievable; 45 import org.apache.commons.lang.ObjectUtils; 46 47 52 public class ReportGroup 53 implements java.io.Serializable , 54 Retrievable 55 { 56 private String name; 57 58 private List reportOptionAttributes; 59 60 private List reportUserAttributes; 61 62 private String queryKey; 63 64 68 public String getName() 69 { 70 return name; 71 } 72 73 77 public void setName(String newName) 78 { 79 this.name = newName; 80 } 81 82 86 public List getReportOptionAttributes() 87 { 88 return reportOptionAttributes; 89 } 90 91 95 public void setReportOptionAttributes(List newReportOptionAttributes) 96 { 97 this.reportOptionAttributes = newReportOptionAttributes; 98 } 99 100 104 public void addReportOptionAttribute(ReportOptionAttribute newReportOptionAttribute) 105 { 106 if (reportOptionAttributes == null) 107 { 108 reportOptionAttributes = new ArrayList (); 109 } 110 reportOptionAttributes.add(newReportOptionAttribute); 111 } 112 113 117 public List getReportUserAttributes() 118 { 119 return reportUserAttributes; 120 } 121 122 126 public void setReportUserAttributes(List newReportUserAttributes) 127 { 128 this.reportUserAttributes = newReportUserAttributes; 129 } 130 131 135 public void addReportUserAttribute(ReportUserAttribute newReportUserAttribute) 136 { 137 if (reportUserAttributes == null) 138 { 139 reportUserAttributes = new ArrayList (); 140 } 141 reportUserAttributes.add(newReportUserAttribute); 142 } 143 144 147 public void reset() 148 { 149 reportOptionAttributes = null; 150 reportUserAttributes = null; 151 } 152 153 160 public boolean equals(Object obj) 161 { 162 boolean result = obj == this; 163 if (!result && obj instanceof ReportGroup) 164 { 165 result = ObjectUtils.equals(name, 166 ((ReportGroup)obj).getName()); 167 } 168 return result; 169 } 170 171 public int hashCode() 172 { 173 return name == null ? 0 : name.hashCode(); 174 } 175 176 180 public String getQueryKey() 181 { 182 return queryKey == null ? "" : queryKey; 183 } 184 185 189 public void setQueryKey(String newQueryKey) 190 { 191 this.queryKey = newQueryKey; 192 } 193 } 194 | Popular Tags |