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
WhileisValid()
returns whether a database is in a valid state regarding migrations, the outcome gives the actual details. -
Method Summary
Modifier and TypeMethodDescriptionReturns the optional name of the database clean, an empty optional indicates the default database.Returns all warnings, if any.boolean
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.Returns a sensible string applicable in a log or info message.
-
Method Details
-
getWarnings
Description copied from interface:OperationResult
Returns all warnings, if any.- Specified by:
getWarnings
in interfaceOperationResult
- Returns:
- all warnings, if any
-
prettyPrint
Description copied from interface:OperationResult
Returns a sensible string applicable in a log or info message.- Specified by:
prettyPrint
in interfaceOperationResult
- Returns:
- a sensible string applicable in a log or info message
-
getAffectedDatabase
Description copied from interface:DatabaseOperationResult
Returns the optional name of the database clean, an empty optional indicates the default database.- 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.
-