code fixes
This commit is contained in:
parent
2a3c9ae595
commit
372ea749b5
2 changed files with 7 additions and 5 deletions
|
@ -16,13 +16,15 @@ public final class EntityActivationEvent extends ApplicationEvent {
|
|||
|
||||
private static final long serialVersionUID = -6712364320755441148L;
|
||||
|
||||
public final transient boolean activated;
|
||||
public final transient Entity entity;
|
||||
public final boolean activated;
|
||||
|
||||
public EntityActivationEvent(final Entity source, final boolean activated) {
|
||||
super(source);
|
||||
this.entity = source;
|
||||
this.activated = activated;
|
||||
}
|
||||
|
||||
public Entity getEntity() {
|
||||
return (Entity) this.source;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,9 +30,9 @@ public class EntityActivationService {
|
|||
public void notifyActivationEvent(final EntityActivationEvent event) {
|
||||
for (final ActivatableEntityDAO<?> dao : this.activatableEntityDAOs) {
|
||||
if (event.activated) {
|
||||
dao.notifyActivation(event.entity);
|
||||
dao.notifyActivation(event.getEntity());
|
||||
} else {
|
||||
dao.notifyDeactivation(event.entity);
|
||||
dao.notifyDeactivation(event.getEntity());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue