|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.facebook.model.GraphObject.Factory
public static final class GraphObject.Factory
Creates proxies that implement GraphObject, GraphObjectList, and their derived types. These proxies allow access to underlying collections and name/value property bags via strongly-typed property getters and setters.
This supports get/set properties that use primitive types, JSON types, Date, other GraphObject types, Iterable, Collection, List, and GraphObjectList.
Method Summary | ||
---|---|---|
static GraphObject |
create()
Creates a GraphObject proxy that initially contains no data. |
|
static
|
create(Class<T> graphObjectClass)
Creates a GraphObject-derived proxy that initially contains no data. |
|
static GraphObject |
create(JSONObject json)
Creates a GraphObject proxy that provides typed access to the data in an underlying JSONObject. |
|
static
|
create(JSONObject json,
Class<T> graphObjectClass)
Creates a GraphObject-derived proxy that provides typed access to the data in an underlying JSONObject. |
|
static
|
createList(Class<T> graphObjectClass)
Creates a GraphObjectList-derived proxy that initially contains no data. |
|
static
|
createList(JSONArray array,
Class<T> graphObjectClass)
Creates a GraphObjectList-derived proxy that provides typed access to the data in an underlying JSONArray. |
|
static boolean |
hasSameId(GraphObject a,
GraphObject b)
Determines if two GraphObjects represent the same underlying graph object, based on their IDs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static GraphObject create(JSONObject json)
json
- the JSONObject containing the data to be exposed
FacebookException
- If the passed in Class is not a valid GraphObject interfacepublic static <T extends GraphObject> T create(JSONObject json, Class<T> graphObjectClass)
json
- the JSONObject containing the data to be exposedgraphObjectClass
- the GraphObject-derived type to return
FacebookException
- If the passed in Class is not a valid GraphObject interfacepublic static GraphObject create()
FacebookException
- If the passed in Class is not a valid GraphObject interfacepublic static <T extends GraphObject> T create(Class<T> graphObjectClass)
graphObjectClass
- the GraphObject-derived type to return
FacebookException
- If the passed in Class is not a valid GraphObject interfacepublic static boolean hasSameId(GraphObject a, GraphObject b)
a
- a graph objectb
- another graph object
public static <T> GraphObjectList<T> createList(JSONArray array, Class<T> graphObjectClass)
array
- the JSONArray containing the data to be exposedgraphObjectClass
- the GraphObject-derived type to return
FacebookException
- If the passed in Class is not a valid GraphObject interfacepublic static <T> GraphObjectList<T> createList(Class<T> graphObjectClass)
graphObjectClass
- the GraphObject-derived type to return
FacebookException
- If the passed in Class is not a valid GraphObject interface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |