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: TableMismatchException.java,v 1.1 2002/11/24 06:02:47 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: import javax.jdo.JDOFatalInternalException;
14:
15: /**
16: * A <tt>TableMismatchException</tt> is thrown if the query statement generator
17: * attempts to reference a column in a table expression but the column's table
18: * is not present in the expression, nor can it be sensibly joined to the
19: * expression.
20: * This indicates a bug in the query statement generator.
21: *
22: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
23: * @version $Revision: 1.1 $
24: *
25: * @see TableExpression
26: */
27:
28: public class TableMismatchException extends JDOFatalInternalException {
29: /**
30: * Constructs a table mismatch exception.
31: *
32: * @param column The column that was being referenced.
33: * @param mainTable The main table of the table expression.
34: */
35:
36: public TableMismatchException(Column column, Table mainTable) {
37: super (
38: column.getName()
39: + " cannot be referenced in a table expression based on "
40: + mainTable
41: + " because no join exists to its table, "
42: + column.getTable());
43: }
44: }
|