Class ValidationResult

java.lang.Object
ac.simons.neo4j.migrations.core.ValidationResult
All Implemented Interfaces:
DatabaseOperationResult, OperationResult

public final class ValidationResult extends Object implements DatabaseOperationResult
The result of the Migrations.validate() operation.
Since:
1.2.0
Author:
Michael J. Simons
Soundtrack
Die Krupps - Paradise Now
  • Method Details

    • getWarnings

      public Collection<String> getWarnings()
      Specified by:
      getWarnings in interface OperationResult
      Returns:
      all warnings, if any
    • prettyPrint

      public String prettyPrint()
      Specified by:
      prettyPrint in interface OperationResult
      Returns:
      a sensible string applicable in a log or info message
    • getAffectedDatabase

      public Optional<String> getAffectedDatabase()
      Specified by:
      getAffectedDatabase in interface DatabaseOperationResult
      Returns:
      the optional name of the database clean, an empty optional indicates the default database
    • getOutcome

      public ValidationResult.Outcome getOutcome()
      Returns:
      the outcome of the validation
      See Also:
    • isValid

      public boolean isValid()
      Returns:
      true if the database is in a valid state
    • needsRepair

      public boolean needsRepair()
      If this method returns false, the database is either valid or the resolved migrations can be applied to bring the database into a valid state.
      Returns:
      true if the database needs repair.