|
||||||||||
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 of Field elements. |
Method Detail |
public java.util.Enumeration getFields()
Field
elements.
Field
spublic boolean fieldExists(Field field)
ISearchResult
.
field
- the Field
to check
true
if the 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
- the Field
to evaluate
String
value of the field
java.lang.IllegalArgumentException
- if the field is not present in this ISearchResult
public int getFieldAsInt(Field field)
Field
as an int
.
Note: Numbers are converted in the search server to a float
; getFieldAsInt
converts the float to an int.
field
- the Field
to evaluate
int
value of the 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: Numbers are converted in the search server to a float
; specifically, properties stored as double
in the portal are rounded to a float
.
field
- the Field
to evaluate
float
value of the field
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: 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
.
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
- the Field
to evaluate
Object
value of the 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 ©2010 Oracle® Corporation. All Rights Reserved.