Clover Coverage Report - Liquibase Core 2.0.3-SNAPSHOT
Coverage timestamp: Sat Aug 6 2011 11:33:15 EDT
../../../img/srcFileCovDistChart9.png 9% of files have more coverage
7   46   8   1
2   33   1.14   7
7     1.14  
1    
 
  DropSequenceChange       Line # 13 7 0% 8 3 81.2% 0.8125
 
  (8)
 
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.DropSequenceStatement;
8    import liquibase.util.StringUtils;
9   
10    /**
11    * Drops an existing sequence.
12    */
 
13    public class DropSequenceChange extends AbstractChange {
14   
15    private String schemaName;
16    private String sequenceName;
17   
 
18  21 toggle public DropSequenceChange() {
19  21 super("dropSequence", "Drop Sequence", ChangeMetaData.PRIORITY_DEFAULT);
20    }
21   
 
22  39 toggle public String getSchemaName() {
23  39 return schemaName;
24    }
25   
 
26  0 toggle public void setSchemaName(String schemaName) {
27  0 this.schemaName = StringUtils.trimToNull(schemaName);
28    }
29   
 
30  40 toggle public String getSequenceName() {
31  40 return sequenceName;
32    }
33   
 
34  7 toggle public void setSequenceName(String sequenceName) {
35  7 this.sequenceName = sequenceName;
36    }
37   
 
38  39 toggle public SqlStatement[] generateStatements(Database database) {
39  39 return new SqlStatement[] { new DropSequenceStatement(getSchemaName() == null ? database.getDefaultSchemaName()
40    : getSchemaName(), getSequenceName()) };
41    }
42   
 
43  1 toggle public String getConfirmationMessage() {
44  1 return "Sequence " + getSequenceName() + " dropped";
45    }
46    }