接口 DatabaseEvent
- 所有已知实现类:
AssociationEvent,EntityEvent
public interface DatabaseEvent
-
方法概要
修饰符和类型方法说明@Nullable ConnectionDetermine whether the trigger for sending the current event is within a transaction or based on binlog If the event is fired by binlog trigger, returns null If the event is fired by transaction trigger, returns current trigger@Nullable ObjectbooleanisChanged(org.babyfish.jimmer.meta.ImmutableProp prop) Is the value of specified property changed.booleanisChanged(org.babyfish.jimmer.meta.TypedProp<?, ?> prop) Is the value of specified property changedbooleanisEvict()
-
方法详细资料
-
isChanged
boolean isChanged(org.babyfish.jimmer.meta.ImmutableProp prop) Is the value of specified property changed.- 参数:
prop- The specified property- 返回:
- Is the value of specified property changed
- If the current event is
EntityEvent, returns whether the declaring type of specified property is assignable from the entity type of current event object and whether the value of specified property is changed. - If the current event is
AssociationEventreturns whether the specified property isAssociationEvent.getImmutableProp()
- If the current event is
-
isChanged
boolean isChanged(org.babyfish.jimmer.meta.TypedProp<?, ?> prop) Is the value of specified property changed- 参数:
prop- The specified property- 返回:
- Is the value of specified property changed
- If the current event is
EntityEvent, returns whether the declaring type of specified property is assignable from the entity type of current event object and whether the value of specified property is changed. - If the current event is
AssociationEventreturns whether the specified property isAssociationEvent.getImmutableProp()
- If the current event is
-
getConnection
Determine whether the trigger for sending the current event is within a transaction or based on binlog- If the event is fired by binlog trigger, returns null
- If the event is fired by transaction trigger, returns current trigger
Notes, If you use jimmer in spring-boot and accept events with `@EventListener`, it will be very important to determine whether this property is null. Because once the `triggerType` of `SqlClient` is set to `BOTH`, the same event will be notified twice.
- 返回:
- The current connection or null
-
getReason
-
isEvict
boolean isEvict()
-