org.apache.directory.server.xdbm
Class EmptyIndexCursor<K,E,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<K,E,ID>
          extended by org.apache.directory.server.xdbm.EmptyIndexCursor<K,E,ID>
All Implemented Interfaces:
Iterable<IndexEntry<K,ID>>, IndexCursor<K,E,ID>, org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<K,ID>>

public class EmptyIndexCursor<K,E,ID>
extends AbstractIndexCursor<K,E,ID>

An empty Cursor implementation.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.xdbm.AbstractIndexCursor
UNSUPPORTED_MSG
 
Constructor Summary
EmptyIndexCursor()
           
 
Method Summary
 void after(IndexEntry<K,ID> element)
          
 void afterLast()
           
 void afterValue(ID id, K indexValue)
          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.
 void before(IndexEntry<K,ID> element)
          
 void beforeFirst()
           
 void beforeValue(ID id, K indexValue)
          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.
 boolean first()
           
 IndexEntry<K,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
available, isAfterLast, isBeforeFirst, isFirst, isLast, iterator, setAvailable
 
Methods inherited from class org.apache.directory.shared.ldap.model.cursor.AbstractCursor
checkNotClosed, close, 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, close, isClosed, setClosureMonitor
 

Constructor Detail

EmptyIndexCursor

public EmptyIndexCursor()
Method Detail

before

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

Specified by:
before in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<K,ID>>
Overrides:
before in class AbstractIndexCursor<K,E,ID>
Throws:
Exception

getUnsupportedMessage

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

Specified by:
getUnsupportedMessage in class AbstractIndexCursor<K,E,ID>
Returns:
The Unsupported message

after

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

Specified by:
after in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<K,ID>>
Overrides:
after in class AbstractIndexCursor<K,E,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<K,ID> get()
                     throws Exception
Throws:
Exception

afterValue

public void afterValue(ID id,
                       K indexValue)
                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<K,E,ID>
Overrides:
afterValue in class AbstractIndexCursor<K,E,ID>
Parameters:
id - the id for the entry
indexValue - the value to advance just after the last value
Throws:
Exception - if there are faults performing this operation

beforeValue

public void beforeValue(ID id,
                        K indexValue)
                 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<K,E,ID>
Overrides:
beforeValue in class AbstractIndexCursor<K,E,ID>
Parameters:
id - the id for the entry
indexValue - the value to advance just before
Throws:
Exception - if there are faults performing this operation


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