01: package liquibase.database.structure;
02:
03: public class Sequence implements DatabaseObject, Comparable<Sequence> {
04: private String name;
05:
06: public String getName() {
07: return name;
08: }
09:
10: public void setName(String name) {
11: this .name = name;
12: }
13:
14: public int compareTo(Sequence o) {
15: return this .getName().compareTo(o.getName());
16: }
17:
18: public boolean equals(Object o) {
19: if (this == o)
20: return true;
21: if (o == null || getClass() != o.getClass())
22: return false;
23:
24: Sequence sequence = (Sequence) o;
25:
26: return !(name != null ? !name.equalsIgnoreCase(sequence.name)
27: : sequence.name != null);
28:
29: }
30:
31: public int hashCode() {
32: return (name != null ? name.toUpperCase().hashCode() : 0);
33: }
34:
35: public String toString() {
36: return getName();
37: }
38: }
|