Package com.restfb.types
Class From
-
- All Implemented Interfaces:
Serializable
public class From extends NamedFacebookType
From
type is used as replacement for the case we need a user or a page. Because these both types have different fields we have this special handling. Because the minimal intersection of page and user are id and name, so theFrom
object extends the {@see NamedFacebookType} and as fast access name and id are available.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
-
Constructor Summary
Constructors Constructor Description From()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
convert(JsonMapper jsonMapper)
Page
getAsPage()
returns the from field as {@see com.restfb.types.Page} objectUser
getAsUser()
returns the from field as {@see com.restfb.types.User} objectvoid
setPage(Page page)
void
setUser(User user)
-
Methods inherited from class com.restfb.types.NamedFacebookType
getName, setName
-
Methods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setType
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
From
public From()
-
-
Method Detail
-
getAsUser
public User getAsUser()
returns the from field as {@see com.restfb.types.User} object- Returns:
- the from field as User
-
getAsPage
public Page getAsPage()
returns the from field as {@see com.restfb.types.Page} object- Returns:
- the from field as Page
-
convert
protected void convert(JsonMapper jsonMapper)
-
-