org.apache.directory.server.core.partition.impl.btree
Class EntryCursorAdaptor<ID extends Comparable<ID>>

java.lang.Object
  extended by org.apache.directory.server.core.partition.impl.btree.EntryCursorAdaptor<ID>
All Implemented Interfaces:
Iterable<org.apache.directory.shared.ldap.model.entry.Entry>, org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>

public class EntryCursorAdaptor<ID extends Comparable<ID>>
extends Object
implements org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>

Adapts index cursors to return just Entry objects.

Author:
Apache Directory Project

Constructor Summary
EntryCursorAdaptor(AbstractBTreePartition<ID> db, IndexCursor<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> indexCursor)
           
 
Method Summary
 void after(org.apache.directory.shared.ldap.model.entry.Entry element)
           
 void afterLast()
           
 boolean available()
           
 void before(org.apache.directory.shared.ldap.model.entry.Entry element)
           
 void beforeFirst()
           
 void close()
           
 void close(Exception e)
           
 boolean first()
           
 org.apache.directory.shared.ldap.model.entry.Entry get()
           
 boolean isAfterLast()
          
 boolean isBeforeFirst()
          
 boolean isClosed()
           
 boolean isFirst()
          
 boolean isLast()
          
 Iterator<org.apache.directory.shared.ldap.model.entry.Entry> iterator()
           
 boolean last()
           
 boolean next()
           
 boolean previous()
           
 void setClosureMonitor(org.apache.directory.shared.ldap.model.cursor.ClosureMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryCursorAdaptor

public EntryCursorAdaptor(AbstractBTreePartition<ID> db,
                          IndexCursor<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> indexCursor)
Method Detail

after

public void after(org.apache.directory.shared.ldap.model.entry.Entry element)
           throws Exception
Specified by:
after in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

afterLast

public void afterLast()
               throws Exception
Specified by:
afterLast in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

available

public boolean available()
Specified by:
available in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>

before

public void before(org.apache.directory.shared.ldap.model.entry.Entry element)
            throws Exception
Specified by:
before in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

beforeFirst

public void beforeFirst()
                 throws Exception
Specified by:
beforeFirst in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

setClosureMonitor

public final void setClosureMonitor(org.apache.directory.shared.ldap.model.cursor.ClosureMonitor monitor)
Specified by:
setClosureMonitor in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>

close

public void close()
           throws Exception
Specified by:
close in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

close

public void close(Exception e)
           throws Exception
Specified by:
close in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

first

public boolean first()
              throws Exception
Specified by:
first in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

get

public org.apache.directory.shared.ldap.model.entry.Entry get()
                                                       throws Exception
Specified by:
get in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

isClosed

public boolean isClosed()
                 throws Exception
Specified by:
isClosed in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

last

public boolean last()
             throws Exception
Specified by:
last in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

next

public boolean next()
             throws Exception
Specified by:
next in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

previous

public boolean previous()
                 throws Exception
Specified by:
previous in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

iterator

public Iterator<org.apache.directory.shared.ldap.model.entry.Entry> iterator()
Specified by:
iterator in interface Iterable<org.apache.directory.shared.ldap.model.entry.Entry>

isAfterLast

public boolean isAfterLast()
                    throws Exception

Specified by:
isAfterLast in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

isBeforeFirst

public boolean isBeforeFirst()
                      throws Exception

Specified by:
isBeforeFirst in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

isFirst

public boolean isFirst()
                throws Exception

Specified by:
isFirst in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception

isLast

public boolean isLast()
               throws Exception

Specified by:
isLast in interface org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.entry.Entry>
Throws:
Exception


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