Package org.apache.ldap.common.util

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


                    }
                }

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

                return new SingletonEnumeration( result );
            }

            throw new LdapNameNotFoundException();
        }
View Full Code Here


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

            if ( node.getAttribute().equalsIgnoreCase( "objectClass" ) )
            {
                // call.setBypass( true );
                Attributes attrs = getSubschemaEntry( searchControls.getReturningAttributes() );
                SearchResult result = new SearchResult( call.getBaseName().toString(), null, attrs );
                SingletonEnumeration e = new SingletonEnumeration( result );
                call.setReturnValue( e );
                bypass = true;
            }
        }
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

            {
                return new EmptyEnumeration();
            }
            else
            {
                return new SingletonEnumeration( value );
            }
        }

        set = ( TreeSet ) getRaw( key );
        if ( null == set )
View Full Code Here

            {
                return new EmptyEnumeration();
            }
            else
            {
                return new SingletonEnumeration(
                    new Tuple( key, getRaw( key ) ) );
            }
        }

        set = ( TreeSet ) getRaw( key );
View Full Code Here

            {
                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

            {
                return new EmptyEnumeration();
            }
            else
            {
                return new SingletonEnumeration( value );
            }
        }

        set = ( TreeSet ) getRaw( key );
        if ( null == set )
View Full Code Here

            {
                return new EmptyEnumeration();
            }
            else
            {
                return new SingletonEnumeration(
                    new Tuple( key, getRaw( key ) ) );
            }
        }

        set = ( TreeSet ) getRaw( key );
View Full Code Here

            {
                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

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.