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: NoSuchPersistentFieldException.java,v 1.4 2003/05/24 03:33:13 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: import javax.jdo.JDOUserException;
14:
15: /**
16: * A <tt>NoSuchPersistentFieldException</tt> is thrown if a reference is made
17: * somewhere, such as in a query filter string, to a field that either doesn't
18: * exist or is not persistent.
19: *
20: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
21: * @version $Revision: 1.4 $
22: */
23:
24: public class NoSuchPersistentFieldException extends JDOUserException {
25: /**
26: * Constructs a no such persistent field exception.
27: *
28: * @param clazz The class in which the field was not found.
29: * @param fieldName The name of the field.
30: */
31:
32: public NoSuchPersistentFieldException(Class clazz, String fieldName) {
33: super ("Field '" + fieldName + "' does not exist in "
34: + clazz.getName() + " or is not persistent");
35: }
36:
37: /**
38: * Constructs a no such persistent field exception.
39: *
40: * @param clazz The class in which the field was not found.
41: * @param fieldNumber The field number of the field.
42: */
43:
44: public NoSuchPersistentFieldException(Class clazz, int fieldNumber) {
45: super ("Field #" + fieldNumber + " does not exist in "
46: + clazz.getName() + " or is not persistent");
47: }
48: }
|