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: MissingManyToOneColumnException.java 3669 2007-02-26 13:51:23Z gbevin $
07: */
08: package com.uwyn.rife.database.exceptions;
09:
10: public class MissingManyToOneColumnException extends DatabaseException {
11: private static final long serialVersionUID = 1390166791727531269L;
12:
13: private Class mConstrainedClass = null;
14: private String mPropertyName = null;
15:
16: public MissingManyToOneColumnException(Class constrainedClass,
17: String propertyName) {
18: super (
19: "The property '"
20: + propertyName
21: + "' of '"
22: + constrainedClass.getName()
23: + "' has a manyToOne constraint, however the column of the associated table is missing. This can be provided when the constraint is declared.");
24:
25: mConstrainedClass = constrainedClass;
26: mPropertyName = propertyName;
27: }
28:
29: public Class getConstrainedClass() {
30: return mConstrainedClass;
31: }
32:
33: public String getPropertyName() {
34: return mPropertyName;
35: }
36: }
|