public abstract class BeanPersistAdapter extends Object implements BeanPersistController
A BeanPersistAdapter is either found automatically via class path search or
can be added programmatically via
ServerConfig.add(BeanPersistController)
or
ServerConfig.setPersistControllers(java.util.List)
.
Constructor and Description |
---|
BeanPersistAdapter() |
Modifier and Type | Method and Description |
---|---|
int |
getExecutionOrder()
Returns 10 - override this to control the order in which
BeanPersistController's are executed when there is multiple of them
registered for a given entity type (class).
|
abstract boolean |
isRegisterFor(Class<?> cls)
Return true if this BeanPersistController should be registered for events
on this entity type.
|
void |
postDelete(BeanPersistRequest<?> request)
Does nothing by default.
|
void |
postInsert(BeanPersistRequest<?> request)
Does nothing by default.
|
void |
postSoftDelete(BeanPersistRequest<?> request)
Does nothing by default.
|
void |
postUpdate(BeanPersistRequest<?> request)
Does nothing by default.
|
void |
preDelete(BeanDeleteIdRequest request)
Does nothing by default.
|
boolean |
preDelete(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.
|
boolean |
preInsert(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.
|
boolean |
preSoftDelete(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.
|
boolean |
preUpdate(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.
|
public BeanPersistAdapter()
public abstract boolean isRegisterFor(Class<?> cls)
BeanPersistController
isRegisterFor
in interface BeanPersistController
public int getExecutionOrder()
getExecutionOrder
in interface BeanPersistController
public boolean preDelete(BeanPersistRequest<?> request)
preDelete
in interface BeanPersistController
public boolean preInsert(BeanPersistRequest<?> request)
preInsert
in interface BeanPersistController
public boolean preUpdate(BeanPersistRequest<?> request)
preUpdate
in interface BeanPersistController
public boolean preSoftDelete(BeanPersistRequest<?> request)
preSoftDelete
in interface BeanPersistController
public void postDelete(BeanPersistRequest<?> request)
postDelete
in interface BeanPersistController
public void postInsert(BeanPersistRequest<?> request)
postInsert
in interface BeanPersistController
public void postUpdate(BeanPersistRequest<?> request)
postUpdate
in interface BeanPersistController
public void postSoftDelete(BeanPersistRequest<?> request)
postSoftDelete
in interface BeanPersistController
public void preDelete(BeanDeleteIdRequest request)
preDelete
in interface BeanPersistController
Copyright © 2019. All rights reserved.