1 20 package org.apache.directory.ldapstudio.apacheds.configuration.model; 21 22 23 import java.util.ArrayList ; 24 import java.util.List ; 25 26 import javax.naming.directory.Attributes ; 27 import javax.naming.directory.BasicAttributes ; 28 29 30 36 public class Partition 37 { 38 39 private String name; 40 41 42 private int cacheSize; 43 44 45 private String suffix; 46 47 48 private boolean enableOptimizer; 49 50 51 private boolean synchronizationOnWrite; 52 53 54 private Attributes contextEntry; 55 56 57 private List <IndexedAttribute> indexedAttributes; 58 59 60 private boolean systemPartition = false; 61 62 63 66 public Partition() 67 { 68 indexedAttributes = new ArrayList <IndexedAttribute>(); 69 contextEntry = new BasicAttributes ( true ); 70 } 71 72 73 79 public Partition( String name ) 80 { 81 indexedAttributes = new ArrayList <IndexedAttribute>(); 82 contextEntry = new BasicAttributes ( true ); 83 this.name = name; 84 } 85 86 87 93 public String getName() 94 { 95 return this.name; 96 } 97 98 99 105 public void setName( String name ) 106 { 107 this.name = name; 108 } 109 110 111 117 public int getCacheSize() 118 { 119 return cacheSize; 120 } 121 122 123 129 public void setCacheSize( int cacheSize ) 130 { 131 this.cacheSize = cacheSize; 132 } 133 134 135 141 public Attributes getContextEntry() 142 { 143 return contextEntry; 144 } 145 146 147 153 public void setContextEntry( Attributes contextEntry ) 154 { 155 this.contextEntry = contextEntry; 156 } 157 158 159 165 public boolean isEnableOptimizer() 166 { 167 return enableOptimizer; 168 } 169 170 171 177 public void setEnableOptimizer( boolean enableOptimizer ) 178 { 179 this.enableOptimizer = enableOptimizer; 180 } 181 182 183 189 public List <IndexedAttribute> getIndexedAttributes() 190 { 191 return indexedAttributes; 192 } 193 194 195 201 public void setIndexedAttributes( List <IndexedAttribute> indexedAttributes ) 202 { 203 this.indexedAttributes = indexedAttributes; 204 } 205 206 207 215 public boolean addIndexedAttribute( IndexedAttribute indexedAttribute ) 216 { 217 return indexedAttributes.add( indexedAttribute ); 218 } 219 220 221 229 public boolean removeIndexedAttribute( IndexedAttribute indexedAttribute ) 230 { 231 return indexedAttributes.remove( indexedAttribute ); 232 } 233 234 235 241 public String getSuffix() 242 { 243 return suffix; 244 } 245 246 247 253 public void setSuffix( String suffix ) 254 { 255 this.suffix = suffix; 256 } 257 258 259 265 public boolean isSynchronizationOnWrite() 266 { 267 return synchronizationOnWrite; 268 } 269 270 271 277 public void setSynchronizationOnWrite( boolean synchronizationOnWrite ) 278 { 279 this.synchronizationOnWrite = synchronizationOnWrite; 280 } 281 282 283 289 public boolean isSystemPartition() 290 { 291 return systemPartition; 292 } 293 294 295 301 public void setSystemPartition( boolean systemPartition ) 302 { 303 this.systemPartition = systemPartition; 304 } 305 306 307 310 public String toString() 311 { 312 return name; 313 } 314 } 315 | Popular Tags |