Class SearchResultEntry

    • Constructor Detail

      • SearchResultEntry

        public SearchResultEntry​(@NotNull
                                 java.lang.String dn,
                                 @NotNull
                                 Attribute[] attributes,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry with the provided information.
        Parameters:
        dn - The DN for this search result entry. It must not be null.
        attributes - The set of attributes to include in this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
      • SearchResultEntry

        public SearchResultEntry​(int messageID,
                                 @NotNull
                                 java.lang.String dn,
                                 @NotNull
                                 Attribute[] attributes,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry with the provided information.
        Parameters:
        messageID - The message ID for the LDAP message containing this response.
        dn - The DN for this search result entry. It must not be null.
        attributes - The set of attributes to include in this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
      • SearchResultEntry

        public SearchResultEntry​(int messageID,
                                 @NotNull
                                 java.lang.String dn,
                                 @Nullable
                                 Schema schema,
                                 @NotNull
                                 Attribute[] attributes,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry with the provided information.
        Parameters:
        messageID - The message ID for the LDAP message containing this response.
        dn - The DN for this search result entry. It must not be null.
        schema - The schema to use for operations involving this entry. It may be null if no schema is available.
        attributes - The set of attributes to include in this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
      • SearchResultEntry

        public SearchResultEntry​(@NotNull
                                 java.lang.String dn,
                                 @NotNull
                                 java.util.Collection<Attribute> attributes,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry with the provided information.
        Parameters:
        dn - The DN for this search result entry. It must not be null.
        attributes - The set of attributes to include in this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
      • SearchResultEntry

        public SearchResultEntry​(int messageID,
                                 @NotNull
                                 java.lang.String dn,
                                 @NotNull
                                 java.util.Collection<Attribute> attributes,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry with the provided information.
        Parameters:
        messageID - The message ID for the LDAP message containing this response.
        dn - The DN for this search result entry. It must not be null.
        attributes - The set of attributes to include in this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
      • SearchResultEntry

        public SearchResultEntry​(int messageID,
                                 @NotNull
                                 java.lang.String dn,
                                 @Nullable
                                 Schema schema,
                                 @NotNull
                                 java.util.Collection<Attribute> attributes,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry with the provided information.
        Parameters:
        messageID - The message ID for the LDAP message containing this response.
        dn - The DN for this search result entry. It must not be null.
        schema - The schema to use for operations involving this entry. It may be null if no schema is available.
        attributes - The set of attributes to include in this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
      • SearchResultEntry

        public SearchResultEntry​(@NotNull
                                 Entry entry,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry from the provided entry.
        Parameters:
        entry - The entry to use to create this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
      • SearchResultEntry

        public SearchResultEntry​(int messageID,
                                 @NotNull
                                 Entry entry,
                                 @NotNull
                                 Control... controls)
        Creates a new search result entry from the provided entry.
        Parameters:
        messageID - The message ID for the LDAP message containing this response.
        entry - The entry to use to create this search result entry. It must not be null.
        controls - The set of controls for this search result entry. It must not be null.
    • Method Detail

      • getMessageID

        public int getMessageID()
        Retrieves the message ID for the LDAP message containing this response.
        Specified by:
        getMessageID in interface LDAPResponse
        Returns:
        The message ID for the LDAP message containing this response.
      • getControls

        @NotNull
        public Control[] getControls()
        Retrieves the set of controls returned with this search result entry. Individual response controls of a specific type may be retrieved and decoded using the get method in the response control class.
        Returns:
        The set of controls returned with this search result entry.
      • getControl

        @Nullable
        public Control getControl​(@NotNull
                                  java.lang.String oid)
        Retrieves the control with the specified OID. If there is more than one control with the given OID, then the first will be returned.
        Parameters:
        oid - The OID of the control to retrieve.
        Returns:
        The control with the requested OID, or null if there is no such control for this search result entry.
      • hashCode

        public int hashCode()
        Generates a hash code for this entry.
        Overrides:
        hashCode in class Entry
        Returns:
        The generated hash code for this entry.
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object o)
        Indicates whether the provided object is equal to this entry. The provided object will only be considered equal to this entry if it is an entry with the same DN and set of attributes.
        Overrides:
        equals in class Entry
        Parameters:
        o - The object for which to make the determination.
        Returns:
        true if the provided object is considered equal to this entry, or false if not.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of this entry to the provided buffer.
        Specified by:
        toString in interface LDAPResponse
        Specified by:
        toString in interface LDIFRecord
        Overrides:
        toString in class Entry
        Parameters:
        buffer - The buffer to which to append the string representation of this entry.