public class FqlResult extends Object
FqlResultMapper, in a way that is analogous to how a ResultSet is given to a RowMapper in Spring's JdbcTemplate.| Constructor and Description |
|---|
FqlResult(Map<String,Object> resultMap)
Constructs an FqlResult instance from a map.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getBoolean(String fieldName)
Returns the value of the identified field as a Boolean.
|
Float |
getFloat(String fieldName)
Returns the value of the identified field as a Float.
|
Integer |
getInteger(String fieldName)
Returns the value of the identified field as an Integer.
|
<T> List<T> |
getList(String fieldName,
FqlResultMapper<T> mapper)
Returns the value of the identified field as an object mapped by a given
FqlResultMapper. |
Long |
getLong(String fieldName)
Returns the value of the identified field as a Long.
|
Object |
getObject(String fieldName)
Returns the value of the identified field as a simple Object.
|
<T> T |
getObject(String fieldName,
FqlResultMapper<T> mapper)
Returns the value of the identified field as an object mapped by a given
FqlResultMapper. |
String |
getString(String fieldName)
Returns the value of the identified field as a String.
|
Date |
getTime(String fieldName)
Returns the value of the identified field as a Date.
|
boolean |
hasField(String fieldName)
Checks for the existence of a field in the result set, whether null or non-null.
|
boolean |
hasValue(String fieldName)
Checks that a field exists and contains a non-null value.
|
public String getString(String fieldName)
fieldName - the name of the fieldpublic Integer getInteger(String fieldName)
fieldName - the name of the fieldFqlException - if the field cannot be expressed as an Integerpublic Long getLong(String fieldName)
fieldName - the name of the fieldFqlException - if the field cannot be expressed as an Longpublic Float getFloat(String fieldName)
fieldName - the name of the fieldFqlException - if the field cannot be expressed as an Floatpublic Boolean getBoolean(String fieldName)
fieldName - the name of the fieldpublic Date getTime(String fieldName)
fieldName - the name of the fieldFqlException - if the field's value cannot be expressed as a long value from which a Date object can be constructed.public Object getObject(String fieldName)
fieldName - the name of the fieldpublic <T> T getObject(String fieldName, FqlResultMapper<T> mapper)
FqlResultMapper.T - the Java type to bind the Facebook object tofieldName - the name of the fieldmapper - an FqlResultMapper used to map the object date into a specific type.FqlResultMapper.FqlException - if the value of the field is not a nested object.public <T> List<T> getList(String fieldName, FqlResultMapper<T> mapper)
FqlResultMapper.T - the Java type to bind the Facebook object tofieldName - the name of the fieldmapper - an FqlResultMapper used to map the object date into a specific type.FqlResultMapper.FqlException - if the value of the field is not a list.public boolean hasField(String fieldName)
fieldName - the name of the field to check existence of.public boolean hasValue(String fieldName)
fieldName - the name of the field to check existence/value of.