T
- Should be a sub class of RegistryBean
classpublic abstract class AbstractManager<T extends RegistryBean> extends java.lang.Object implements Manager<T>
Constructor and Description |
---|
AbstractManager() |
Modifier and Type | Method and Description |
---|---|
T |
create()
Creates a new bean instance.
|
void |
delete(java.util.Collection<RegistryBean> beans)
Delete a
Collection of beans from the registry. |
void |
delete(T bean)
Delete a bean from the registry.
|
T |
insert(T pBean)
Inserts a bean, which has previously been created using
Manager.create() ,
into the bean pool. |
T |
read(java.lang.String id)
Reads from the registry a bean having a given id.
|
void |
update(java.util.Collection<RegistryBean> beans)
Updates a
Collection of beans. |
void |
update(T pBean)
Updates the bean in the pool by replacing the existing implementation
with this one.
|
public T create() throws ManagerException
Manager
Manager.insert(RegistryBean)
to add the edited bean to the pool later
on.create
in interface Manager<T extends RegistryBean>
ManagerException
- If an error occurs while creating the bean instancepublic T insert(T pBean) throws ManagerException
Manager
Manager.create()
,
into the bean pool. The bean pool will ensure, that the bean is created
in the database later on.insert
in interface Manager<T extends RegistryBean>
pBean
- The bean, which has been edited. The user must not
use the bean later on. Instead, he shall replace it with the
copy, that the method returns.ManagerException
- If an error occurs while inserting the bean instancepublic void update(T pBean) throws ManagerException
Manager
update
in interface Manager<T extends RegistryBean>
pBean
- The bean, which has to be updated.ManagerException
- If an error occurs while updating the bean instancepublic void update(java.util.Collection<RegistryBean> beans) throws ManagerException
Manager
Collection
of beans.update
in interface Manager<T extends RegistryBean>
beans
- The Collection
of RegistryBean
s to updateManagerException
- If an error occurs in updating the given collection of beanspublic T read(java.lang.String id) throws ManagerException
Manager
read
in interface Manager<T extends RegistryBean>
id
- Registry id.ManagerException
- If an error occurs while trying to read the bean objectpublic void delete(T bean) throws ManagerException
Manager
delete
in interface Manager<T extends RegistryBean>
bean
- The bean object to deleteManagerException
- If an error occurs while trying to delete the bean objectpublic void delete(java.util.Collection<RegistryBean> beans) throws ManagerException
Manager
Collection
of beans from the registry.delete
in interface Manager<T extends RegistryBean>
beans
- The Collection
of RegistryBean
s to deleteManagerException
- If an error occurs while trying to delete a collection of bean objects