org.apache.ldap.server.db
Interface Index

All Known Implementing Classes:
JdbmIndex

public interface Index

Required interfaces for an index.

Version:
$Rev: 159259 $
Author:
Apache Directory Project

Method Summary
 void add(javax.naming.directory.Attribute attr, java.math.BigInteger id)
          TODO Document me!
 void add(javax.naming.directory.Attributes attrs, java.math.BigInteger id)
          TODO Document me!
 void add(java.lang.Object attrVal, java.math.BigInteger id)
          TODO Document me!
 void close()
          TODO Document me!
 int count()
          Gets the total scan count for this index.
 int count(java.lang.Object attrVal)
          Gets the scan count for the occurance of a specific attribute value within the index.
 int count(java.lang.Object attrVal, boolean isGreaterThan)
          TODO Document me!
 void drop(javax.naming.directory.Attribute attr, java.math.BigInteger id)
          If the Attribute does not have any values then this reduces to a drop(BigInteger) call.
 void drop(javax.naming.directory.Attributes attrs, java.math.BigInteger id)
          If the Attribute for this index within the Attributes does not have any values then this reduces to a drop(BigInteger) call.
 void drop(java.math.BigInteger entryId)
          TODO Document me!
 void drop(java.lang.Object attrVal, java.math.BigInteger id)
          TODO Document me!
 java.math.BigInteger forwardLookup(java.lang.Object attrVal)
          TODO Document me!
 org.apache.ldap.common.schema.AttributeType getAttribute()
          Gets the attribute this Index is built upon.
 java.lang.Object getNormalized(java.lang.Object attrVal)
          Gets the normalized value for an attribute.
 boolean hasValue(java.lang.Object attrVal, java.math.BigInteger id)
          TODO Document me!
 boolean hasValue(java.lang.Object attrVal, java.math.BigInteger id, boolean isGreaterThan)
          TODO Document me!
 boolean hasValue(org.apache.regexp.RE regex, java.math.BigInteger id)
          TODO Document me!
 IndexEnumeration listIndices()
          TODO Document me!
 IndexEnumeration listIndices(java.lang.Object attrVal)
          TODO Document me!
 IndexEnumeration listIndices(java.lang.Object attrVal, boolean isGreaterThan)
          TODO Document me!
 IndexEnumeration listIndices(org.apache.regexp.RE regex)
          TODO Document me!
 IndexEnumeration listIndices(org.apache.regexp.RE regex, java.lang.String prefix)
          TODO Document me!
 IndexEnumeration listReverseIndices(java.math.BigInteger id)
          TODO Document me!
 java.lang.Object reverseLookup(java.math.BigInteger id)
          TODO Document me!
 void sync()
          TODO Document me!
 

Method Detail

getAttribute

public org.apache.ldap.common.schema.AttributeType getAttribute()
Gets the attribute this Index is built upon.

Returns:
the id of the Index's attribute

getNormalized

public java.lang.Object getNormalized(java.lang.Object attrVal)
                               throws javax.naming.NamingException
Gets the normalized value for an attribute.

Parameters:
attrVal - the user provided value to normalize
Returns:
the normalized value.
Throws:
javax.naming.NamingException - if something goes wrong.

count

public int count()
          throws javax.naming.NamingException
Gets the total scan count for this index.

Returns:
the number of key/value pairs in this index
Throws:
javax.naming.NamingException - if their is a failure accessing the index

count

public int count(java.lang.Object attrVal)
          throws javax.naming.NamingException
Gets the scan count for the occurance of a specific attribute value within the index.

Parameters:
attrVal - the value of the attribute to get a scan count for
Returns:
the number of key/value pairs in this index with the value value
Throws:
javax.naming.NamingException - if their is a failure accessing the index

count

public int count(java.lang.Object attrVal,
                 boolean isGreaterThan)
          throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
isGreaterThan - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

forwardLookup

public java.math.BigInteger forwardLookup(java.lang.Object attrVal)
                                   throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

reverseLookup

public java.lang.Object reverseLookup(java.math.BigInteger id)
                               throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

add

public void add(java.lang.Object attrVal,
                java.math.BigInteger id)
         throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
id - TODO
Throws:
javax.naming.NamingException - TODO

add

public void add(javax.naming.directory.Attribute attr,
                java.math.BigInteger id)
         throws javax.naming.NamingException
TODO Document me!

Parameters:
attr - TODO
id - TODO
Throws:
javax.naming.NamingException - TODO

add

public void add(javax.naming.directory.Attributes attrs,
                java.math.BigInteger id)
         throws javax.naming.NamingException
TODO Document me!

Parameters:
attrs - TODO
id - TODO
Throws:
javax.naming.NamingException - TODO

drop

public void drop(java.math.BigInteger entryId)
          throws javax.naming.NamingException
TODO Document me!

Parameters:
entryId - TODO
Throws:
javax.naming.NamingException - TODO

drop

public void drop(java.lang.Object attrVal,
                 java.math.BigInteger id)
          throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
id - TODO
Throws:
javax.naming.NamingException - TODO

drop

public void drop(javax.naming.directory.Attribute attr,
                 java.math.BigInteger id)
          throws javax.naming.NamingException
If the Attribute does not have any values then this reduces to a drop(BigInteger) call.

Parameters:
attr - TODO
id - TODO
Throws:
javax.naming.NamingException - TODO

drop

public void drop(javax.naming.directory.Attributes attrs,
                 java.math.BigInteger id)
          throws javax.naming.NamingException
If the Attribute for this index within the Attributes does not have any values then this reduces to a drop(BigInteger) call.

Parameters:
attrs - TODO
id - TODO
Throws:
javax.naming.NamingException - TODO

listReverseIndices

public IndexEnumeration listReverseIndices(java.math.BigInteger id)
                                    throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

listIndices

public IndexEnumeration listIndices()
                             throws javax.naming.NamingException
TODO Document me!

Returns:
TODO
Throws:
javax.naming.NamingException - TODO

listIndices

public IndexEnumeration listIndices(java.lang.Object attrVal)
                             throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

listIndices

public IndexEnumeration listIndices(java.lang.Object attrVal,
                                    boolean isGreaterThan)
                             throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
isGreaterThan - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

listIndices

public IndexEnumeration listIndices(org.apache.regexp.RE regex)
                             throws javax.naming.NamingException
TODO Document me!

Parameters:
regex - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

listIndices

public IndexEnumeration listIndices(org.apache.regexp.RE regex,
                                    java.lang.String prefix)
                             throws javax.naming.NamingException
TODO Document me!

Parameters:
regex - TODO
prefix - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

hasValue

public boolean hasValue(java.lang.Object attrVal,
                        java.math.BigInteger id)
                 throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

hasValue

public boolean hasValue(java.lang.Object attrVal,
                        java.math.BigInteger id,
                        boolean isGreaterThan)
                 throws javax.naming.NamingException
TODO Document me!

Parameters:
attrVal - TODO
id - TODO
isGreaterThan - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

hasValue

public boolean hasValue(org.apache.regexp.RE regex,
                        java.math.BigInteger id)
                 throws javax.naming.NamingException
TODO Document me!

Parameters:
regex - TODO
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

close

public void close()
           throws javax.naming.NamingException
TODO Document me!

Throws:
javax.naming.NamingException - TODO

sync

public void sync()
          throws javax.naming.NamingException
TODO Document me!

Throws:
javax.naming.NamingException - TODO


Copyright © 2002-2005 . All Rights Reserved.