01: package net.sourceforge.squirrel_sql.client.gui.db;
02:
03: import java.io.Serializable;
04:
05: public class SQLAliasSchemaDetailProperties implements
06: Comparable<SQLAliasSchemaDetailProperties>, Serializable {
07: private static final long serialVersionUID = 1L;
08: public static final int SCHEMA_LOADING_ID_LOAD_DONT_CACHE = 0;
09: public static final int SCHEMA_LOADING_ID_LOAD_AND_CACHE = 1;
10: public static final int SCHEMA_LOADING_ID_DONT_LOAD = 2;
11:
12: private String _schemaName;
13: private int _table;
14: private int _view;
15: private int _procedure;
16:
17: public String getSchemaName() {
18: return _schemaName;
19: }
20:
21: public void setSchemaName(String schemaName) {
22: _schemaName = schemaName;
23: }
24:
25: public int getTable() {
26: return _table;
27: }
28:
29: public int getView() {
30: return _view;
31: }
32:
33: public int getProcedure() {
34: return _procedure;
35: }
36:
37: public void setTable(int id) {
38: _table = id;
39: }
40:
41: public void setView(int id) {
42: _view = id;
43: }
44:
45: public void setProcedure(int id) {
46: _procedure = id;
47: }
48:
49: public int compareTo(SQLAliasSchemaDetailProperties other) {
50: return _schemaName.compareTo(other._schemaName);
51: }
52:
53: /**
54: * @see java.lang.Object#hashCode()
55: */
56: @Override
57: public int hashCode() {
58: final int prime = 31;
59: int result = 1;
60: result = prime * result
61: + ((_schemaName == null) ? 0 : _schemaName.hashCode());
62: return result;
63: }
64:
65: /**
66: * @see java.lang.Object#equals(java.lang.Object)
67: */
68: @Override
69: public boolean equals(Object obj) {
70: if (this == obj)
71: return true;
72: if (obj == null)
73: return false;
74: if (getClass() != obj.getClass())
75: return false;
76: final SQLAliasSchemaDetailProperties other = (SQLAliasSchemaDetailProperties) obj;
77: if (_schemaName == null) {
78: if (other._schemaName != null)
79: return false;
80: } else if (!_schemaName.equals(other._schemaName))
81: return false;
82: return true;
83: }
84:
85: }
|