Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.plumtree.remote.prc.search
Interface ISearchResult

All Known Subinterfaces:
  IPortalSearchResult

public interface ISearchResult

Interface to return information about individual search results.

Method Summary
`boolean` | `fieldExists(Field field)` Whether a particular field is present in this `ISearchResult`.
`java.util.Date` | `getFieldAsDate(Field field)` Gets the value of the specified `Field` as a `Date`.
`float` | `getFieldAsFloat(Field field)` Gets the value of the specified `Field` as a `float`.
`int` | `getFieldAsInt(Field field)` Gets the value of the specified `Field` as an `int`.
`java.lang.Object` | `getFieldAsObject(Field field)` Gets the value of the specified `Field` as an `Object`.
`java.lang.String` | `getFieldAsString(Field field)` Gets the `toString()` value of the specified `Field`.
`java.util.Enumeration` | `getFields()` Gets an enumeration of `Field` elements.

Method Detail

### getFields

    public java.util.Enumeration getFields()

  Gets an enumeration of `Field` elements.

  Returns:
    an enumeration of `Field`s

### fieldExists

    public boolean fieldExists(Field field)

  Whether a particular field is present in this `ISearchResult`.

  Parameters:
    `field` - the `Field` to check
  Returns:
    `true` if the field exists

### getFieldAsString

    public java.lang.String getFieldAsString(Field field)

  Gets the `toString()` value of the specified `Field`. This method can be used for all `Field`s, as it does not check if the value is of type `String`.

  Parameters:
    `field` - the `Field` to evaluate
  Returns:
    the `String` value of the field
  Throws:
    `java.lang.IllegalArgumentException` - if the field is not present in this `ISearchResult`

### getFieldAsInt

    public int getFieldAsInt(Field field)

  Gets the value of the specified `Field` as an `int`. Note: Numbers are converted in the search server to a `float`; `getFieldAsInt` converts the float to an int.

  Parameters:
    `field` - the `Field` to evaluate
  Returns:
    the `int` value of the field
  Throws:
    `java.lang.ClassCastException` - if the value of the field is not of type int or the value is `null`. Use `getFieldAsObject()` to check if the value is `null`.
    `java.lang.IllegalArgumentException` - if the field is not present in this `ISearchResult`

### getFieldAsFloat

    public float getFieldAsFloat(Field field)

  Gets the value of the specified `Field` as a `float`. Note: Numbers are converted in the search server to a `float`; specifically, properties stored as `double` in the portal are rounded to a `float`.

  Parameters:
    `field` - the `Field` to evaluate
  Returns:
    the `float` value of the field
  Throws:
    `java.lang.IllegalArgumentException` - if the field is not present in this ISearchResult
    `java.lang.ClassCastException` - if the value of the field is not of type float or the value is null. Use `getFieldAsObject()` to check if the value is null.

### getFieldAsDate

    public java.util.Date getFieldAsDate(Field field)

  Gets the value of the specified `Field` as a `Date`. Note: `Date`s in the search server are only accurate to four minutes, as the `double` used to store dates in the portal is converted to `float`.

  Returns:
    the Date value of the field
  Throws:
    `java.lang.IllegalArgumentException` - if the field is not present in this ISearchResult
    `java.lang.ClassCastException` - if the value of the field is not of type Date or the value is null. Use `getFieldAsObject()` to check if the value is null.

### getFieldAsObject

    public java.lang.Object getFieldAsObject(Field field)

  Gets the value of the specified `Field` as an `Object`.

  Parameters:
    `field` - the `Field` to evaluate
  Returns:
    the `Object` value of the field
  Throws:
    `java.lang.IllegalArgumentException` - if the field is not present in this `ISearchResult`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For additional information on the IDK, including tutorials, blogs, code samples and more, see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.