|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.centrasite.appl.framework.persistence.impl.BeanPoolImpl
public class BeanPoolImpl
Default implementation of the BeanPool
interface.
Constructor Summary | |
---|---|
BeanPoolImpl(BeanFactory factory,
RegistryProvider registryProvider,
ConfigurationManager confManager)
Creates a new instance with the given bean factory and registry provider. |
|
BeanPoolImpl(RegistryProvider registryProvider,
ConfigurationManager confManager)
Creates a new instance with the given registry provider. |
Method Summary | ||
---|---|---|
void |
addPersistenceListener(PersistenceEventListener listener)
Method for adding a PersistenceEventListener to listen on events
for this BeanPool . |
|
void |
addRelation(RelationInfo relation)
Registers relation to the given bean. |
|
|
attach(T bean)
Insert a bean in the pool. |
|
void |
clear()
Clears the pool. |
|
void |
clearJaxrCache()
Clears the underlying JAXR object cache. |
|
|
create(java.lang.Class<T> interfaceClass)
Creates a new bean instance of the given class. |
|
Search |
createSearch()
Create a Search instance for all registered bean types. |
|
Search |
createSearch(java.lang.Class<? extends RegistryBean> beanClass)
Create a Search instance for the given registry bean type. |
|
Search |
createSearch(java.util.List<java.lang.Class<? extends RegistryBean>> beanClasses)
Create a Search instance for the given registry bean types. |
|
|
delete(java.util.Collection<T> beans)
Deletes a Collection of beans from the registry. |
|
|
delete(T bean)
Deletes a bean from the registry. |
|
RegistryBean |
detach(RegistryBean bean)
This is a method to remove(detach) from the BeanPool . |
|
void |
flush()
Flushes all changes made to the beans to the Registry. |
|
BeanFactory |
getBeanFactory()
Retrieves the bean factory. |
|
BeanInfo |
getBeanInfo(RegistryBean bean)
Retrieves the BeanInfo for a bean. |
|
BeanType |
getBeanType(RegistryBean bean)
Retrieves the BeanType meta-information for the given bean. |
|
ConfigurationManager |
getConfigurationManager()
Retrieves the ConfigurationManager |
|
FlushMode |
getFlushMode()
Retrieves the current FlushMode |
|
PersistenceContext |
getPersistenceContext()
Retrieves the PersistenceContext |
|
java.util.Collection<PersistenceEventListener> |
getPersistenceListeners()
Retrieves the list of currently registerred PersistenceEventListener instances for this BeanPool . |
|
RegistryObjectModel |
getRegistryObjectModel()
Retrieves the RegistryObjectModel instance for this bean pool.. |
|
java.util.Set<RelationInfo> |
getSourceRelations(RegistryBean bean)
Retrieves all registered relations inside the pool where the given bean is the source. |
|
java.util.Set<RelationInfo> |
getTargetRelations(RegistryBean bean)
Retrieves all registered relations inside the pool where the given bean is the target. |
|
|
insert(T bean)
Deprecated. |
|
boolean |
isManaged(RegistryBean bean)
Check if a given bean is being managed by the pool. |
|
boolean |
isModified(RegistryBean bean)
Check if a given managed by the pool bean is modified. |
|
|
read(java.lang.Class<T> beanClass,
javax.xml.registry.infomodel.RegistryObject ro)
Read a registry bean of the specified type and for the specified RegistryObject. |
|
|
read(java.lang.Class<T> beanClass,
java.lang.String id)
Read for the registry a bean of specified type and having a given id. |
|
void |
removePersistenceListener(PersistenceEventListener listener)
Removes a priorly registerred PersistenceEventListener . |
|
void |
removeRelation(RelationInfo relation)
Removes the given RelationInfo from the pool. |
|
|
run(Query<T> query)
Called to perform a registry query. |
|
void |
setFlushMode(FlushMode flushMode)
Sets the FlushMode |
|
|
update(java.util.Collection<T> beans)
Updates a Collection of beans already managed by the
BeanPool . |
|
|
update(T bean)
Updates a bean already stored in the BeanPool . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanPoolImpl(RegistryProvider registryProvider, ConfigurationManager confManager)
public BeanPoolImpl(BeanFactory factory, RegistryProvider registryProvider, ConfigurationManager confManager)
Method Detail |
---|
public ConfigurationManager getConfigurationManager()
ManagedBeanPool
ConfigurationManager
getConfigurationManager
in interface ManagedBeanPool
ConfigurationManager
public <T extends RegistryBean> T create(java.lang.Class<T> interfaceClass) throws JBMException
BeanPool
BeanPool
.
create
in interface BeanPool
T
- type extending the RegistryBean
interface.
RegistryBean
JBMException
public <T extends RegistryBean> T insert(T bean) throws JBMException
insert
in interface BeanPool
T
- type extending the RegistryBean
interface.
RegistryBean
- the bean that is manager by
the BeanPool
.
JBMException
public <T extends RegistryBean> T read(java.lang.Class<T> beanClass, java.lang.String id) throws JBMException
BeanPool
read
in interface BeanPool
T
- type extending the RegistryBean
interface.
JBMException
public <T extends RegistryBean> java.util.List<T> run(Query<T> query) throws CSAppFrameworkException
BeanPool
Query.run(com.softwareag.centrasite.appl.framework.persistence.QueryContext)
.
run
in interface BeanPool
CSAppFrameworkException
public <T extends RegistryBean> void update(T bean) throws JBMException
BeanPool
BeanPool
.
update
in interface BeanPool
T
- type extending the RegistryBean
interface.
JBMException
public <T extends RegistryBean> void update(java.util.Collection<T> beans) throws JBMException
BeanPool
Collection
of beans already managed by the
BeanPool
.
update
in interface BeanPool
T
- type extending the RegistryBean
interface.
JBMException
public void flush() throws JBMException
BeanPool
flush
in interface BeanPool
JBMException
public <T extends RegistryBean> void delete(T bean) throws JBMException
BeanPool
delete
in interface BeanPool
T
- type extending the RegistryBean
interface.
JBMException
public <T extends RegistryBean> void delete(java.util.Collection<T> beans) throws JBMException
BeanPool
Collection
of beans from the registry.
delete
in interface BeanPool
T
- type extending the RegistryBean
interface.
JBMException
public FlushMode getFlushMode()
BeanPool
FlushMode
getFlushMode
in interface BeanPool
FlushMode
public void setFlushMode(FlushMode flushMode)
BeanPool
FlushMode
setFlushMode
in interface BeanPool
public BeanInfo getBeanInfo(RegistryBean bean)
ManagedBeanPool
BeanInfo
for a bean.
getBeanInfo
in interface ManagedBeanPool
BeanInfo
public boolean isManaged(RegistryBean bean)
ManagedBeanPool
isManaged
in interface ManagedBeanPool
public boolean isModified(RegistryBean bean)
ManagedBeanPool
isModified
in interface ManagedBeanPool
public BeanFactory getBeanFactory()
ManagedBeanPool
getBeanFactory
in interface ManagedBeanPool
BeanFactory
public void clear() throws JBMException
BeanPool
clear
in interface BeanPool
JBMException
public RegistryBean detach(RegistryBean bean)
BeanPool
BeanPool
. Its
lifecycle will not be managed by the pool anymore. The bean can be
attached back to the pool at anytime by invoking the
BeanPool.update(RegistryBean)
method.
detach
in interface BeanPool
public void addPersistenceListener(PersistenceEventListener listener)
BeanPool
PersistenceEventListener
to listen on events
for this BeanPool
.
addPersistenceListener
in interface BeanPool
public java.util.Collection<PersistenceEventListener> getPersistenceListeners()
BeanPool
PersistenceEventListener
instances for this BeanPool
.
getPersistenceListeners
in interface BeanPool
List
public void removePersistenceListener(PersistenceEventListener listener)
BeanPool
PersistenceEventListener
.
removePersistenceListener
in interface BeanPool
public PersistenceContext getPersistenceContext()
ManagedBeanPool
PersistenceContext
getPersistenceContext
in interface ManagedBeanPool
PersistenceContext
public void addRelation(RelationInfo relation)
addRelation
in interface ManagedBeanPool
public void removeRelation(RelationInfo relation)
RelationInfo
from the pool.
removeRelation
in interface ManagedBeanPool
public java.util.Set<RelationInfo> getSourceRelations(RegistryBean bean)
getSourceRelations
in interface ManagedBeanPool
public java.util.Set<RelationInfo> getTargetRelations(RegistryBean bean)
getTargetRelations
in interface ManagedBeanPool
public BeanType getBeanType(RegistryBean bean)
BeanType
meta-information for the given bean.
getBeanType
in interface ManagedBeanPool
BeanType
public <T extends RegistryBean> T attach(T bean) throws JBMException
BeanPool
attach
in interface BeanPool
T
- type extending the RegistryBean
interface.
RegistryBean
- the bean that is manager by
the BeanPool
.
JBMException
public Search createSearch(java.util.List<java.lang.Class<? extends RegistryBean>> beanClasses) throws CSAppFrameworkException
BeanPool
Search
instance for the given registry bean types.
createSearch
in interface BeanPool
CSAppFrameworkException
public RegistryObjectModel getRegistryObjectModel()
ManagedBeanPool
RegistryObjectModel
instance for this bean pool..
getRegistryObjectModel
in interface ManagedBeanPool
RegistryObjectModel
public Search createSearch(java.lang.Class<? extends RegistryBean> beanClass) throws CSAppFrameworkException
BeanPool
Search
instance for the given registry bean type.
createSearch
in interface BeanPool
Search
instance.
CSAppFrameworkException
public Search createSearch() throws CSAppFrameworkException
BeanPool
Search
instance for all registered bean types.
createSearch
in interface BeanPool
Search
instance.
CSAppFrameworkException
public void clearJaxrCache() throws CSAppFrameworkException
BeanPool
clearJaxrCache
in interface BeanPool
CSAppFrameworkException
public <T extends RegistryBean> T read(java.lang.Class<T> beanClass, javax.xml.registry.infomodel.RegistryObject ro) throws JBMException
ManagedBeanPool
BeanPool.attach(RegistryBean)
.
read
in interface ManagedBeanPool
T
- type extending the RegistryBean
interface.
JBMException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |