1 17 package org.apache.ldap.server.db; 18 19 20 import org.apache.ldap.common.schema.AttributeType; 21 import org.apache.regexp.RE; 22 23 import javax.naming.NamingException ; 24 import javax.naming.directory.Attribute ; 25 import javax.naming.directory.Attributes ; 26 import java.math.BigInteger ; 27 28 29 35 public interface Index 36 { 37 42 AttributeType getAttribute(); 43 44 51 Object getNormalized( Object attrVal ) throws NamingException ; 52 53 59 int count() throws NamingException ; 60 61 69 int count( Object attrVal ) throws NamingException ; 70 71 79 int count( Object attrVal, boolean isGreaterThan ) throws NamingException ; 80 81 88 BigInteger forwardLookup( Object attrVal ) throws NamingException ; 89 90 97 Object reverseLookup( BigInteger id ) throws NamingException ; 98 99 106 void add( Object attrVal, BigInteger id ) throws NamingException ; 107 108 115 void add( Attribute attr, BigInteger id ) throws NamingException ; 116 117 124 void add( Attributes attrs, BigInteger id ) throws NamingException ; 125 126 132 void drop( BigInteger entryId ) throws NamingException ; 133 134 141 void drop( Object attrVal, BigInteger id ) throws NamingException ; 142 143 151 void drop( Attribute attr, BigInteger id ) throws NamingException ; 152 153 161 void drop( Attributes attrs, BigInteger id ) throws NamingException ; 162 163 170 IndexEnumeration listReverseIndices( BigInteger id ) throws NamingException ; 171 172 178 IndexEnumeration listIndices() throws NamingException ; 179 180 187 IndexEnumeration listIndices( Object attrVal ) throws NamingException ; 188 189 197 IndexEnumeration listIndices( Object attrVal, boolean isGreaterThan ) 198 throws NamingException ; 199 200 207 IndexEnumeration listIndices( RE regex ) throws NamingException ; 208 209 217 IndexEnumeration listIndices( RE regex, String prefix ) 218 throws NamingException ; 219 220 228 boolean hasValue( Object attrVal, BigInteger id ) 229 throws NamingException ; 230 231 240 boolean hasValue( Object attrVal, BigInteger id, boolean isGreaterThan ) 241 throws NamingException ; 242 243 251 boolean hasValue( RE regex, BigInteger id ) throws NamingException ; 252 253 258 void close() throws NamingException ; 259 260 265 void sync() throws NamingException ; 266 } 267 | Popular Tags |