Class AbstractLdapResult<T extends java.util.Map<java.lang.String,​LdapEntry>>

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractLdapResult​(LdapBeanFactory lbf)
      Creates a new AbstractLdapResult with the supplied ldap bean factory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addEntries​(java.util.Collection<LdapEntry> c)
      This adds a Collection of entries to this LdapResult.
      void addEntries​(java.util.Iterator<javax.naming.directory.SearchResult> i)
      This adds an Iterator of SearchResult to this LdapResult.
      void addEntries​(javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> ne)
      This adds a NamingEnumeration of SearchResult to this LdapResult.
      void addEntry​(LdapEntry e)
      This adds a new entry to this LdapResult.
      void addEntry​(javax.naming.directory.SearchResult sr)
      This adds a new entry to this LdapResult.
      void clear()
      This removes all entries from this LdapResult.
      java.util.Collection<LdapEntry> getEntries()
      This returns a Collection of LdapEntry for this LdapResult.
      LdapEntry getEntry​(java.lang.String dn)
      This returns the LdapEntry for this LdapResult with the supplied DN.
      int hashCode()
      This returns the hash code for this object.
      int size()
      This returns the number of entries in this result.
      java.util.List<javax.naming.directory.SearchResult> toSearchResults()
      This returns a List of SearchResult that represent the entries in this LdapResult.
      java.lang.String toString()
      This returns a string representation of this object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • HASH_CODE_SEED

        protected static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
      • entries

        protected T extends java.util.Map<java.lang.String,​LdapEntry> entries
        Entries contained in this result.
    • Constructor Detail

      • AbstractLdapResult

        public AbstractLdapResult​(LdapBeanFactory lbf)
        Creates a new AbstractLdapResult with the supplied ldap bean factory.
        Parameters:
        lbf - LdapBeanFactory
    • Method Detail

      • getEntries

        public java.util.Collection<LdapEntry> getEntries()
        This returns a Collection of LdapEntry for this LdapResult.
        Specified by:
        getEntries in interface LdapResult
        Returns:
        Collection
      • getEntry

        public LdapEntry getEntry​(java.lang.String dn)
        This returns the LdapEntry for this LdapResult with the supplied DN.
        Specified by:
        getEntry in interface LdapResult
        Parameters:
        dn - String
        Returns:
        LdapEntry
      • addEntry

        public void addEntry​(LdapEntry e)
        This adds a new entry to this LdapResult.
        Specified by:
        addEntry in interface LdapResult
        Parameters:
        e - LdapEntry
      • addEntry

        public void addEntry​(javax.naming.directory.SearchResult sr)
                      throws javax.naming.NamingException
        This adds a new entry to this LdapResult.
        Specified by:
        addEntry in interface LdapResult
        Parameters:
        sr - SearchResult
        Throws:
        javax.naming.NamingException - if the search results cannot be read
      • addEntries

        public void addEntries​(java.util.Collection<LdapEntry> c)
        This adds a Collection of entries to this LdapResult. The list should contain LdapEntry objects.
        Specified by:
        addEntries in interface LdapResult
        Parameters:
        c - Collection
      • addEntries

        public void addEntries​(javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> ne)
                        throws javax.naming.NamingException
        This adds a NamingEnumeration of SearchResult to this LdapResult.
        Specified by:
        addEntries in interface LdapResult
        Parameters:
        ne - NamingEnumeration
        Throws:
        javax.naming.NamingException - if the search results cannot be read
      • addEntries

        public void addEntries​(java.util.Iterator<javax.naming.directory.SearchResult> i)
                        throws javax.naming.NamingException
        This adds an Iterator of SearchResult to this LdapResult.
        Specified by:
        addEntries in interface LdapResult
        Parameters:
        i - Iterator
        Throws:
        javax.naming.NamingException - if the search results cannot be read
      • size

        public int size()
        This returns the number of entries in this result.
        Specified by:
        size in interface LdapResult
        Returns:
        int
      • clear

        public void clear()
        This removes all entries from this LdapResult.
        Specified by:
        clear in interface LdapResult
      • hashCode

        public int hashCode()
        This returns the hash code for this object.
        Specified by:
        hashCode in class AbstractLdapBean
        Returns:
        int
      • toString

        public java.lang.String toString()
        This returns a string representation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • toSearchResults

        public java.util.List<javax.naming.directory.SearchResult> toSearchResults()
        This returns a List of SearchResult that represent the entries in this LdapResult.
        Specified by:
        toSearchResults in interface LdapResult
        Returns:
        List