Package org.apache.ldap.common.util

Examples of org.apache.ldap.common.util.SingletonEnumeration


            {
                return new EmptyEnumeration();
            }
            else if ( val.equals( rval ) ) // val == rval return tuple
            {
                return new SingletonEnumeration( new Tuple( key, val ) );
            }
            // val >= val and test is for greater then return tuple
            else if ( comparator.compareValue( val, rval ) >= 1 && isGreaterThan )
            {
                return new SingletonEnumeration( new Tuple( key, val ) );
            }
            // val <= val and test is for lesser then return tuple
            else if ( comparator.compareValue( val, rval ) <= 1 && ! isGreaterThan )
            {
                return new SingletonEnumeration( new Tuple( key, val ) );
            }

            return new EmptyEnumeration();
        }
View Full Code Here


        {
        case( SearchControls.OBJECT_SCOPE ):
            final IndexRecord record = new IndexRecord();
            record.setEntryId( id );
            record.setIndexKey( snode.getBaseDn() );
            return new SingletonEnumeration( record );
        case( SearchControls.ONELEVEL_SCOPE ):
            return enumerateChildren( snode.getBaseDn(),
                snode.getDerefAliases().derefInSearching() );
        case( SearchControls.SUBTREE_SCOPE ):
            return enumerateDescendants( snode );
View Full Code Here

                    }
                }

                SearchResult result = new SearchResult( "", null, attrs, false );

                return new SingletonEnumeration( result );
            }

            throw new LdapNameNotFoundException();
        }
View Full Code Here

            )
            {
                // call.setBypass( true );
                Attributes attrs = getSubschemaEntry( searchCtls.getReturningAttributes() );
                SearchResult result = new SearchResult( base.toString(), null, attrs );
                return new SingletonEnumeration( result );
            }
        }
        else if ( searchCtls.getSearchScope() == SearchControls.OBJECT_SCOPE &&
                filter instanceof PresenceNode )
        {
            PresenceNode node = ( PresenceNode ) filter;

            if ( node.getAttribute().equalsIgnoreCase( "objectClass" ) )
            {
                // call.setBypass( true );
                Attributes attrs = getSubschemaEntry( searchCtls.getReturningAttributes() );
                SearchResult result = new SearchResult( base.toString(), null, attrs );
                return new SingletonEnumeration( result );
            }
        }

        NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls );
View Full Code Here

TOP

Related Classes of org.apache.ldap.common.util.SingletonEnumeration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.