Interface IDfResultEntry

All Known Subinterfaces:
IDfModifiableResultEntry

public interface IDfResultEntry
Represents a single result entry from a query execution. It is read-only and mimics the IDfTypedObject interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Result status: the result has been modified.
    static final int
    Result status: the result is a new one.
    static final int
    Result status: the result is an old one.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an enumeration of IDfAttr objects.
    int
    Gets the index of a specific attribute in the list of attributes that belong to this object.
    int
    findBoolean(String attrName, boolean value)
    Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified boolean value.
    int
    findDouble(String attrName, double value)
    Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified double value.
    int
    findId(String attrName, IDfId value)
    Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified object id value.
    int
    findInt(String attrName, int value)
    Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified integer value.
    int
    findString(String attrName, String value)
    Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified string value.
    int
    findTime(String attrName, IDfTime value)
    Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified time value.
    int
    findValue(String attrName, IDfValue value)
    Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified value.
    getAllRepeatingStrings(String attrName, String separator)
    Returns all the values stored in a repeating attribute as a single string.
    getAttr(int attrIndex)
    Returns an IDfAttr representing the attribute located at a specific position in this object list of attributes.
    getAttr(String attrName)
    Gets an attribute definition based on its name.
    int
    Returns the number of attributes belonging to this object.
    int
    Returns the data type of an attribute.
    boolean
    getBoolean(String attrName)
    Returns the boolean value stored in a specific attribute.
    double
    getDouble(String attrName)
    Returns the double value stored in a specific attribute.
    int
    Gets the global sequence number of the result, that is to say its arrival order with respect to the query execution.
    getId(String attrName)
    Returns the object ID stored in a specific attribute.
    int
    getInt(String attrName)
    Returns the integer value stored in a specific attribute.
    Gets a key that is a String representation of this result.
    long
    getLong(String attrName)
    Returns the long integer value stored in a specific attribute.
    Gets the result terms matching the query.
    Gets the result metadata highlight entries matching the query.
    boolean
    getRepeatingBoolean(String attrName, int valueIndex)
    Returns the boolean value stored in a repeating attribute, located at a specific index.
    double
    getRepeatingDouble(String attrName, int valueIndex)
    Returns the double value stored in a repeating attribute, located at a specific index.
    getRepeatingId(String attrName, int valueIndex)
    Returns the object ID value stored in a repeating attribute, located at a specific index.
    int
    getRepeatingInt(String attrName, int valueIndex)
    Returns the integer value stored in a repeating attribute, located at a specific index.
    long
    getRepeatingLong(String attrName, int valueIndex)
    Returns the long value stored in a repeating attribute, located at a specific index.
    getRepeatingString(String attrName, int valueIndex)
    Returns the string value stored in a repeating attribute, located at a specific index.
    getRepeatingTime(String attrName, int valueIndex)
    Returns the time value stored in a repeating attribute, located at a specific index.
    getRepeatingValue(String attrName, int valueIndex)
    Returns the value stored in a repeating attribute, located at a specific index.
    double
    Gets the relevance score of the results with respect to the query.
    int
    Gets the sequence number of the result relative to its source.
    Gets the internal name of the source this result comes from.
    int
    Returns the status of the result.
    getString(String attrName)
    Returns the string value stored in a specific attribute.
    getTime(String attrName)
    Returns the time value stored in a specific attribute.
    getValue(String attrName)
    Returns the value stored in a specific attribute.
    getValueAt(int index)
    Returns the value stored in the attribute at the specified attribute index.
    int
    Returns the number of values stored in an attribute.
    boolean
    hasAttr(String attrName)
    Indicates whether an attribute exists for this object.
    boolean
    Indicates whether the attribute attrName is a repeating attribute.
    boolean
    Indicates if the result comes from a repository and can be accessed as a IDfTypedObject.
    boolean
    Indicates if the result corresponding content is accessible directly through a URL.
  • Field Details

  • Method Details

    • getAttr

      IDfAttr getAttr(String attrName)
      Gets an attribute definition based on its name.
      Parameters:
      attrName - The name of the attribute; or null if the attribute is not found.
      Returns:
      An IDfAttr object.
    • isUrlAddressible

      boolean isUrlAddressible()
      Indicates if the result corresponding content is accessible directly through a URL.
      Returns:
      true, if a URL can be used to access content; false otherwise.
    • isRepositoryObject

      boolean isRepositoryObject()
      Indicates if the result comes from a repository and can be accessed as a IDfTypedObject.
      Returns:
      true, if this object is repository object; false otherwise.
    • getKey

      String getKey()
      Gets a key that is a String representation of this result. This key is unique with respect to a query. It is Base64 encoded to be safely written in HTML pages and URL.
      Returns:
      This result key.
      See Also:
    • getSource

      String getSource()
      Gets the internal name of the source this result comes from.
      Note: facility to get the source attribute.
      Returns:
      A String representing the source internal name.
    • getScore

      double getScore()
      Gets the relevance score of the results with respect to the query.
      Returns:
      A double between 0 and 1.
    • getSeqNumber

      int getSeqNumber()
      Gets the sequence number of the result relative to its source.
      Returns:
      A positive or null int.
    • getGlobalSeqNumber

      int getGlobalSeqNumber()
      Gets the global sequence number of the result, that is to say its arrival order with respect to the query execution.
      Returns:
      A positive or null int. This number may be greater than the number of results because some duplicate results may have been removed.
    • getMatchingTerms

      IDfEnumeration getMatchingTerms()
      Gets the result terms matching the query. All terms are lower case, with no duplicate. For example, these terms can be highlighted when displaying the result.
      Returns:
      The result matching terms (IDfEnumeration of String). This enumeration can be empty.
    • getMetadataHighlights

      IDfEnumeration getMetadataHighlights()
      Gets the result metadata highlight entries matching the query.
      Returns:
      The result metadata highlight entries (IDfEnumeration of IDfResultMetadataHighlightEntry). This enumeration can be empty.
    • getBoolean

      boolean getBoolean(String attrName) throws IllegalArgumentException
      Returns the boolean value stored in a specific attribute. If the attribute attrName is a repeating attribute, the value at index 0 is returned. If attrName is a repeating attribute without any values, false is returned.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The boolean value for the specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • getDouble

      double getDouble(String attrName) throws IllegalArgumentException
      Returns the double value stored in a specific attribute. If the attribute attrName is a repeating attribute, the value at index 0 is returned. If attrName is a repeating attribute without any values, 0.0 is returned.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The double value for the specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • getInt

      int getInt(String attrName) throws IllegalArgumentException
      Returns the integer value stored in a specific attribute. If the attribute attrName is a repeating attribute, the value at index 0 is returned. If attrName is a repeating attribute without any values, 0 is returned.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The integer value for the specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • getString

      String getString(String attrName) throws IllegalArgumentException
      Returns the string value stored in a specific attribute. If the attribute attrName is a repeating attribute, the value at index 0 is returned. If attrName is a repeating attribute without any values, a zero-length string is returned.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The string value for the specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • getTime

      IDfTime getTime(String attrName) throws IllegalArgumentException
      Returns the time value stored in a specific attribute. If the attribute attrName is a repeating attribute, the value at index 0 is returned. If attrName is a repeating attribute without any values, DfTime.DF_nullDATE is returned.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The time value for the specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • getId

      IDfId getId(String attrName) throws IllegalArgumentException
      Returns the object ID stored in a specific attribute. If the attribute attrName is a repeating attribute, the value at index 0 is returned. If attrName is a repeating attribute without any values, DfId.DF_nullID is returned.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The object ID for the specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • getRepeatingBoolean

      boolean getRepeatingBoolean(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the boolean value stored in a repeating attribute, located at a specific index.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The boolean value for the specified attribute, at a specific index.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating
      IndexOutOfBoundsException - If the index is out of bounds.
    • getRepeatingDouble

      double getRepeatingDouble(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the double value stored in a repeating attribute, located at a specific index.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The double value for the specified attribute, at a specific index.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating.
      IndexOutOfBoundsException - If the index is out of bounds.
    • getRepeatingInt

      int getRepeatingInt(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the integer value stored in a repeating attribute, located at a specific index.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The integer value for the specified attribute, at a specific index.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating.
      IndexOutOfBoundsException - If the index is out of bounds.
    • getRepeatingString

      String getRepeatingString(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the string value stored in a repeating attribute, located at a specific index.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The string value for the specified attribute, at a specific index.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating.
      IndexOutOfBoundsException - If the index is out of bounds.
    • getRepeatingTime

      IDfTime getRepeatingTime(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the time value stored in a repeating attribute, located at a specific index.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The time value for the specified attribute, at a specific index.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating.
      IndexOutOfBoundsException - If the index is out of bounds.
    • getAllRepeatingStrings

      String getAllRepeatingStrings(String attrName, String separator) throws IllegalArgumentException
      Returns all the values stored in a repeating attribute as a single string. The values are delimited with the string passed as the separator argument.
      Parameters:
      attrName - The name of the repeating attribute.
      separator - The symbol to be used to separate the retrieved values of the repeating attribute. If you specify null as the separator, a comma will be used to separate the returned values.
      Returns:
      All values stored in the repeating attribute as a single delimited string.
      Throws:
      IllegalArgumentException - If the attribute is not repeating.
    • findBoolean

      int findBoolean(String attrName, boolean value) throws IllegalArgumentException
      Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified boolean value.
      Parameters:
      attrName - The name of the repeating attribute.
      value - The boolean value to find.
      Returns:
      index The index of the boolean value; or -1 if it is not found.
      Throws:
      IllegalArgumentException - if the attribute is not repeating.
    • findDouble

      int findDouble(String attrName, double value) throws IllegalArgumentException
      Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified double value.
      Parameters:
      attrName - The name of the repeating attribute.
      value - The double value to find.
      Returns:
      The index of the double value; or -1 if it is not found.
      Throws:
      IllegalArgumentException - If the attribute is not repeating.
    • findId

      int findId(String attrName, IDfId value) throws IllegalArgumentException
      Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified object id value.
      Parameters:
      attrName - The name of the repeating attribute.
      value - The object ID to find.
      Returns:
      The index of the object ID; or -1 if it is not found.
      Throws:
      IllegalArgumentException - If the attribute is not repeating.
    • findInt

      int findInt(String attrName, int value) throws IllegalArgumentException
      Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified integer value.
      Parameters:
      attrName - The name of the repeating attribute.
      value - The integer value to find.
      Returns:
      The index of the integer value; or -1 if it is not found.
      Throws:
      IllegalArgumentException - If the attribute is not repeating.
    • findString

      int findString(String attrName, String value) throws IllegalArgumentException
      Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified string value.
      Parameters:
      attrName - The name of the repeating attribute.
      value - The string value to find.
      Returns:
      The index of the string value; or -1 if it is not found.
      Throws:
      IllegalArgumentException - If the attribute is not repeating.
    • findTime

      int findTime(String attrName, IDfTime value) throws IllegalArgumentException
      Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified time value.
      Parameters:
      attrName - The name of the repeating attribute.
      value - The time value to find.
      Returns:
      The index of the time value; or -1 if it is not found.
      Throws:
      IllegalArgumentException - If the attribute is not repeating.
    • findValue

      int findValue(String attrName, IDfValue value) throws IllegalArgumentException
      Searches through the values in a repeating attribute and returns the first index value that corresponds to the specified value.
      Parameters:
      attrName - The name of the repeating attribute.
      value - The variant value to find.
      Returns:
      The index of the value; or -1 if it is not found.
      Throws:
      IllegalArgumentException - If the attribute is not repeating.
    • getValueCount

      int getValueCount(String attrName)
      Returns the number of values stored in an attribute. This will always return 1 for single-valued attributes, and return a non-negative number for repeating attributes.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The number of values stored in the attribute; or 0 if the attribute is not found.
    • enumAttrs

      IDfEnumeration enumAttrs()
      Returns an enumeration of IDfAttr objects.

      The enumeration interface is Java-specific. If you are programming with COM, you need to do one of the following:
      A. Call the methods of the Enumerator interface through IDispatch.
      The following sample code demonstrates option A in Visual Basic.

       Object o =
       my_object.enumAttrs() Dim attr as IDfAttr While o.hasMoreElements = true Set attr = o.nextElement name$ =
       attr.getName Wend

      B. Convert the interface to a IDfEnumeration interface by passing the enumeration interface to the getEnumeration() method in IDfClientX.
      The following sample code demonstrates option B in Visual Basic.

       Object o = my_object.enumAttrs() Dim en As IDfEnumeration Dim attr as
       IDfAttr Set en = clientx.getEnumeration(o) While en.hasMoreElements = true Set attr = en.nextElement
       name$ = attr.getName Wend
      Returns:
      An enumeration interface to all the attributes of the object (IDfEnumeration of IDfAttr).
    • findAttrIndex

      int findAttrIndex(String attrName)
      Gets the index of a specific attribute in the list of attributes that belong to this object.
      Parameters:
      attrName - The attribute name.
      Returns:
      The attribute index in the object list of attributes; or -1 if the attribute name is not found.
    • getAttr

      IDfAttr getAttr(int attrIndex) throws IndexOutOfBoundsException
      Returns an IDfAttr representing the attribute located at a specific position in this object list of attributes.
      Parameters:
      attrIndex - The index of the attribute in the object list of attributes.
      Returns:
      The attribute at the specified index.
      Throws:
      IndexOutOfBoundsException - If the index is not within the bounds of this object list of attributes.
      See Also:
    • getAttrCount

      int getAttrCount()
      Returns the number of attributes belonging to this object.
      Returns:
      The number of attributes belonging to the this object.
    • getAttrDataType

      int getAttrDataType(String attrName) throws IllegalArgumentException
      Returns the data type of an attribute. The possible return values are IDfAttr.DM_BOOLEAN, IDfAttr.DM_INTEGER, IDfAttr.DM_STRING, IDfAttr.DM_ID, IDfAttr.DM_TIME, IDfAttr.DM_DOUBLE, and IDfAttr.DM_UNDFINED.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The data type of the attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • hasAttr

      boolean hasAttr(String attrName)
      Indicates whether an attribute exists for this object.
      Parameters:
      attrName - the name of the attribute
      Returns:
      true, if the specified attribute exists; false, otherwise.
    • isAttrRepeating

      boolean isAttrRepeating(String attrName) throws IllegalArgumentException
      Indicates whether the attribute attrName is a repeating attribute.
      Note: caller should make sure the attribute is available before calling this method by using hasAttr().
      Parameters:
      attrName - The name of the attribute.
      Returns:
      true, if the attribute is repeating; false, otherwise.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
    • getValueAt

      IDfValue getValueAt(int index) throws IndexOutOfBoundsException
      Returns the value stored in the attribute at the specified attribute index.
      Parameters:
      index - The index of the attribute.
      Returns:
      An IDfValue interface to the variant value.
      Throws:
      IndexOutOfBoundsException - If the index is not within the bounds of this object list of attributes.
      See Also:
    • getLong

      long getLong(String attrName) throws IllegalArgumentException
      Returns the long integer value stored in a specific attribute. If the attribute attrName is a repeating attribute, the value at index 0 is returned. If attrName is a repeating attribute without any values, 0 is returned.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The long integer value for a specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
    • getRepeatingLong

      long getRepeatingLong(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the long value stored in a repeating attribute, located at a specific index. You can call this method on a single-valued attribute as long as valueIndex is 0.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The long value for a specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating.
      IndexOutOfBoundsException - If the index is out of bounds.
    • getValue

      IDfValue getValue(String attrName) throws IllegalArgumentException
      Returns the value stored in a specific attribute.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      An IDfValue interface to the variant value.
      Throws:
      IllegalArgumentException - If the attribute is not found for this object.
      See Also:
    • getRepeatingId

      IDfId getRepeatingId(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the object ID value stored in a repeating attribute, located at a specific index. You can call this method on a single-valued attribute as long as valueIndex is 0.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The object ID for a specified attribute.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating.
      IndexOutOfBoundsException - If the index is out of bounds.
    • getRepeatingValue

      IDfValue getRepeatingValue(String attrName, int valueIndex) throws IllegalArgumentException, IndexOutOfBoundsException
      Returns the value stored in a repeating attribute, located at a specific index. You can call this method on a single-valued attribute as long as valueIndex is 0.
      Parameters:
      attrName - The name of the repeating attribute.
      valueIndex - The index position of the desired value.
      Returns:
      The value for the specified attribute, at a specific index.
      Throws:
      IllegalArgumentException - If the attribute is not found, or is not repeating.
      IndexOutOfBoundsException - If the index is out of bounds.
    • getStatus

      int getStatus()
      Returns the status of the result.
      Returns:
      The constant corresponding to the result status.
      See Also: