KickJava   Java API By Example, From Geeks To Geeks.

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


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: IncompatibleQueryElementTypeException.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.JDOUserException;
14
15
16 /**
17  * A <tt>IncompatibleQueryElementTypeException</tt> is thrown if a variable used
18  * in a query is detected to have an type incompatible with the element type of
19  * the collection to which it is being applied.
20  *
21  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
22  * @version $Revision: 1.3 $
23  *
24  * @see Query
25  * @see SetStore
26  */

27
28 public class IncompatibleQueryElementTypeException extends JDOUserException
29 {
30     /**
31      * Constructs an incompatible query element type exception.
32      *
33      * @param expectedType The expected element base type.
34      * @param actualType The actual element type.
35      */

36
37     public IncompatibleQueryElementTypeException(Class JavaDoc expectedType, Class JavaDoc actualType)
38     {
39         super("Incompatible query element type: was " + actualType.getName() + ", must be " + expectedType.getName() + " or a subclass thereof");
40     }
41 }
42
Popular Tags