01: /*
02: * Copyright 2002 (C) TJDO.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the TJDO License version 1.0.
06: * See the terms of the TJDO License in the documentation provided with this software.
07: *
08: * $Id: WrongPrimaryKeyException.java,v 1.3 2002/11/08 05:06:26 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: import java.util.Collection;
14:
15: /**
16: * A <tt>WrongPrimaryKeyException</tt> is thrown if a table is detected not to
17: * have the expected primary key in the database during schema validation.
18: *
19: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
20: * @version $Revision: 1.3 $
21: *
22: * @see Column
23: */
24:
25: public class WrongPrimaryKeyException extends SchemaValidationException {
26: /**
27: * Constructs a wrong primary key exception.
28: *
29: * @param table The table having the wrong primary key.
30: * @param expectedPK The expected primary key of the table.
31: * @param actualPKs The actual primary key(s) of the table.
32: */
33:
34: public WrongPrimaryKeyException(Table table, PrimaryKey expectedPK,
35: Collection actualPKs) {
36: super ("Expected primary key for table " + table + " "
37: + expectedPK + " not found in existing keys: "
38: + toString(actualPKs));
39: }
40: }
|