facebook4j.json
Class DataObjectFactory

java.lang.Object
  extended by facebook4j.json.DataObjectFactory

public final class DataObjectFactory
extends Object

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
static Account createAccount(String rawJSON)
          Constructs a Account object from rawJSON string.
static Achievement createAchievement(String rawJSON)
          Constructs a Achievement object from rawJSON string.
static Activity createActivity(String rawJSON)
          Constructs a Activity object from rawJSON string.
static Admin createAdmin(String rawJSON)
          Constructs a Admin object from rawJSON string.
static Album createAlbum(String rawJSON)
          Constructs a Album object from rawJSON string.
static Book createBook(String rawJSON)
          Constructs a Book object from rawJSON string.
static Category createCategory(String rawJSON)
          Constructs a Category object from rawJSON string.
static Checkin createCheckin(String rawJSON)
          Constructs a Checkin object from rawJSON string.
static Comment createComment(String rawJSON)
          Constructs a Comment object from rawJSON string.
static Domain createDomain(String rawJSON)
          Constructs a Domain object from rawJSON string.
static Event createEvent(String rawJSON)
          Constructs a Event object from rawJSON string.
static Family createFamily(String rawJSON)
          Constructs a Family object from rawJSON string.
static Friend createFriend(String rawJSON)
          Constructs a Friend object from rawJSON string.
static Friendlist createFriendlist(String rawJSON)
          Constructs a Friendlist object from rawJSON string.
static FriendRequest createFriendRequest(String rawJSON)
          Constructs a FriendRequest object from rawJSON string.
static Game createGame(String rawJSON)
          Constructs a Game object from rawJSON string.
static Group createGroup(String rawJSON)
          Constructs a Group object from rawJSON string.
static GroupDoc createGroupDoc(String rawJSON)
          Constructs a GroupDoc object from rawJSON string.
static GroupMember createGroupMember(String rawJSON)
          Constructs a GroupMember object from rawJSON string.
static Insight createInsight(String rawJSON)
          Constructs a Insight object from rawJSON string.
static Interest createInterest(String rawJSON)
          Constructs a Interest object from rawJSON string.
static Like createLike(String rawJSON)
          Constructs a Like object from rawJSON string.
static Link createLink(String rawJSON)
          Constructs a Link object from rawJSON string.
static Location createLocation(String rawJSON)
          Constructs a Location object from rawJSON string.
static Message createMessage(String rawJSON)
          Constructs a Message object from rawJSON string.
static Milestone createMilestone(String rawJSON)
          Constructs a Milestone object from rawJSON string.
static Movie createMovie(String rawJSON)
          Constructs a Movie object from rawJSON string.
static Music createMusic(String rawJSON)
          Constructs a Music object from rawJSON string.
static Note createNote(String rawJSON)
          Constructs a Note object from rawJSON string.
static Notification createNotification(String rawJSON)
          Constructs a Notification object from rawJSON string.
static Offer createOffer(String rawJSON)
          Constructs a Offer object from rawJSON string.
static Page createPage(String rawJSON)
          Constructs a Page object from rawJSON string.
static PageSetting createPageSetting(String rawJSON)
          Constructs a PageSetting object from rawJSON string.
static Photo createPhoto(String rawJSON)
          Constructs a Photo object from rawJSON string.
static Place createPlace(String rawJSON)
          Constructs a Place object from rawJSON string.
static Poke createPoke(String rawJSON)
          Constructs a Poke object from rawJSON string.
static Post createPost(String rawJSON)
          Constructs a Post object from rawJSON string.
static Question createQuestion(String rawJSON)
          Constructs a Question object from rawJSON string.
static QuestionVotes createQuestionVotes(String rawJSON)
          Constructs a QuestionVotes object from rawJSON string.
static RSVPStatus createRSVPStatus(String rawJSON)
          Constructs a RSVPStatus object from rawJSON string.
static Score createScore(String rawJSON)
          Constructs a Score object from rawJSON string.
static Subscribedto createSubscribedto(String rawJSON)
          Constructs a Subscribedto object from rawJSON string.
static Subscriber createSubscriber(String rawJSON)
          Constructs a Subscriber object from rawJSON string.
static Tab createTab(String rawJSON)
          Constructs a Tab object from rawJSON string.
static Tag createTag(String rawJSON)
          Constructs a Tag object from rawJSON string.
static Tagged createTagged(String rawJSON)
          Constructs a Tagged object from rawJSON string.
static Television createTelevision(String rawJSON)
          Constructs a Television object from rawJSON string.
static User createUser(String rawJSON)
          Constructs a User object from rawJSON string.
static Video createVideo(String rawJSON)
          Constructs a Video object from rawJSON string.
static String getRawJSON(Object obj)
          Returns a raw JSON form of the provided object.
