public void after( IndexEntry<K, O, ID> element ) throws Exception { wrappedCursor.after( element.getTuple() ); }
public void before( IndexEntry<K, O, ID> element ) throws Exception { wrappedCursor.before( element.getTuple() ); }
list.beforeFirst(); while ( list.next() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2]; row[0] = rec.getValue(); ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>(); entry.setValue( key ); list.before( entry ); while ( list.next() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2]; row[0] = rec.getValue(); ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>(); entry.setValue( key ); list.after( entry ); while ( list.previous() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2]; row[0] = rec.getValue(); while ( list.next() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2];
/** * searches for an entry having the given DN * * @param dn the DN of the entry to be fetched * @param attributes the attributes to be returned along with entry * @return the Entry with the given DN or null if no entry exists with that DN * @throws LdapException in case of any problems while searching for the DN */ public SearchResponse lookup( String dn, String... attributes ) throws LdapException { SearchResponse resp = null; try { Cursor<SearchResponse> cursor = search( dn, "(objectClass=*)", SearchScope.OBJECT, attributes ); if( cursor.next() ) { resp = cursor.get(); } cursor.close(); } catch( Exception e ) { throw new LdapException( e ); } return resp; }
if ( null == dupsCursor || ! dupsCursor.next() ) dupsCursor.beforeFirst(); dupsCursor.next(); returnedTuple.setValue( dupsCursor.get() ); return valueAvailable = true;
public boolean next() throws Exception { return wrappedCursor.next(); }
@SuppressWarnings("unchecked") public IndexEntry<K, O, ID> get() throws Exception { if ( forwardEntry != null ) { Tuple<K, ID> tuple = wrappedCursor.get(); forwardEntry.setTuple( tuple, null ); return forwardEntry; } else { Tuple<ID, K> tuple = wrappedCursor.get(); reverseEntry.setTuple( tuple, null ); return reverseEntry; } }
public void close() throws Exception { wrappedCursor.close(); }
public boolean previous() throws Exception { return wrappedCursor.previous(); }
public void beforeFirst() throws Exception { wrappedCursor.beforeFirst(); }
public boolean available() { return wrappedCursor.available(); }
public boolean first() throws Exception { return wrappedCursor.first(); }
public void afterLast() throws Exception { wrappedCursor.afterLast(); }
list.beforeFirst(); while ( list.next() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2]; row[0] = rec.getValue(); ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>(); entry.setValue( key ); list.before( entry ); while ( list.next() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2]; row[0] = rec.getValue(); ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>(); entry.setValue( key ); list.after( entry ); while ( list.previous() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2]; row[0] = rec.getValue(); while ( list.next() ) IndexEntry<K, O, ID> rec = list.get(); row = new Object[2];