|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 whose elements are Field s. |
Method Detail |
public java.util.Enumeration getFields()
Field
s.
Field
spublic boolean fieldExists(Field field)
ISearchResult
.
field
- Field
to check
true
if field existspublic java.lang.String getFieldAsString(Field field)
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
.
field
- Field
to evaluate
String
value of field
java.lang.IllegalArgumentException
- if the field is not present in this ISearchResult
public int getFieldAsInt(Field field)
Field
as an int
.
Note that numbers are converted in the search server to a float
; getFieldAsInt will then convert the float to an int.
field
- Field
to evaluate
int
value of field
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
public float getFieldAsFloat(Field field)
Field
as a float
.
Note that numbers are converted in the search server to a float
; specifically, properties stored as double
in the portal are rounded to a float
.
field
- Field
to evaluate
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.public java.util.Date getFieldAsDate(Field field)
Field
as a Date
.
Note that 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
.
field
- Field
to evaluate
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.public java.lang.Object getFieldAsObject(Field field)
Field
as an Object
.
field
- Field
to evaluate
Object
value of field
java.lang.IllegalArgumentException
- if the field is not present in this ISearchResult
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.