DATAJDBC-200 - Renamed Events to have an 'Event' suffix.
Original pull request: #60.
This commit is contained in:
committed by
Mark Paluch
parent
3f89062bc1
commit
cc477f8c89
@@ -23,11 +23,11 @@ import org.springframework.data.jdbc.core.conversion.AggregateChange.Kind;
|
||||
import org.springframework.data.jdbc.core.conversion.Interpreter;
|
||||
import org.springframework.data.jdbc.core.conversion.JdbcEntityDeleteWriter;
|
||||
import org.springframework.data.jdbc.core.conversion.JdbcEntityWriter;
|
||||
import org.springframework.data.jdbc.mapping.event.AfterDelete;
|
||||
import org.springframework.data.jdbc.mapping.event.AfterDeleteEvent;
|
||||
import org.springframework.data.jdbc.mapping.event.AfterLoadEvent;
|
||||
import org.springframework.data.jdbc.mapping.event.AfterSave;
|
||||
import org.springframework.data.jdbc.mapping.event.BeforeDelete;
|
||||
import org.springframework.data.jdbc.mapping.event.BeforeSave;
|
||||
import org.springframework.data.jdbc.mapping.event.AfterSaveEvent;
|
||||
import org.springframework.data.jdbc.mapping.event.BeforeDeleteEvent;
|
||||
import org.springframework.data.jdbc.mapping.event.BeforeSaveEvent;
|
||||
import org.springframework.data.jdbc.mapping.event.Identifier;
|
||||
import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
|
||||
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
|
||||
@@ -71,7 +71,7 @@ public class JdbcEntityTemplate implements JdbcEntityOperations {
|
||||
|
||||
AggregateChange change = createChange(instance);
|
||||
|
||||
publisher.publishEvent(new BeforeSave( //
|
||||
publisher.publishEvent(new BeforeSaveEvent( //
|
||||
Identifier.ofNullable(entityInformation.getId(instance)), //
|
||||
instance, //
|
||||
change //
|
||||
@@ -79,7 +79,7 @@ public class JdbcEntityTemplate implements JdbcEntityOperations {
|
||||
|
||||
change.executeWith(interpreter);
|
||||
|
||||
publisher.publishEvent(new AfterSave( //
|
||||
publisher.publishEvent(new AfterSaveEvent( //
|
||||
Identifier.of(entityInformation.getId(instance)), //
|
||||
instance, //
|
||||
change //
|
||||
@@ -148,11 +148,11 @@ public class JdbcEntityTemplate implements JdbcEntityOperations {
|
||||
|
||||
Specified specifiedId = Identifier.of(id);
|
||||
Optional<Object> optionalEntity = Optional.ofNullable(entity);
|
||||
publisher.publishEvent(new BeforeDelete(specifiedId, optionalEntity, change));
|
||||
publisher.publishEvent(new BeforeDeleteEvent(specifiedId, optionalEntity, change));
|
||||
|
||||
change.executeWith(interpreter);
|
||||
|
||||
publisher.publishEvent(new AfterDelete(specifiedId, optionalEntity, change));
|
||||
publisher.publishEvent(new AfterDeleteEvent(specifiedId, optionalEntity, change));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
|
||||
* @author Jens Schauder
|
||||
* @since 1.0
|
||||
*/
|
||||
public class AfterDelete extends JdbcEventWithId {
|
||||
public class AfterDeleteEvent extends JdbcEventWithId {
|
||||
|
||||
private static final long serialVersionUID = 3594807189931141582L;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class AfterDelete extends JdbcEventWithId {
|
||||
* @param instance the deleted entity if it is available.
|
||||
* @param change the {@link AggregateChange} encoding the planned actions to be performed on the database.
|
||||
*/
|
||||
public AfterDelete(Specified id, Optional<Object> instance, AggregateChange change) {
|
||||
public AfterDeleteEvent(Specified id, Optional<Object> instance, AggregateChange change) {
|
||||
super(id, instance, change);
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
|
||||
* @author Jens Schauder
|
||||
* @since 1.0
|
||||
*/
|
||||
public class AfterSave extends JdbcEventWithIdAndEntity {
|
||||
public class AfterSaveEvent extends JdbcEventWithIdAndEntity {
|
||||
|
||||
private static final long serialVersionUID = 8982085767296982848L;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class AfterSave extends JdbcEventWithIdAndEntity {
|
||||
* @param instance the newly saved entity.
|
||||
* @param change the {@link AggregateChange} encoding the planned actions to be performed on the database.
|
||||
*/
|
||||
public AfterSave(Specified id, Object instance, AggregateChange change) {
|
||||
public AfterSaveEvent(Specified id, Object instance, AggregateChange change) {
|
||||
super(id, instance, change);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
|
||||
* @author Jens Schauder
|
||||
* @since 1.0
|
||||
*/
|
||||
public class BeforeDelete extends JdbcEventWithId {
|
||||
public class BeforeDeleteEvent extends JdbcEventWithId {
|
||||
|
||||
private static final long serialVersionUID = -5483432053368496651L;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BeforeDelete extends JdbcEventWithId {
|
||||
* @param entity the entity about to get deleted. Might be empty.
|
||||
* @param change the {@link AggregateChange} encoding the planned actions to be performed on the database.
|
||||
*/
|
||||
public <T> BeforeDelete(Specified id, Optional<Object> entity, AggregateChange change) {
|
||||
public <T> BeforeDeleteEvent(Specified id, Optional<Object> entity, AggregateChange change) {
|
||||
super(id, entity, change);
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import org.springframework.data.jdbc.core.conversion.AggregateChange;
|
||||
* @author Jens Schauder
|
||||
* @since 1.0
|
||||
*/
|
||||
public class BeforeSave extends JdbcEventWithEntity {
|
||||
public class BeforeSaveEvent extends JdbcEventWithEntity {
|
||||
|
||||
private static final long serialVersionUID = -6996874391990315443L;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BeforeSave extends JdbcEventWithEntity {
|
||||
* @param instance the entity about to get saved.
|
||||
* @param change
|
||||
*/
|
||||
public BeforeSave(Identifier id, Object instance, AggregateChange change) {
|
||||
public BeforeSaveEvent(Identifier id, Object instance, AggregateChange change) {
|
||||
super(id, instance, change);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user