Class AfterExecuteDmlEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
com.google.cloud.spring.data.spanner.core.mapping.event.ExecuteDmlEvent
com.google.cloud.spring.data.spanner.core.mapping.event.AfterExecuteDmlEvent
- All Implemented Interfaces:
Serializable
This event is published immediately after a DML statement is executed. It contains the DML
statement as well as the number of rows affected.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionAfterExecuteDmlEvent(com.google.cloud.spanner.Statement statement, long numberOfRowsAffected) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongGet the number of rows affected by the DML.inthashCode()Methods inherited from class com.google.cloud.spring.data.spanner.core.mapping.event.ExecuteDmlEvent
getStatementMethods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
AfterExecuteDmlEvent
public AfterExecuteDmlEvent(com.google.cloud.spanner.Statement statement, long numberOfRowsAffected) Constructor.- Parameters:
statement- the DML statement that was executed.numberOfRowsAffected- the number of rows affected.
-
-
Method Details
-
getNumberOfRowsAffected
public long getNumberOfRowsAffected()Get the number of rows affected by the DML.- Returns:
- the number of rows affected.
-
equals
- Overrides:
equalsin classExecuteDmlEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classExecuteDmlEvent
-