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: InvalidMetaDataRelationshipException.java,v 1.3 2002/11/08 05:06:25 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: import com.triactive.jdo.model.FieldMetaData;
14: import javax.jdo.JDOUserException;
15:
16: /**
17: * A <tt>InvalidMetaDataRelationshipException</tt> is thrown if the metadata for
18: * a persistent field declares a relationship to another field, but the field on
19: * the other side has no complementary declaration.
20: *
21: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
22: * @version $Revision: 1.3 $
23: */
24:
25: public class InvalidMetaDataRelationshipException extends
26: JDOUserException {
27: /**
28: * Constructs an invalid metadata relationship exception.
29: *
30: * @param from The metadata of the field declaring a relationship.
31: * @param fromRel The type of relationship declared by 'from'.
32: * @param to The metadata of the field referred to by the
33: * relationship.
34: * @param toRel The type of relationship missing from 'to'.
35: */
36:
37: public InvalidMetaDataRelationshipException(FieldMetaData from,
38: String fromRel, FieldMetaData to, String toRel) {
39: super ("" + from + " refers to " + to + " as " + fromRel
40: + ", but it does not refer back using " + toRel);
41: }
42: }
|