Package io.ebeaninternal.server.deploy
Class ChainedBeanPostConstructListener
- java.lang.Object
-
- io.ebeaninternal.server.deploy.ChainedBeanPostConstructListener
-
- All Implemented Interfaces:
BeanPostConstructListener
public class ChainedBeanPostConstructListener extends Object implements BeanPostConstructListener
Handles multiple BeanPostLoad's for a given entity type.
-
-
Constructor Summary
Constructors Constructor Description ChainedBeanPostConstructListener(List<BeanPostConstructListener> list)
Construct given the list of BeanPostCreate's.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
autowire(Object bean)
Called immediately after construction.BeanPostConstructListener
deregister(BeanPostConstructListener c)
De-register a BeanPostCreate and return the resulting chain.boolean
isRegisterFor(Class<?> cls)
Return true if this BeanPostConstructListener instance should be registered for post construct on this entity type.void
postConstruct(Object bean)
Fire postLoad on all registered BeanPostCreate implementations.void
postCreate(Object bean)
Called afterDatabase.createEntityBean(Class)
.ChainedBeanPostConstructListener
register(BeanPostConstructListener c)
Register a new BeanPostCreate and return the resulting chain.
-
-
-
Constructor Detail
-
ChainedBeanPostConstructListener
public ChainedBeanPostConstructListener(List<BeanPostConstructListener> list)
Construct given the list of BeanPostCreate's.
-
-
Method Detail
-
register
public ChainedBeanPostConstructListener register(BeanPostConstructListener c)
Register a new BeanPostCreate and return the resulting chain.
-
deregister
public BeanPostConstructListener deregister(BeanPostConstructListener c)
De-register a BeanPostCreate and return the resulting chain.
-
isRegisterFor
public boolean isRegisterFor(Class<?> cls)
Description copied from interface:BeanPostConstructListener
Return true if this BeanPostConstructListener instance should be registered for post construct on this entity type.- Specified by:
isRegisterFor
in interfaceBeanPostConstructListener
-
postConstruct
public void postConstruct(Object bean)
Fire postLoad on all registered BeanPostCreate implementations.- Specified by:
postConstruct
in interfaceBeanPostConstructListener
-
autowire
public void autowire(Object bean)
Description copied from interface:BeanPostConstructListener
Called immediately after construction. Perform DI here.- Specified by:
autowire
in interfaceBeanPostConstructListener
-
postCreate
public void postCreate(Object bean)
Description copied from interface:BeanPostConstructListener
Called afterDatabase.createEntityBean(Class)
. Only for new beans. intended to set default values here.- Specified by:
postCreate
in interfaceBeanPostConstructListener
-
-