KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > store > PrimaryKey


1 /*
2  * Copyright 2002 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: PrimaryKey.java,v 1.2 2002/10/17 21:00:57 pierreg0 Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13
14 class PrimaryKey extends CandidateKey
15 {
16     public PrimaryKey(BaseTable table)
17     {
18         super(table);
19     }
20
21
22     public boolean equals(Object JavaDoc o)
23     {
24         if (o == this)
25             return true;
26
27         if (!(o instanceof PrimaryKey))
28             return false;
29
30         return super.equals(o);
31     }
32
33
34     public String JavaDoc toString()
35     {
36         StringBuffer JavaDoc s = new StringBuffer JavaDoc("PRIMARY KEY ").append(getColumnList(columns));
37
38         return s.toString();
39     }
40 }
41
Popular Tags