All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.cloudyrock.spring.util.events.SpringMigrationSuccessEvent Maven / Gradle / Ivy

There is a newer version: 5.0.1.BETA
Show newest version
package com.github.cloudyrock.spring.util.events;

import com.github.cloudyrock.mongock.runner.core.event.MongockEvent;
import com.github.cloudyrock.mongock.runner.core.event.MigrationResult;
import org.springframework.context.ApplicationEvent;

public class SpringMigrationSuccessEvent extends ApplicationEvent implements MongockEvent {

  private final MigrationResult migrationResult;

  /**
   * Create a new {@code ApplicationEvent}.
   *
   * @param source the object on which the event initially occurred or with
   *               which the event is associated (never {@code null})
   */
  public SpringMigrationSuccessEvent(Object source, MigrationResult migrationResult) {
    super(source);
    this.migrationResult = migrationResult;
  }

  @Override
  public MigrationResult getMigrationResult() {
    return migrationResult;
  }

  @Override
  public String toString() {
    return "SpringMigrationSuccessEvent{" +
        "migrationResult=" + migrationResult +
        "} " + super.toString();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy