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: MissingManyToManyTypeInformationException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.database.querymanagers.generic.exceptions;
09:
10: import com.uwyn.rife.database.exceptions.DatabaseException;
11:
12: public class MissingManyToManyTypeInformationException extends
13: DatabaseException {
14: private Class mBeanClass;
15: private String mPropertyName;
16:
17: static final long serialVersionUID = -1852595871902260744L;
18:
19: public MissingManyToManyTypeInformationException(Class beanClass,
20: String propertyName) {
21: super (
22: "The bean '"
23: + beanClass.getName()
24: + "' declares a many-to-many relationship on property '"
25: + propertyName
26: + "', however the type of the associated class hasn't been specified. This can either be done during the declaration of the manyToMany constraint or by specifying the property's collection elements through generics.");
27:
28: mBeanClass = beanClass;
29: mPropertyName = propertyName;
30: }
31:
32: public Class getBeanClass() {
33: return mBeanClass;
34: }
35:
36: public String getPropertyName() {
37: return mPropertyName;
38: }
39: }
|