1 package liquibase.statement.core;
2
3 import liquibase.statement.AbstractSqlStatement;
4
5 public class CommentStatement extends AbstractSqlStatement {
6 final private String text;
7 final private int MAX_LENGTH = 80;
8
9 public CommentStatement(String text) {
10 this.text = text;
11 }
12
13 @Override
14 public int hashCode() {
15 return text.hashCode();
16 }
17
18 @Override
19 public String toString() {
20 if (text != null && text.length() >= MAX_LENGTH) {
21 return text.substring(0, MAX_LENGTH - 3) + "...";
22 }
23 return getText();
24 }
25
26 public String getText() {
27 return text;
28 }
29 }