|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.social.facebook.api.FqlResult
public class FqlResult
Represents a single result item from an FQL query.
Given to an FqlResultMapper
, in a way that is analogous to how a ResultSet is given to a RowMapper in Spring's JdbcTemplate.
Constructor Summary | |
---|---|
FqlResult(Map<String,Object> resultMap)
Constructs an FqlResult instance from a map. |
Method Summary | ||
---|---|---|
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. |
|
|
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. |
|
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FqlResult(Map<String,Object> resultMap)
Method Detail |
---|
public String getString(String fieldName)
fieldName
- the name of the field
public Integer getInteger(String fieldName)
fieldName
- the name of the field
FqlException
- if the field cannot be expressed as an Integerpublic Long getLong(String fieldName)
fieldName
- the name of the field
FqlException
- if the field cannot be expressed as an Longpublic Float getFloat(String fieldName)
fieldName
- the name of the field
FqlException
- if the field cannot be expressed as an Floatpublic Boolean getBoolean(String fieldName)
fieldName
- the name of the field
public Date getTime(String fieldName)
fieldName
- the name of the field
FqlException
- 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 field
public <T> T getObject(String fieldName, FqlResultMapper<T> mapper)
FqlResultMapper
.
fieldName
- 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
.
fieldName
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |