KickJava   Java API By Example, From Geeks To Geeks.

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


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: NoSuchPersistentFieldException.java,v 1.4 2003/05/24 03:33:13 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13 import javax.jdo.JDOUserException;
14
15
16 /**
17  * A <tt>NoSuchPersistentFieldException</tt> is thrown if a reference is made
18  * somewhere, such as in a query filter string, to a field that either doesn't
19  * exist or is not persistent.
20  *
21  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
22  * @version $Revision: 1.4 $
23  */

24
25 public class NoSuchPersistentFieldException extends JDOUserException
26 {
27     /**
28      * Constructs a no such persistent field exception.
29      *
30      * @param clazz The class in which the field was not found.
31      * @param fieldName The name of the field.
32      */

33
34     public NoSuchPersistentFieldException(Class JavaDoc clazz, String JavaDoc fieldName)
35     {
36         super("Field '" + fieldName + "' does not exist in " + clazz.getName() + " or is not persistent");
37     }
38
39
40     /**
41      * Constructs a no such persistent field exception.
42      *
43      * @param clazz The class in which the field was not found.
44      * @param fieldNumber The field number of the field.
45      */

46
47     public NoSuchPersistentFieldException(Class JavaDoc clazz, int fieldNumber)
48     {
49         super("Field #" + fieldNumber + " does not exist in " + clazz.getName() + " or is not persistent");
50     }
51 }
52
Popular Tags