01: /*
02: * This is free software, licensed under the Gnu Public License (GPL)
03: * get a copy from <http://www.gnu.org/licenses/gpl.html>
04: */
05: package henplus.sqlmodel;
06:
07: /**
08: * <p>Title: ColumnPkInfo</p>
09: * <p>Description:<br>
10: * Created on: 30.07.2003</p>
11: * @version $Id: ColumnPkInfo.java,v 1.3 2004/03/07 14:22:03 hzeller Exp $
12: * @author <a href="mailto:martin.grotzke@javakaffee.de">Martin Grotzke</a>
13: */
14: public final class ColumnPkInfo {
15:
16: private final String _pkName;
17: private final int _columnIndex;
18:
19: public ColumnPkInfo(String pkName, int columnIndex) {
20: _pkName = pkName;
21: _columnIndex = columnIndex;
22: }
23:
24: public int getColumnIndex() {
25: return _columnIndex;
26: }
27:
28: public String getPkName() {
29: return _pkName;
30: }
31:
32: public boolean equals(Object other) {
33: boolean result = false;
34: if (other != null && other instanceof ColumnPkInfo) {
35: ColumnPkInfo o = (ColumnPkInfo) other;
36: if (_pkName != null && _pkName.equals(o.getPkName())
37: || _pkName == null && o.getPkName() == null) {
38: result = true;
39: }
40: }
41: return result;
42: }
43:
44: }
|