GraphObject.Factory
คลาสนี้ไม่มีให้ใช้งานใน SDK เวอร์ชั่นล่าสุดอีกต่อไป
เวอร์ชั่นที่ใหม่กว่าของคลาสนี้พร้อมแล้ว ตรวจสอบได้ เวอร์ชั่นล่าสุด

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.

ขยาย:Object
แพ็คเกจ:model
วิธีการคลาส
create(JSONObject)

Creates a GraphObject proxy that provides typed access to the data in an underlying JSONObject.

public static GraphObject create(JSONObject json)
พารามิเตอร์คำอธิบาย
jsonThe JSONObject containing the data to be exposed
Returns
A GraphObject that represents the underlying data
create(JSONObject, Class)

Creates a GraphObject-derived proxy that provides typed access to the data in an underlying JSONObject.

public static GraphObject create(JSONObject json, Class graphObjectClass)
พารามิเตอร์คำอธิบาย
jsonThe JSONObject containing the data to be exposed
graphObjectClassThe GraphObject-derived type to return
Returns
A graphObjectClass that represents the underlying data
create()

Creates a GraphObject proxy that initially contains no data.

public static GraphObject create()
Returns
A GraphObject with no data
create(Class)

Creates a GraphObject-derived proxy that initially contains no data.

public static GraphObject create(Class graphObjectClass)
พารามิเตอร์คำอธิบาย
graphObjectClassThe GraphObject-derived type to return
Returns
A graphObjectClass with no data
hasSameId(GraphObject, GraphObject)

Determines if two GraphObjects represent the same underlying graph object, based on their IDs.

public static boolean hasSameId(GraphObject a, GraphObject b)
พารามิเตอร์คำอธิบาย
aA graph object
bAnother graph object
Returns
True if both graph objects have an ID and it is the same ID, false otherwise
createList(JSONArray, Class)

Creates a GraphObjectList-derived proxy that provides typed access to the data in an underlying JSONArray.

public static GraphObjectList createList(JSONArray array, Class graphObjectClass)
พารามิเตอร์คำอธิบาย
arrayThe JSONArray containing the data to be exposed
graphObjectClassThe GraphObject-derived type to return
Returns
A graphObjectClass that represents the underlying data
createList(Class)

Creates a GraphObjectList-derived proxy that initially contains no data.

public static GraphObjectList createList(Class graphObjectClass)
พารามิเตอร์คำอธิบาย
graphObjectClassThe GraphObject-derived type to return
Returns
A GraphObjectList with no data