public class PagedSearchContext extends Object
Constructor and Description |
---|
PagedSearchContext(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest)
Creates a new instance of this class, storing the SearchRequest into it.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getCookie()
Compute a new key for this cookie, based on the current searchRequest
hashCode and the current position.
|
int |
getCookieValue() |
int |
getCurrentPosition() |
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> |
getCursor() |
byte[] |
getNewCookie()
Compute a new cookie, if the previous one already exists.
|
org.apache.directory.api.ldap.model.message.SearchRequest |
getPreviousSearchRequest() |
boolean |
hasSameRequest(org.apache.directory.api.ldap.model.message.SearchRequest request,
LdapSession session)
Compare the previous search request and the new one, and return
true if they are equal.
|
void |
incrementCurrentPosition(int returnedEntries)
Set the new current position, incrementing it with the
number of returned entries.
|
void |
setCursor(org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> cursor)
Set the new cursor for this search request
|
String |
toString() |
public PagedSearchContext(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest)
searchRequest
- The SearchRequestpublic byte[] getCookie()
public int getCookieValue()
public byte[] getNewCookie()
public boolean hasSameRequest(org.apache.directory.api.ldap.model.message.SearchRequest request, LdapSession session)
request
- The new SearchRequestsession
- The LdapSession in usepublic int getCurrentPosition()
public void incrementCurrentPosition(int returnedEntries)
returnedEntries
- The number of returned entriespublic org.apache.directory.api.ldap.model.message.SearchRequest getPreviousSearchRequest()
public org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> getCursor()
public void setCursor(org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> cursor)
cursor
- The associated cursorpublic String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.