public class CursorList extends org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry> implements EntryFilteringCursor
List
of Cursor
s. Optionally, the
Cursor may be limited to a specific range within the list.
This class is modeled based on the implementation of ListCursor
WARN this is only used internally !Constructor and Description |
---|
CursorList(int start,
List<EntryFilteringCursor> list,
int end,
SearchOperationContext searchContext)
Creates a new ListCursor with lower (inclusive) and upper (exclusive)
bounds.
|
CursorList(List<EntryFilteringCursor> list,
SearchOperationContext searchContext)
Creates a new ListCursor without specific bounds: the bounds are
acquired from the size of the list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEntryFilter(EntryFilter filter)
Adds an entry filter to this BaseEntryFilteringCursor at the very end of
the filter list.
|
void |
after(org.apache.directory.api.ldap.model.entry.Entry element) |
void |
afterLast() |
boolean |
available() |
void |
before(org.apache.directory.api.ldap.model.entry.Entry element) |
void |
beforeFirst() |
void |
close() |
void |
close(Exception reason) |
boolean |
first() |
org.apache.directory.api.ldap.model.entry.Entry |
get() |
List<EntryFilter> |
getEntryFilters()
Gets an unmodifiable list of EntryFilters applied.
|
SearchOperationContext |
getOperationContext() |
boolean |
isAbandoned() |
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isClosed() |
boolean |
isFirst() |
boolean |
isLast() |
Iterator<org.apache.directory.api.ldap.model.entry.Entry> |
iterator() |
boolean |
last() |
boolean |
next() |
boolean |
previous() |
void |
setAbandoned(boolean abandoned) |
void |
setClosureMonitor(org.apache.directory.api.ldap.model.cursor.ClosureMonitor monitor) |
checkNotClosed, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public CursorList(int start, List<EntryFilteringCursor> list, int end, SearchOperationContext searchContext)
start
- the lower bound indexlist
- the list this ListCursor operates onend
- the upper bound indexsearchContext
- The SearchContext instancepublic CursorList(List<EntryFilteringCursor> list, SearchOperationContext searchContext)
list
- the backing for this ListCursorsearchContext
- The SearchContext instancepublic boolean available()
available
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
public void before(org.apache.directory.api.ldap.model.entry.Entry element) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
before
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public void after(org.apache.directory.api.ldap.model.entry.Entry element) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
after
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public void beforeFirst() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
beforeFirst
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public void afterLast() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
afterLast
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public boolean first() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
first
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public boolean last() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
last
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public boolean isFirst()
isFirst
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
isFirst
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
public boolean isLast()
isLast
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
isLast
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
public boolean isAfterLast()
isAfterLast
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
isAfterLast
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
public boolean isBeforeFirst()
isBeforeFirst
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
isBeforeFirst
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
public boolean previous() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
previous
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public boolean next() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
next
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public org.apache.directory.api.ldap.model.entry.Entry get() throws org.apache.directory.api.ldap.model.cursor.CursorException
get
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
org.apache.directory.api.ldap.model.cursor.CursorException
public boolean addEntryFilter(EntryFilter filter)
addEntryFilter
in interface EntryFilteringCursor
filter
- a filter to apply to the entriesList.add(Object)
public List<EntryFilter> getEntryFilters()
getEntryFilters
in interface EntryFilteringCursor
public SearchOperationContext getOperationContext()
getOperationContext
in interface EntryFilteringCursor
public boolean isAbandoned()
public void setAbandoned(boolean abandoned)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
public void close(Exception reason)
close
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
close
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
public boolean isClosed()
isClosed
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
isClosed
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
public void setClosureMonitor(org.apache.directory.api.ldap.model.cursor.ClosureMonitor monitor)
setClosureMonitor
in interface org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry>
setClosureMonitor
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.entry.Entry>
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.