1 7 8 9 package javax.naming.directory; 10 11 25 26 public class SearchControls implements java.io.Serializable { 27 42 public final static int OBJECT_SCOPE = 0; 43 44 56 public final static int ONELEVEL_SCOPE = 1; 57 78 public final static int SUBTREE_SCOPE = 2; 79 80 86 private int searchScope; 87 88 93 private int timeLimit; 94 95 100 private boolean derefLink; 101 102 106 private boolean returnObj; 107 108 112 private long countLimit; 113 114 120 private String [] attributesToReturn; 121 122 136 public SearchControls() { 137 searchScope = ONELEVEL_SCOPE; 138 timeLimit = 0; countLimit = 0; derefLink = false; 141 returnObj = false; 142 attributesToReturn = null; } 144 145 160 public SearchControls(int scope, 161 long countlim, 162 int timelim, 163 String [] attrs, 164 boolean retobj, 165 boolean deref) { 166 searchScope = scope; 167 timeLimit = timelim; derefLink = deref; 169 returnObj = retobj; 170 countLimit = countlim; attributesToReturn = attrs; } 173 174 182 public int getSearchScope() { 183 return searchScope; 184 } 185 186 193 public int getTimeLimit() { 194 return timeLimit; 195 } 196 197 203 public boolean getDerefLinkFlag() { 204 return derefLink; 205 } 206 207 213 public boolean getReturningObjFlag() { 214 return returnObj; 215 } 216 217 225 public long getCountLimit() { 226 return countLimit; 227 } 228 229 239 public String [] getReturningAttributes() { 240 return attributesToReturn; 241 } 242 243 249 public void setSearchScope(int scope) { 250 searchScope = scope; 251 } 252 253 260 public void setTimeLimit(int ms) { 261 timeLimit = ms; 262 } 263 264 270 public void setDerefLinkFlag(boolean on) { 271 derefLink = on; 272 } 273 274 284 public void setReturningObjFlag(boolean on) { 285 returnObj = on; 286 } 287 288 297 public void setCountLimit(long limit) { 298 countLimit = limit; 299 } 300 301 311 public void setReturningAttributes(String [] attrs) { 312 attributesToReturn = attrs; 313 } 314 315 318 private static final long serialVersionUID = -2480540967773454797L; 319 } 320 | Popular Tags |