Class DatabaseVerifier
java.lang.Object
com.atlassian.crowd.migration.verify.DatabaseVerifier
- Direct Known Subclasses:
LegacyDatabaseVerifier
,SupportedDatabaseVerifier
Responsible for verifying the correctness/compatibility of pre 2.0 database to 2.0+ database
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method will be called between runs of the verifier to make sure that state can be purged between runs if required.boolean
Checks if there are any errors as a result of the verificationvoid
setLegacyTableQueries
(LegacyTableQueries legacyTableQueries) Provides the appropriate legacy table querier to the verifier if it needs to query the database.abstract void
verify()
This method will verify if the correctness/compatibility of the database.
-
Field Details
-
errors
-
legacyTableQueries
-
-
Constructor Details
-
DatabaseVerifier
public DatabaseVerifier()
-
-
Method Details
-
verify
public abstract void verify()This method will verify if the correctness/compatibility of the database. If an error is detected, the error will be added to the errors list. -
clearState
public void clearState()This method will be called between runs of the verifier to make sure that state can be purged between runs if required. -
hasErrors
public boolean hasErrors()Checks if there are any errors as a result of the verification- Returns:
- true if there are no errors (errors list is empty), false otherwise
-
getErrors
- Returns:
- the list of error messages during verification
-
setLegacyTableQueries
Provides the appropriate legacy table querier to the verifier if it needs to query the database.- Parameters:
legacyTableQueries
- The appropriate table querier (eg. MySQL, Postgres)
-