Package io.ebean.event
Interface BeanPostConstructListener
-
public interface BeanPostConstructListener
Fired after a bean is constructed, but not yet loaded from database.Note: You MUST NOT set any default values, as in a following step, properties will get unload. Use
BeanPostLoadinstead.it's intended to do some dependency-injection here. If you plan to use this feature you should use
Database.createEntityBean(Class)to create new beans.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidautowire(Object bean)Called immediately after construction.booleanisRegisterFor(Class<?> cls)Return true if this BeanPostConstructListener instance should be registered for post construct on this entity type.voidpostConstruct(Object bean)Called after every @PostConstruct annotated method of the bean is executedvoidpostCreate(Object bean)Called afterDatabase.createEntityBean(Class).
-
-
-
Method Detail
-
isRegisterFor
boolean isRegisterFor(Class<?> cls)
Return true if this BeanPostConstructListener instance should be registered for post construct on this entity type.
-
postConstruct
void postConstruct(Object bean)
Called after every @PostConstruct annotated method of the bean is executed
-
postCreate
void postCreate(Object bean)
Called afterDatabase.createEntityBean(Class). Only for new beans. intended to set default values here.
-
-