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: ParameterDoesntExistException.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 ParameterDoesntExistException extends DatabaseException {
13: private static final long serialVersionUID = -5547694215702755839L;
14:
15: private DbPreparedStatement mPreparedStatement = null;
16: private String mParameterName = null;
17:
18: public ParameterDoesntExistException(DbPreparedStatement statement,
19: String parameterName) {
20: super ("The statement with sql '" + statement.getSql()
21: + "' doesn't contain the parameter '" + parameterName
22: + "'.");
23: mPreparedStatement = statement;
24: mParameterName = parameterName;
25: }
26:
27: public DbPreparedStatement getPreparedStatement() {
28: return mPreparedStatement;
29: }
30:
31: public String getParameterName() {
32: return mParameterName;
33: }
34: }
|