1 | |
package liquibase.precondition.core; |
2 | |
|
3 | |
import liquibase.changelog.DatabaseChangeLog; |
4 | |
import liquibase.precondition.Precondition; |
5 | |
|
6 | |
public class FailedPrecondition { |
7 | |
private String message; |
8 | |
private Precondition precondition; |
9 | |
private DatabaseChangeLog changeLog; |
10 | |
|
11 | 1 | public FailedPrecondition(String message, DatabaseChangeLog changeLog, Precondition precondition) { |
12 | 1 | this.message = message; |
13 | 1 | this.changeLog = changeLog; |
14 | 1 | this.precondition = precondition; |
15 | 1 | } |
16 | |
|
17 | |
public String getMessage() { |
18 | 0 | return message; |
19 | |
} |
20 | |
|
21 | |
public Precondition getPrecondition() { |
22 | 0 | return precondition; |
23 | |
} |
24 | |
|
25 | |
@Override |
26 | |
public String toString() { |
27 | 1 | if (changeLog == null) { |
28 | 0 | return message; |
29 | |
} else { |
30 | 1 | return changeLog.toString() + " : " + message; |
31 | |
} |
32 | |
} |
33 | |
} |