Package ac.simons.neo4j.migrations.core
Class ValidationResult
java.lang.Object
ac.simons.neo4j.migrations.core.ValidationResult
- All Implemented Interfaces:
DatabaseOperationResult
,OperationResult
The result of the
Migrations.validate()
operation.- Since:
- 1.2.0
- Author:
- Michael J. Simons
- Soundtrack
- Die Krupps - Paradise Now
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The outcome of the validation. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isValid()
boolean
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.
-
Method Details
-
getWarnings
- Specified by:
getWarnings
in interfaceOperationResult
- Returns:
- all warnings, if any
-
prettyPrint
- Specified by:
prettyPrint
in interfaceOperationResult
- Returns:
- a sensible string applicable in a log or info message
-
getAffectedDatabase
- Specified by:
getAffectedDatabase
in interfaceDatabaseOperationResult
- Returns:
- the optional name of the database clean, an empty optional indicates the default database
-
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.
-