public class ObjectManagerDefault extends Object implements IObjectManager
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<?>,AbstractPluginObject> |
entities
Map of instances for a given entity.
|
| Constructor and Description |
|---|
ObjectManagerDefault() |
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
all(Class<T> clazz)
Lookup for a object of a given type, with the given key.
|
void |
bind(AbstractPluginObject input)
Bind a object plugin to the manager.
|
void |
clear()
Clear all object mappings.
|
<T> T |
get(Class<T> clazz,
IPredicate<T> filter)
Lookup for a object of a given type, with the given filter.
|
<T> T |
get(Class<T> clazz,
String key)
Lookup for a object of a given type, with the given key.
|
Map<Class<?>,AbstractPluginObject> |
getEntities()
The mapping of all entities.
|
boolean |
isBound(Class<?> clazz)
Check if a given class is bound to a AbstractPluginObject.
|
<T> List<T> |
select(Class<T> clazz,
IPredicate<T> filter)
Lookup for a object of a given type, filtered by a predicate.
|
protected Map<Class<?>,AbstractPluginObject> entities
public boolean isBound(Class<?> clazz)
IObjectManagerisBound in interface IObjectManagerclazz - The object type.public void bind(AbstractPluginObject input)
IObjectManagerbind in interface IObjectManagerinput - The object plugin.public <T> List<T> all(Class<T> clazz) throws PluginException
IObjectManagerall in interface IObjectManagerclazz - The object type.PluginException - On lookup errors.public <T> List<T> select(Class<T> clazz, IPredicate<T> filter) throws PluginException
IObjectManagerselect in interface IObjectManagerclazz - The object type.filter - The filter predicate.PluginException - On lookup errors.public <T> T get(Class<T> clazz, String key) throws PluginException
IObjectManagerget in interface IObjectManagerclazz - The object type.key - The object key.PluginException - On lookup errors.public <T> T get(Class<T> clazz, IPredicate<T> filter) throws PluginException
IObjectManagerget in interface IObjectManagerclazz - The object type.filter - The filter predicate.PluginException - On lookup errors, i.e. more than 1 element returned by
filter.public Map<Class<?>,AbstractPluginObject> getEntities()
IObjectManagergetEntities in interface IObjectManagerpublic void clear()
IObjectManagerclear in interface IObjectManagerCopyright © 2016. All rights reserved.