KickJava   Java API By Example, From Geeks To Geeks.

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


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: WrongPrimaryKeyException.java,v 1.3 2002/11/08 05:06:26 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13 import java.util.Collection JavaDoc;
14
15
16 /**
17  * A <tt>WrongPrimaryKeyException</tt> is thrown if a table is detected not to
18  * have the expected primary key in the database during schema validation.
19  *
20  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
21  * @version $Revision: 1.3 $
22  *
23  * @see Column
24  */

25
26 public class WrongPrimaryKeyException extends SchemaValidationException
27 {
28     /**
29      * Constructs a wrong primary key exception.
30      *
31      * @param table The table having the wrong primary key.
32      * @param expectedPK The expected primary key of the table.
33      * @param actualPKs The actual primary key(s) of the table.
34      */

35
36     public WrongPrimaryKeyException(Table table, PrimaryKey expectedPK, Collection JavaDoc actualPKs)
37     {
38         super("Expected primary key for table " + table + " " + expectedPK + " not found in existing keys: " + toString(actualPKs));
39     }
40 }
41
Popular Tags