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
ConstructorDescriptionAfterExecuteDmlEvent
(com.google.cloud.spanner.Statement statement, long numberOfRowsAffected) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
Get the number of rows affected by the DML.int
hashCode()
Methods inherited from class com.google.cloud.spring.data.spanner.core.mapping.event.ExecuteDmlEvent
getStatement
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods 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:
equals
in classExecuteDmlEvent
-
hashCode
public int hashCode()- Overrides:
hashCode
in classExecuteDmlEvent
-