public class EntityController
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T extends Data> |
addData(T someData)
Adds the given data to an entity.
|
static <T extends Data> |
getData(java.lang.Class<T> someDataClassType)
Returns the given data of an entity.
|
static java.lang.Long |
getId()
The id of an entity.
|
static java.lang.String |
getName()
The name of an entity.
|
static <T extends Data> |
removeData(java.lang.Class<T> someDataClassType)
Removes the data of given type from an entity.
|
static void |
setEntity(java.lang.Long someId)
Sets the id of an entity to peform actions on it.
|
static void |
unset()
Unsets the id reference.
|
public static void setEntity(java.lang.Long someId)
someId
- Entity id to pefrom actions on.public static java.lang.Long getId()
public static java.lang.String getName()
public static <T extends Data> T getData(java.lang.Class<T> someDataClassType) throws NoSuchEntityException, NoSuchDataOnEntityException
T
- someDataClassType
- NoSuchEntityException
NoSuchDataOnEntityException
public static <T extends Data> void addData(T someData) throws NoSuchEntityException, EntityAlreadHasDataException
T
- T extends Data.someData
- Some data to add.NoSuchEntityException
EntityAlreadHasDataException
public static <T extends Data> void removeData(java.lang.Class<T> someDataClassType) throws java.lang.Exception
T
- T extends Data.someDataClassType
- Some type of data to be removed.java.lang.Exception
public static void unset()