/** * {@inheritDoc} */ public void afterLast() throws Exception { checkNotClosed( "afterLast()" ); }
private BaseEntryFilteringCursor findObject(SearchingOperationContext ctx) { DN dn = ctx.getDn(); String dnName = dn.getName(); ServerEntry se = ctx.getEntry(); log.debug("findObject()::dn=" + dnName + "::entry=" + se.toString()); //1. Try cache se = m_EntryCache.get(dn.getName()); if (se != null) { return new BaseEntryFilteringCursor( new SingletonCursor<ServerEntry>(se), ctx); } // return an empty result return new BaseEntryFilteringCursor(new EmptyCursor<ServerEntry>(), ctx); }//findObject
public EntryFilteringCursor search(SearchOperationContext ctx) throws Exception { /* -base: the node itself -one: one level under the node -sub: all node under the node */ if (log.isDebugEnabled()) { log.debug("search((dn=" + ctx.getDn() + ", filter=" + ctx.getFilter() + ", scope=" + ctx.getScope() + ")"); } switch (ctx.getScope()) { case OBJECT: return findObject(ctx); case ONELEVEL: return findOneLevel(ctx); case SUBTREE: return findSubTree(ctx); default: // return an empty result return new BaseEntryFilteringCursor(new EmptyCursor<ServerEntry>(), ctx); } }//search
/** * {@inheritDoc} */ public Cursor<V> valueCursor( K key ) throws Exception { if ( key == null ) { return new EmptyCursor<V>(); } LinkedAvlMapNode<K, V> node = avl.find( key ); if ( node == null ) { return new EmptyCursor<V>(); } if ( node.getValue().isOrderedSet() ) { return new AvlTreeCursor<V>( node.getValue().getOrderedSet() ); } return new SingletonCursor<V>( node.getValue().getSingleton(), valComparator ); }
/** * {@inheritDoc} */ public void after( E element ) throws Exception { checkNotClosed( "after()" ); }
log.debug("Name=" + name); if("crowd".equals(name)) { return new BaseEntryFilteringCursor(new EmptyCursor<ServerEntry>(), ctx); return new BaseEntryFilteringCursor(new EmptyCursor<ServerEntry>(), ctx);
/** * {@inheritDoc} */ public void before( E element ) throws Exception { checkNotClosed( "before()" ); }
/** * {@inheritDoc} */ public Cursor<Tuple<K, V>> cursor( K key ) throws Exception { if ( key == null ) { return new EmptyCursor<Tuple<K,V>>(); } LinkedAvlMapNode<K, V> node = avl.find( key ); if ( node == null ) { return new EmptyCursor<Tuple<K,V>>(); } if ( node.getValue().isOrderedSet() ) { return new KeyTupleAvlCursor<K,V>( node.getValue().getOrderedSet(), key ); } return new SingletonCursor<Tuple<K,V>>( new Tuple<K,V>( key, node.getValue().getSingleton() ), keyOnlytupleComparator ); }
/** * {@inheritDoc} */ public boolean first() throws Exception { checkNotClosed( "first()" ); return false; }
/** * {@inheritDoc} */ public boolean previous() throws Exception { checkNotClosed( "previous()" ); return false; }
/** * {@inheritDoc} */ public boolean next() throws Exception { checkNotClosed( "next()" ); return false; }
/** * {@inheritDoc} */ public void beforeFirst() throws Exception { checkNotClosed( "beforeFirst()" ); }
/** * {@inheritDoc} */ public boolean last() throws Exception { checkNotClosed( "last()" ); return false; }
/** * {@inheritDoc} */ public E get() throws Exception { checkNotClosed( "get()" ); throw new InvalidCursorPositionException( I18n.err( I18n.ERR_02004 ) ); }