1 |
|
package liquibase.change.core; |
2 |
|
|
3 |
|
import liquibase.change.AbstractChange; |
4 |
|
import liquibase.change.ChangeMetaData; |
5 |
|
import liquibase.database.Database; |
6 |
|
import liquibase.statement.SqlStatement; |
7 |
|
import liquibase.statement.core.DropViewStatement; |
8 |
|
import liquibase.util.StringUtils; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 8 |
Complexity Density: 1.14 |
|
13 |
|
public class DropViewChange extends AbstractChange { |
14 |
|
private String schemaName; |
15 |
|
private String viewName; |
16 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
17 |
18
|
public DropViewChange() {... |
18 |
18
|
super("dropView", "Drop View", ChangeMetaData.PRIORITY_DEFAULT); |
19 |
|
} |
20 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
21 |
47
|
public String getSchemaName() {... |
22 |
47
|
return schemaName; |
23 |
|
} |
24 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
25 |
2
|
public void setSchemaName(String schemaName) {... |
26 |
2
|
this.schemaName = StringUtils.trimToNull(schemaName); |
27 |
|
} |
28 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
29 |
47
|
public String getViewName() {... |
30 |
47
|
return viewName; |
31 |
|
} |
32 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
33 |
4
|
public void setViewName(String viewName) {... |
34 |
4
|
this.viewName = viewName; |
35 |
|
} |
36 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
37 |
46
|
public SqlStatement[] generateStatements(Database database) {... |
38 |
46
|
return new SqlStatement[] { new DropViewStatement(getSchemaName() == null ? database.getDefaultSchemaName() |
39 |
|
: getSchemaName(), getViewName()), }; |
40 |
|
} |
41 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
42 |
1
|
public String getConfirmationMessage() {... |
43 |
1
|
return "View " + getViewName() + " dropped"; |
44 |
|
} |
45 |
|
|
46 |
|
} |