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: UnsupportedManyToOneAssociationPropertyTypeException.java 3716 2007-04-11 06:21:18Z gbevin $
07: */
08: package com.uwyn.rife.database.querymanagers.generic.exceptions;
09:
10: import com.uwyn.rife.database.exceptions.DatabaseException;
11:
12: public class UnsupportedManyToOneAssociationPropertyTypeException
13: extends DatabaseException {
14: private Class mBeanClass;
15: private String mPropertyName;
16: private Class mType;
17:
18: static final long serialVersionUID = 221066901914357366L;
19:
20: public UnsupportedManyToOneAssociationPropertyTypeException(
21: Class beanClass, String propertyName, Class type) {
22: super (
23: "The bean '"
24: + beanClass.getName()
25: + "' declares a many-to-one association relationship on property '"
26: + propertyName
27: + "', however the property's type '"
28: + type.getName()
29: + "' is not supported. Only java.util.Collection, java.util.Set and java.util.List can be used.");
30:
31: mBeanClass = beanClass;
32: mPropertyName = propertyName;
33: mType = type;
34: }
35:
36: public Class getBeanClass() {
37: return mBeanClass;
38: }
39:
40: public String getPropertyName() {
41: return mPropertyName;
42: }
43:
44: public Class getType() {
45: return mType;
46: }
47: }
|