org.apache.directory.server.xdbm.search.impl
Class PresenceCursor<ID extends Comparable<ID>>

java.lang.Object
  extended by org.apache.directory.shared.ldap.model.cursor.AbstractCursor<IndexEntry<V,ID>>
      extended by org.apache.directory.server.xdbm.AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID>
          extended by org.apache.directory.server.xdbm.search.impl.PresenceCursor<ID>
All Implemented Interfaces:
Iterable<IndexEntry<String,ID>>, IndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID>, org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<String,ID>>

public class PresenceCursor<ID extends Comparable<ID>>
extends AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID>

A returning candidates satisfying an attribute presence expression.

Author:
Apache Directory Project

Constructor Summary
PresenceCursor(Store<org.apache.directory.shared.ldap.model.entry.Entry,ID> store, PresenceEvaluator<ID> presenceEvaluator)
           
 
Method Summary
 void after(IndexEntry<String,ID> element)
          
 void afterLast()
           
 void afterValue(ID id, String value)
          An alternative to calling after(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation.
 boolean available()
          
 void before(IndexEntry<String,ID> element)
          
 void beforeFirst()
           
 void beforeValue(ID id, String value)
          An alternative to calling before(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation.
 void close()
           
 boolean first()
           
 IndexEntry<String,ID> get()
           
protected  String getUnsupportedMessage()
          Gets the message to return for operations that are not supported
 boolean last()
           
 boolean next()
           
 boolean previous()
           
 
Methods inherited from class org.apache.directory.server.xdbm.AbstractIndexCursor
isAfterLast, isBeforeFirst, isFirst, isLast, iterator, setAvailable
 
Methods inherited from class org.apache.directory.shared.ldap.model.cursor.AbstractCursor
checkNotClosed, close, isClosed, setClosureMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.model.cursor.Cursor
close, isClosed, setClosureMonitor
 

Constructor Detail

PresenceCursor

public PresenceCursor(Store<org.apache.directory.shared.ldap.model.entry.Entry,ID> store,
                      PresenceEvaluator<ID> presenceEvaluator)
               throws Exception
Throws:
Exception
Method Detail

getUnsupportedMessage

protected String getUnsupportedMessage()
Gets the message to return for operations that are not supported

Specified by:
getUnsupportedMessage in class AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
Returns:
The Unsupported message

available

public boolean available()
Description copied from class: AbstractIndexCursor

Specified by:
available in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<String,ID extends Comparable<ID>>>
Overrides:
available in class AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>

beforeValue

public void beforeValue(ID id,
                        String value)
                 throws Exception
An alternative to calling before(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation. Some implementations may not support this operation and may throw an UnsupportedOperationEception.

Specified by:
beforeValue in interface IndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
Overrides:
beforeValue in class AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
Parameters:
id - the id for the entry
value - the value to advance just before
Throws:
Exception - if there are faults performing this operation

before

public void before(IndexEntry<String,ID> element)
            throws Exception

Specified by:
before in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<String,ID extends Comparable<ID>>>
Overrides:
before in class AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
Throws:
Exception

afterValue

public void afterValue(ID id,
                       String value)
                throws Exception
An alternative to calling after(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation. Some implementations may not support this operation and may throw an UnsupportedOperationEception.

Specified by:
afterValue in interface IndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
Overrides:
afterValue in class AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
Parameters:
id - the id for the entry
value - the value to advance just after the last value
Throws:
Exception - if there are faults performing this operation

after

public void after(IndexEntry<String,ID> element)
           throws Exception

Specified by:
after in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<String,ID extends Comparable<ID>>>
Overrides:
after in class AbstractIndexCursor<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
Throws:
Exception

beforeFirst

public void beforeFirst()
                 throws Exception
Throws:
Exception

afterLast

public void afterLast()
               throws Exception
Throws:
Exception

first

public boolean first()
              throws Exception
Throws:
Exception

last

public boolean last()
             throws Exception
Throws:
Exception

previous

public boolean previous()
                 throws Exception
Throws:
Exception

next

public boolean next()
             throws Exception
Throws:
Exception

get

public IndexEntry<String,ID> get()
                                                 throws Exception
Throws:
Exception

close

public void close()
           throws Exception
Specified by:
close in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<String,ID extends Comparable<ID>>>
Overrides:
close in class org.apache.directory.shared.ldap.model.cursor.AbstractCursor<IndexEntry<String,ID extends Comparable<ID>>>
Throws:
Exception


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.