KickJava   Java API By Example, From Geeks To Geeks.

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


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: TableMismatchException.java,v 1.1 2002/11/24 06:02:47 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13 import javax.jdo.JDOFatalInternalException;
14
15
16 /**
17  * A <tt>TableMismatchException</tt> is thrown if the query statement generator
18  * attempts to reference a column in a table expression but the column's table
19  * is not present in the expression, nor can it be sensibly joined to the
20  * expression.
21  * This indicates a bug in the query statement generator.
22  *
23  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
24  * @version $Revision: 1.1 $
25  *
26  * @see TableExpression
27  */

28
29 public class TableMismatchException extends JDOFatalInternalException
30 {
31     /**
32      * Constructs a table mismatch exception.
33      *
34      * @param column The column that was being referenced.
35      * @param mainTable The main table of the table expression.
36      */

37
38     public TableMismatchException(Column column, Table mainTable)
39     {
40         super(column.getName() + " cannot be referenced in a table expression based on " + mainTable + " because no join exists to its table, " + column.getTable());
41     }
42 }
43
Popular Tags