KickJava   Java API By Example, From Geeks To Geeks.

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


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

10
11 package com.triactive.jdo.store;
12
13 import javax.jdo.JDOFatalInternalException;
14
15
16 /**
17  * A <tt>PrimaryKeyColumnNotAllowedException</tt> is thrown if an attempt is made to
18  * add a primary key column to a view.
19  *
20  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
21  * @version $Revision: 1.3 $
22  *
23  * @see View#newColumn(Class,String)
24  */

25
26 public class PrimaryKeyColumnNotAllowedException extends JDOFatalInternalException
27 {
28     /**
29      * Constructs a primary key not allowed exception.
30      *
31      * @param view The view being initialized.
32      * @param column The column having the duplicate name.
33      */

34
35     public PrimaryKeyColumnNotAllowedException(View view, Column column)
36     {
37         super("Cannot define a primary key column in a view: view = " + view + ", column = " + column.getName());
38     }
39 }
40
Popular Tags