KickJava   Java API By Example, From Geeks To Geeks.

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


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: InvalidMetaDataRelationshipException.java,v 1.3 2002/11/08 05:06:25 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13 import com.triactive.jdo.model.FieldMetaData;
14 import javax.jdo.JDOUserException;
15
16
17 /**
18  * A <tt>InvalidMetaDataRelationshipException</tt> is thrown if the metadata for
19  * a persistent field declares a relationship to another field, but the field on
20  * the other side has no complementary declaration.
21  *
22  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
23  * @version $Revision: 1.3 $
24  */

25
26 public class InvalidMetaDataRelationshipException extends JDOUserException
27 {
28     /**
29      * Constructs an invalid metadata relationship exception.
30      *
31      * @param from The metadata of the field declaring a relationship.
32      * @param fromRel The type of relationship declared by 'from'.
33      * @param to The metadata of the field referred to by the
34      * relationship.
35      * @param toRel The type of relationship missing from 'to'.
36      */

37
38     public InvalidMetaDataRelationshipException(FieldMetaData from, String JavaDoc fromRel, FieldMetaData to, String JavaDoc toRel)
39     {
40         super("" + from + " refers to " + to + " as " + fromRel + ", but it does not refer back using " + toRel);
41     }
42 }
43
Popular Tags