| Constructor and Description |
|---|
WeakObjectRegistry() |
| Modifier and Type | Method and Description |
|---|---|
Optional<Object> |
getById(UUID id)
Returns the object that is identified by an id.
|
Object |
getByIdOrFail(UUID id)
Returns the object that is identified by an id.
|
Optional<UUID> |
getId(Object object)
Returns the id for an object.
|
UUID |
getIdOrFail(Object object)
Returns the id for an object.
|
UUID |
registerIfUnknown(Object object)
Registers an object in the meta model if it is not already registered.
|
void |
registerObject(Object object,
UUID id)
Registers an object in this model identified by a pre existing id.
|
public Optional<Object> getById(UUID id)
id - The id of the object that should be returned.Optional if not.public Object getByIdOrFail(UUID id) throws ObjectToIdMappingException
id - The id of the object that should be returned.ObjectToIdMappingException - When no object with the given id is registered.public Optional<UUID> getId(Object object)
object - The object thats id should be returned.Optional if not.public UUID getIdOrFail(Object object) throws ObjectToIdMappingException
object - The object thats id should be returned.ObjectToIdMappingException - When no id for this object has been assigned.public UUID registerIfUnknown(Object object)
object - The object to register.Copyright © 2015 Saxonia Systems AG. All Rights Reserved.