Note that raw JSON forms can be retrieved only from the same thread invoked the last method call and will become inaccessible once another method call
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRawJSON

public static String getRawJSON(Object obj)
Returns a raw JSON form of the provided object.
Note that raw JSON forms can be retrieved only from the same thread invoked the last method call and will become inaccessible once another method call

Parameters:
obj -
Returns:
raw JSON

createAccount

public static Account createAccount(String rawJSON)
                             throws FacebookException
Constructs a Account object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Account
Throws:
FacebookException - when provided string is not a valid JSON string.

createAchievement

public static Achievement createAchievement(String rawJSON)
                                     throws FacebookException
Constructs a Achievement object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Achievement
Throws:
FacebookException - when provided string is not a valid JSON string.

createActivity

public static Activity createActivity(String rawJSON)
                               throws FacebookException
Constructs a Activity object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Activity
Throws:
FacebookException - when provided string is not a valid JSON string.

createAdmin

public static Admin createAdmin(String rawJSON)
                         throws FacebookException
Constructs a Admin object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Admin
Throws:
FacebookException - when provided string is not a valid JSON string.

createAlbum

public static Album createAlbum(String rawJSON)
                         throws FacebookException
Constructs a Album object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Album
Throws:
FacebookException - when provided string is not a valid JSON string.

createBook

public static Book createBook(String rawJSON)
                       throws FacebookException
Constructs a Book object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Book
Throws:
FacebookException - when provided string is not a valid JSON string.

createCategory

public static Category createCategory(String rawJSON)
                               throws FacebookException
Constructs a Category object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Category
Throws:
FacebookException - when provided string is not a valid JSON string.

createCheckin

public static Checkin createCheckin(String rawJSON)
                             throws FacebookException
Constructs a Checkin object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Checkin
Throws:
FacebookException - when provided string is not a valid JSON string.

createComment

public static Comment createComment(String rawJSON)
                             throws FacebookException
Constructs a Comment object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Comment
Throws:
FacebookException - when provided string is not a valid JSON string.

createDomain

public static Domain createDomain(String rawJSON)
                           throws FacebookException
Constructs a Domain object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Domain
Throws:
FacebookException - when provided string is not a valid JSON string.

createEvent

public static Event createEvent(String rawJSON)
                         throws FacebookException
Constructs a Event object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Event
Throws:
FacebookException - when provided string is not a valid JSON string.

createFamily

public static Family createFamily(String rawJSON)
                           throws FacebookException
Constructs a Family object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Family
Throws:
FacebookException - when provided string is not a valid JSON string.

createFriend

public static Friend createFriend(String rawJSON)
                           throws FacebookException
Constructs a Friend object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Friend
Throws:
FacebookException - when provided string is not a valid JSON string.

createFriendlist

public static Friendlist createFriendlist(String rawJSON)
                                   throws FacebookException
Constructs a Friendlist object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Friendlist
Throws:
FacebookException - when provided string is not a valid JSON string.

createFriendRequest

public static FriendRequest createFriendRequest(String rawJSON)
                                         throws FacebookException
Constructs a FriendRequest object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
FriendRequest
Throws:
FacebookException - when provided string is not a valid JSON string.

createGame

public static Game createGame(String rawJSON)
                       throws FacebookException
Constructs a Game object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Game
Throws:
FacebookException - when provided string is not a valid JSON string.

createGroupDoc

public static GroupDoc createGroupDoc(String rawJSON)
                               throws FacebookException
Constructs a GroupDoc object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
GroupDoc
Throws:
FacebookException - when provided string is not a valid JSON string.

createGroup

public static Group createGroup(String rawJSON)
                         throws FacebookException
Constructs a Group object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Group
Throws:
FacebookException - when provided string is not a valid JSON string.

createGroupMember

public static GroupMember createGroupMember(String rawJSON)
                                     throws FacebookException
Constructs a GroupMember object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
GroupMember
Throws:
FacebookException - when provided string is not a valid JSON string.

createInsight

public static Insight createInsight(String rawJSON)
                             throws FacebookException
Constructs a Insight object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Insight
Throws:
FacebookException - when provided string is not a valid JSON string.

createInterest

public static Interest createInterest(String rawJSON)
                               throws FacebookException
Constructs a Interest object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Interest
Throws:
FacebookException - when provided string is not a valid JSON string.

createLike

public static Like createLike(String rawJSON)
                       throws FacebookException
Constructs a Like object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Like
Throws:
FacebookException - when provided string is not a valid JSON string.

createLink

public static Link createLink(String rawJSON)
                       throws FacebookException
Constructs a Link object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Link
Throws:
FacebookException - when provided string is not a valid JSON string.

createLocation

public static Location createLocation(String rawJSON)
                               throws FacebookException
Constructs a Location object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Location
Throws:
FacebookException - when provided string is not a valid JSON string.

createMessage

