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: UnsupportedVirtualParameterTypeException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.database.exceptions;
09:
10: import com.uwyn.rife.database.DbPreparedStatement;
11:
12: public class UnsupportedVirtualParameterTypeException extends
13: DatabaseException {
14: private static final long serialVersionUID = -4366883446335774838L;
15:
16: private DbPreparedStatement mPreparedStatement = null;
17: private int mParameterIndex = -1;
18: private String mValueType = null;
19:
20: public UnsupportedVirtualParameterTypeException(
21: DbPreparedStatement statement, int parameterIndex,
22: String valueType) {
23: super ("The statement with sql '" + statement.getSql()
24: + "' doesn't support the value type '" + valueType
25: + "' for the virtual parameter with index '"
26: + parameterIndex + "'.");
27: mPreparedStatement = statement;
28: mParameterIndex = parameterIndex;
29: mValueType = valueType;
30: }
31:
32: public DbPreparedStatement getPreparedStatement() {
33: return mPreparedStatement;
34: }
35:
36: public int getParameterIndex() {
37: return mParameterIndex;
38: }
39:
40: public String getValueType() {
41: return mValueType;
42: }
43: }
|