/** * @see Object#equals(Object) */ @Override public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof PagedResults ) ) { return false; } PagedResults otherControl = ( PagedResults ) other; return super.equals( other ) && ( size == otherControl.getSize() ) && Arrays.equals( cookie, otherControl.getCookie() ); }
/** * Set the number of entry requested or returned * * @param size The number of entries */ @Override public void setSize( int size ) { getDecorated().setSize( size ); }
byte[] cookie = pagedSearchControl.getCookie(); int cookieValue = pagedSearchControl.getCookieValue(); PagedSearchContext psCookie = session.removePagedSearchContext( cookieValue ); pagedSearchControl.setCookie( psCookie.getCookie() ); pagedSearchControl.setSize( 0 ); pagedSearchControl.setCritical( true ); pagedSearchControl.setSize( 0 ); pagedSearchControl.setCritical( true );
} else if (PagedResultsControl.OID.equals(responseControl.getOid())) { final PagedResults c = (PagedResults) responseControl; ctl = new PagedResultsControl(c.getSize(), c.getCookie(), c.isCritical()); } else if (PasswordPolicyControl.OID.equals(responseControl.getOid())) { final PasswordPolicy c = (PasswordPolicy) responseControl;
/** * @return The stored cookie */ @Override public byte[] getCookie() { return getDecorated().getCookie(); }
private SearchRequest createSearchRequest(LdapConnection connection, byte[] cookie, @NotNull String[] userAttributes) throws LdapException { SearchRequest req = new SearchRequestImpl(); req.setScope(SearchScope.SUBTREE); if (userAttributes.length == 0) { req.addAttributes(SchemaConstants.ALL_USER_ATTRIBUTES); } else { req.addAttributes(userAttributes); } req.setTimeLimit((int) config.getSearchTimeout()); req.setBase(new Dn(idConfig.getBaseDN())); req.setFilter(searchFilter); PagedResults pagedSearchControl = new PagedResultsDecorator(connection.getCodecService()); // do paged searches (OAK-2874) pagedSearchControl.setSize(1000); pagedSearchControl.setCookie(cookie); req.addControl(pagedSearchControl); return req; }
/** * @return The requested or returned number of entries */ @Override public int getSize() { return getDecorated().getSize(); }
/** * Set the cookie * * @param cookie The cookie to store in this control */ @Override public void setCookie( byte[] cookie ) { // Copy the bytes if ( !Strings.isEmpty( cookie ) ) { byte[] copy = new byte[cookie.length]; System.arraycopy( cookie, 0, copy, 0, cookie.length ); getDecorated().setCookie( copy ); } else { getDecorated().setCookie( null ); } }
/** * @return The stored cookie */ @Override public byte[] getCookie() { return getDecorated().getCookie(); }
/** * @return The requested or returned number of entries */ @Override public int getSize() { return getDecorated().getSize(); }
/** * Set the cookie * * @param cookie The cookie to store in this control */ @Override public void setCookie( byte[] cookie ) { // Copy the bytes if ( !Strings.isEmpty( cookie ) ) { byte[] copy = new byte[cookie.length]; System.arraycopy( cookie, 0, copy, 0, cookie.length ); getDecorated().setCookie( copy ); } else { getDecorated().setCookie( null ); } }
/** * @see Object#equals(Object) */ @Override public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof PagedResults ) ) { return false; } PagedResults otherControl = ( PagedResults ) other; return super.equals( other ) && ( size == otherControl.getSize() ) && Arrays.equals( cookie, otherControl.getCookie() ); }
/** * @return The stored cookie */ @Override public byte[] getCookie() { return getDecorated().getCookie(); }
/** * Set the number of entry requested or returned * * @param size The number of entries */ @Override public void setSize( int size ) { getDecorated().setSize( size ); }
/** * @return The requested or returned number of entries */ @Override public int getSize() { return getDecorated().getSize(); }
/** * Set the cookie * * @param cookie The cookie to store in this control */ @Override public void setCookie( byte[] cookie ) { // Copy the bytes if ( !Strings.isEmpty( cookie ) ) { byte[] copy = new byte[cookie.length]; System.arraycopy( cookie, 0, copy, 0, cookie.length ); getDecorated().setCookie( copy ); } else { getDecorated().setCookie( null ); } }
/** * @see Object#equals(Object) */ @Override public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof PagedResults ) ) { return false; } PagedResults otherControl = ( PagedResults ) other; return super.equals( other ) && ( size == otherControl.getSize() ) && Arrays.equals( cookie, otherControl.getCookie() ); }
cookie = ctrl.getCookie();
/** * Set the number of entry requested or returned * * @param size The number of entries */ @Override public void setSize( int size ) { getDecorated().setSize( size ); }