Skip to content

IAdmSearchResult2

The IAdmSearchResult2 interface extends the IAdmSearchResult interface.

Inheritance: The IAdmSearchResult2 interface inherits from the IAdmSearchResult interface.

Methods

  • Method

  • Description

  • AddEx()

  • Adds a property to the search result entry.

  • AddEmptyValuesForNonExistingProperties()

  • Adds an empty value for each property listed in the propertyNames parameter if the search result entry doesn’t contain a value for the property.

  • ContainsProperty()

  • Determines whether a property with the specified name is present in this search result entry.

Properties

  • Property

  • Description

  • Name

  • Gets the relative distinguished name (RDN) of the directory object represented by this search result entry.

  • ObjectType

  • Gets the object class of the directory object represented by this search result entry.

Details

AddEx()

Adds a property to the search result entry. Unlike the IAdmSearchResult::Add method, this method allows you to add a property without creating an instance of the AdmSearchResultProperty class.

void AddEx(String propertyName,
           ADSTYPEENUM propertyType,
           Object propertyValues)

Parameters

  • propertyName - Specifies the name of the property to be added.
  • propertyType - Specifies the ADSI type of the property to be added.
  • propertyValues - Specifies the value for the property to be added. To add multiple values, pass an Object[] array.

Examples

The following code sample adds a single-valued and a multi-valued property to a search result entry.

# The $searchResult variable represents a search result entry

# Add a single-valued property
$searchResult.AddEx("description", "ADSTYPE_UNKNOWN", "My description")

# Add a multi-valued property
$searchResult.AddEx("otherhomePhone", "ADSTYPE_UNKNOWN", @("550-440-330","550-440-331"))
// The $searchResult variable represents a search result entry

// Add a single-valued property
searchResult.AddEx("description", ADSTYPEENUM.ADSTYPE_UNKNOWN, "My description");

// Add a multi-valued property
searchResult.AddEx("otherhomePhone", ADSTYPEENUM.ADSTYPE_UNKNOWN, 
    new object[] { "550-440-333", "550-440-334" });

AddEmptyValuesForNonExistingProperties()

Adds an empty value for each property listed in the propertyNames parameter if the search result entry doesn’t contain a value for the property.

void AddEmptyValuesForNonExistingProperties(String[] propertyNames, 
                                            Boolean skipAdaxesCalculatedProperties)

Parameters

  • propertyNames - Specifies an array of property names.
  • skipAdaxesCalculatedProperties - If set to TRUE, the method skips Adaxes calculated properties.

ContainsProperty()

Determines whether a property with the specified name is present in this search result entry.

Boolean ContainsProperty(String propertyName)

Parameters

The propertyName parameter specifies the name of a property to be checked.


Name

Gets the relative distinguished name (RDN) of the directory object represented by this search result entry.

  • Type:
  • String
  • Access:
  • Read-only

ObjectType

Gets the object class of the directory object represented by this search result entry.

  • Type:
  • String
  • Access:
  • Read-only

Requirements

Minimum required version: 2018.1

See also