01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: MissingManyToOneMainPropertyException.java 3717 2007-04-12 18:01:39Z gbevin $
07: */
08: package com.uwyn.rife.database.querymanagers.generic.exceptions;
09:
10: import com.uwyn.rife.database.exceptions.DatabaseException;
11:
12: public class MissingManyToOneMainPropertyException extends
13: DatabaseException {
14: private Class mAssociationClass;
15: private String mAssociationProperty;
16: private Class mMainClass;
17:
18: static final long serialVersionUID = -860044159844481242L;
19:
20: public MissingManyToOneMainPropertyException(
21: Class associationClass, String associationProperty,
22: Class mainClass) {
23: super (
24: "The bean '"
25: + associationClass.getName()
26: + "' declares a many-to-one association relationship on property '"
27: + associationProperty
28: + "', however no matching manyToOne constraint can be find on any property in the main bean '"
29: + mainClass.getName() + "'.");
30:
31: mAssociationClass = associationClass;
32: mAssociationProperty = associationProperty;
33: mMainClass = mainClass;
34: }
35:
36: public Class getAssociationClass() {
37: return mAssociationClass;
38: }
39:
40: public String getAssociationProperty() {
41: return mAssociationProperty;
42: }
43:
44: public Class getMainClass() {
45: return mMainClass;
46: }
47: }
|