public static Message createMessage(String rawJSON)
                             throws FacebookException
Constructs a Message object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Message
Throws:
FacebookException - when provided string is not a valid JSON string.

createMilestone

public static Milestone createMilestone(String rawJSON)
                                 throws FacebookException
Constructs a Milestone object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Milestone
Throws:
FacebookException - when provided string is not a valid JSON string.

createMovie

public static Movie createMovie(String rawJSON)
                         throws FacebookException
Constructs a Movie object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Movie
Throws:
FacebookException - when provided string is not a valid JSON string.

createMusic

public static Music createMusic(String rawJSON)
                         throws FacebookException
Constructs a Music object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Music
Throws:
FacebookException - when provided string is not a valid JSON string.

createNote

public static Note createNote(String rawJSON)
                       throws FacebookException
Constructs a Note object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Note
Throws:
FacebookException - when provided string is not a valid JSON string.

createNotification

public static Notification createNotification(String rawJSON)
                                       throws FacebookException
Constructs a Notification object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Notification
Throws:
FacebookException - when provided string is not a valid JSON string.

createOffer

public static Offer createOffer(String rawJSON)
                         throws FacebookException
Constructs a Offer object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Offer
Throws:
FacebookException - when provided string is not a valid JSON string.

createPage

public static Page createPage(String rawJSON)
                       throws FacebookException
Constructs a Page object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Page
Throws:
FacebookException - when provided string is not a valid JSON string.

createPageSetting

public static PageSetting createPageSetting(String rawJSON)
                                     throws FacebookException
Constructs a PageSetting object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
PageSetting
Throws:
FacebookException - when provided string is not a valid JSON string.

createPhoto

public static Photo createPhoto(String rawJSON)
                         throws FacebookException
Constructs a Photo object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Photo
Throws:
FacebookException - when provided string is not a valid JSON string.

createPlace

public static Place createPlace(String rawJSON)
                         throws FacebookException
Constructs a Place object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Place
Throws:
FacebookException - when provided string is not a valid JSON string.

createPoke

public static Poke createPoke(String rawJSON)
                       throws FacebookException
Constructs a Poke object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Poke
Throws:
FacebookException - when provided string is not a valid JSON string.

createPost

public static Post createPost(String rawJSON)
                       throws FacebookException
Constructs a Post object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Post
Throws:
FacebookException - when provided string is not a valid JSON string.

createQuestion

public static Question createQuestion(String rawJSON)
                               throws FacebookException
Constructs a Question object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Question
Throws:
FacebookException - when provided string is not a valid JSON string.

createQuestionVotes

public static QuestionVotes createQuestionVotes(String rawJSON)
                                         throws FacebookException
Constructs a QuestionVotes object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
QuestionVotes
Throws:
FacebookException - when provided string is not a valid JSON string.

createRSVPStatus

public static RSVPStatus createRSVPStatus(String rawJSON)
                                   throws FacebookException
Constructs a RSVPStatus object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
RSVPStatus
Throws:
FacebookException - when provided string is not a valid JSON string.

createScore

public static Score createScore(String rawJSON)
                         throws FacebookException
Constructs a Score object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Score
Throws:
FacebookException - when provided string is not a valid JSON string.

createSubscribedto

public static Subscribedto createSubscribedto(String rawJSON)
                                       throws FacebookException
Constructs a Subscribedto object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Subscribedto
Throws:
FacebookException - when provided string is not a valid JSON string.

createSubscriber

public static Subscriber createSubscriber(String rawJSON)
                                   throws FacebookException
Constructs a Subscriber object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Subscriber
Throws:
FacebookException - when provided string is not a valid JSON string.

createTab

public static Tab createTab(String rawJSON)
                     throws FacebookException
Constructs a Tab object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Tab
Throws:
FacebookException - when provided string is not a valid JSON string.

createTagged

public static Tagged createTagged(String rawJSON)
                           throws FacebookException
Constructs a Tagged object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Tagged
Throws:
FacebookException - when provided string is not a valid JSON string.

createTag

public static Tag createTag(String rawJSON)
                     throws FacebookException
Constructs a Tag object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Tag
Throws:
FacebookException - when provided string is not a valid JSON string.

createTelevision

public static Television createTelevision(String rawJSON)
                                   throws FacebookException
Constructs a Television object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Television
Throws:
FacebookException - when provided string is not a valid JSON string.

createUser

public static User createUser(String rawJSON)
                       throws FacebookException
Constructs a User object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
User
Throws:
FacebookException - when provided string is not a valid JSON string.

createVideo

public static Video createVideo(String rawJSON)
                         throws FacebookException
Constructs a Video object from rawJSON string.

Parameters:
rawJSON - raw JSON form as String
Returns:
Video
Throws:
FacebookException - when provided string is not a valid JSON string.


Copyright © 2019. All rights reserved.