public class BoxEntity extends BoxJsonObject
| Modifier and Type | Class and Description |
|---|---|
static interface |
BoxEntity.BoxEntityCreator
This interface should be used if new types should be added dynamically.
|
BoxJsonObject.BoxJsonObjectCreator<E extends BoxJsonObject>| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIELD_ID |
static java.lang.String |
FIELD_ITEM_ID |
static java.lang.String |
FIELD_ITEM_TYPE |
static java.lang.String |
FIELD_TYPE |
| Constructor and Description |
|---|
BoxEntity()
Constructs an empty BoxEntity object.
|
BoxEntity(com.eclipsesource.json.JsonObject jsonObject)
Constructs a BoxJsonObject based on given JsonObject
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addEntityType(java.lang.String type,
BoxEntity.BoxEntityCreator creator)
Add or replace a type to be recognized by classes using the static helper method createEntityFromJson.
|
static BoxEntity |
createEntityFromJson(com.eclipsesource.json.JsonObject json)
Helper method that will parse into a known child of BoxEntity.
|
static BoxEntity |
createEntityFromJson(java.lang.String json)
Helper method that will parse into a known child of BoxEntity.
|
static BoxJsonObject.BoxJsonObjectCreator<BoxEntity> |
getBoxJsonObjectCreator() |
java.lang.String |
getId()
Gets the id.
|
java.lang.String |
getType()
Gets the type of the entity.
|
addInJsonArray, addInJsonArray, createFromJson, createFromJson, equals, getBoxJsonObjectCreator, getPropertiesKeySet, getPropertyAsBoolean, getPropertyAsDate, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsJsonArray, getPropertyAsJsonObject, getPropertyAsJsonObjectArray, getPropertyAsLong, getPropertyAsString, getPropertyAsStringArray, getPropertyAsStringHashSet, getPropertyValue, hashCode, parseJSONMember, remove, set, set, set, set, set, set, set, set, set, toJson, toJsonObjectpublic static final java.lang.String FIELD_ID
public static final java.lang.String FIELD_TYPE
public static final java.lang.String FIELD_ITEM_TYPE
public static final java.lang.String FIELD_ITEM_ID
public BoxEntity()
public BoxEntity(com.eclipsesource.json.JsonObject jsonObject)
jsonObject - A JsonObject that represents that can be represented by this class.public java.lang.String getId()
public java.lang.String getType()
public static BoxEntity createEntityFromJson(java.lang.String json)
json - json representing a BoxEntity or one of its known children.public static BoxEntity createEntityFromJson(com.eclipsesource.json.JsonObject json)
json - JsonObject representing a BoxEntity or one of its known children.public static void addEntityType(java.lang.String type,
BoxEntity.BoxEntityCreator creator)
type - the string type of the item.creator - A BoxEntityCreator that can create a child of BoxEntity.public static BoxJsonObject.BoxJsonObjectCreator<BoxEntity> getBoxJsonObjectCreator()