1 | |
package liquibase.database.structure; |
2 | |
|
3 | 0 | public class Sequence implements DatabaseObject, Comparable<Sequence> { |
4 | |
private String name; |
5 | |
private String schema; |
6 | |
|
7 | |
public DatabaseObject[] getContainingObjects() { |
8 | 0 | return null; |
9 | |
} |
10 | |
|
11 | |
public String getName() { |
12 | 0 | return name; |
13 | |
} |
14 | |
|
15 | |
public void setName(String name) { |
16 | 0 | this.name = name; |
17 | 0 | } |
18 | |
|
19 | |
public int compareTo(Sequence o) { |
20 | 0 | return this.getName().compareTo(o.getName()); |
21 | |
} |
22 | |
|
23 | |
@Override |
24 | |
public boolean equals(Object o) { |
25 | 0 | if (this == o) |
26 | 0 | return true; |
27 | 0 | if (o == null || getClass() != o.getClass()) |
28 | 0 | return false; |
29 | |
|
30 | 0 | Sequence sequence = (Sequence) o; |
31 | |
|
32 | 0 | return !(name != null ? !name.equalsIgnoreCase(sequence.name) : sequence.name != null); |
33 | |
|
34 | |
} |
35 | |
|
36 | |
@Override |
37 | |
public int hashCode() { |
38 | 0 | return (name != null ? name.toUpperCase().hashCode() : 0); |
39 | |
} |
40 | |
|
41 | |
@Override |
42 | |
public String toString() { |
43 | 0 | return getName(); |
44 | |
} |
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
public String getSchema() { |
50 | 0 | return schema; |
51 | |
} |
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
public void setSchema(String schema) { |
58 | 0 | this.schema = schema; |
59 | 0 | } |
60 | |
} |