ResultSetWrappingSqlRowSet.java 16.7 KB
Newer Older
A
Arjen Poutsma 已提交
1
/*
2
 * Copyright 2002-2012 the original author or authors.
A
Arjen Poutsma 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.jdbc.support.rowset;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.ResultSet;
22
import java.sql.ResultSetMetaData;
A
Arjen Poutsma 已提交
23 24 25 26
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
J
Juergen Hoeller 已提交
27
import java.util.Collections;
28
import java.util.HashMap;
A
Arjen Poutsma 已提交
29 30 31 32 33 34 35
import java.util.Map;

import org.springframework.jdbc.InvalidResultSetAccessException;

/**
 * Default implementation of Spring's {@link SqlRowSet} interface.
 *
36
 * <p>This implementation wraps a {@code javax.sql.ResultSet}, catching any SQLExceptions
J
Juergen Hoeller 已提交
37
 * and translating them to the appropriate Spring {@link InvalidResultSetAccessException}.
A
Arjen Poutsma 已提交
38
 *
J
Juergen Hoeller 已提交
39 40
 * <p>The passed-in ResultSets should already be disconnected if the SqlRowSet is supposed
 * to be usable in a disconnected fashion. This means that you will usually pass in a
41
 * {@code javax.sql.rowset.CachedRowSet}, which implements the ResultSet interface.
A
Arjen Poutsma 已提交
42
 *
J
Juergen Hoeller 已提交
43 44 45 46
 * <p>Note: Since JDBC 4.0, it has been clarified that any methods using a String to identify
 * the column should be using the column label. The column label is assigned using the ALIAS
 * keyword in the SQL query string. When the query doesn't use an ALIAS, the default label is
 * the column name. Most JDBC ResultSet implementations follow this new pattern but there are
47
 * exceptions such as the {@code com.sun.rowset.CachedRowSetImpl} class which only uses
J
Juergen Hoeller 已提交
48 49
 * the column name, ignoring any column labels. As of Spring 3.0.5, ResultSetWrappingSqlRowSet
 * will translate column labels to the correct column index to provide better support for the
50
 * {@code com.sun.rowset.CachedRowSetImpl} which is the default implementation used by
J
Juergen Hoeller 已提交
51 52
 * {@link org.springframework.jdbc.core.JdbcTemplate} when working with RowSets.
 *
53
 * <p>Note: This class implements the {@code java.io.Serializable} marker interface
J
Juergen Hoeller 已提交
54 55 56
 * through the SqlRowSet interface, but is only actually serializable if the disconnected
 * ResultSet/RowSet contained in it is serializable. Most CachedRowSet implementations
 * are actually serializable, so this should usually work out.
A
Arjen Poutsma 已提交
57 58 59 60 61 62
 *
 * @author Thomas Risberg
 * @author Juergen Hoeller
 * @since 1.2
 * @see java.sql.ResultSet
 * @see javax.sql.rowset.CachedRowSet
J
Juergen Hoeller 已提交
63
 * @see org.springframework.jdbc.core.JdbcTemplate#queryForRowSet
A
Arjen Poutsma 已提交
64 65 66 67 68 69 70 71 72 73
 */
public class ResultSetWrappingSqlRowSet implements SqlRowSet {

	/** use serialVersionUID from Spring 1.2 for interoperability */
	private static final long serialVersionUID = -4688694393146734764L;


	private final ResultSet resultSet;

	private final SqlRowSetMetaData rowSetMetaData;
74

75
	private final Map<String, Integer> columnLabelMap;
A
Arjen Poutsma 已提交
76 77 78 79 80


	/**
	 * Create a new ResultSetWrappingSqlRowSet for the given ResultSet.
	 * @param resultSet a disconnected ResultSet to wrap
81
	 * (usually a {@code javax.sql.rowset.CachedRowSet})
A
Arjen Poutsma 已提交
82 83 84 85 86 87 88 89 90 91 92 93 94 95
	 * @throws InvalidResultSetAccessException if extracting
	 * the ResultSetMetaData failed
	 * @see javax.sql.rowset.CachedRowSet
	 * @see java.sql.ResultSet#getMetaData
	 * @see ResultSetWrappingSqlRowSetMetaData
	 */
	public ResultSetWrappingSqlRowSet(ResultSet resultSet) throws InvalidResultSetAccessException {
		this.resultSet = resultSet;
		try {
			this.rowSetMetaData = new ResultSetWrappingSqlRowSetMetaData(resultSet.getMetaData());
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
96 97 98 99 100 101
		try {
			ResultSetMetaData rsmd = resultSet.getMetaData();
			if (rsmd != null) {
				int columnCount = rsmd.getColumnCount();
				this.columnLabelMap = new HashMap<String, Integer>(columnCount);
				for (int i = 1; i <= columnCount; i++) {
J
Juergen Hoeller 已提交
102
					this.columnLabelMap.put(rsmd.getColumnLabel(i), i);
103 104 105
				}
			}
			else {
J
Juergen Hoeller 已提交
106
				this.columnLabelMap = Collections.emptyMap();
107
			}
J
Juergen Hoeller 已提交
108 109
		}
		catch (SQLException se) {
110 111
			throw new InvalidResultSetAccessException(se);
		}
112

A
Arjen Poutsma 已提交
113 114 115 116 117
	}


	/**
	 * Return the underlying ResultSet
118
	 * (usually a {@code javax.sql.rowset.CachedRowSet}).
A
Arjen Poutsma 已提交
119 120 121 122 123 124 125 126 127 128 129 130
	 * @see javax.sql.rowset.CachedRowSet
	 */
	public final ResultSet getResultSet() {
		return this.resultSet;
	}

	/**
	 * @see java.sql.ResultSetMetaData#getCatalogName(int)
	 */
	public final SqlRowSetMetaData getMetaData() {
		return this.rowSetMetaData;
	}
131

A
Arjen Poutsma 已提交
132 133 134
	/**
	 * @see java.sql.ResultSet#findColumn(String)
	 */
135
	public int findColumn(String columnLabel) throws InvalidResultSetAccessException {
J
Juergen Hoeller 已提交
136 137 138 139 140
		Integer columnIndex = this.columnLabelMap.get(columnLabel);
		if (columnIndex != null) {
			return columnIndex;
		}
		else {
141
			try {
J
Juergen Hoeller 已提交
142
				return this.resultSet.findColumn(columnLabel);
143
			}
144 145 146
			catch (SQLException se) {
				throw new InvalidResultSetAccessException(se);
			}
A
Arjen Poutsma 已提交
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
		}
	}


	// RowSet methods for extracting data values

	/**
	 * @see java.sql.ResultSet#getBigDecimal(int)
	 */
	public BigDecimal getBigDecimal(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getBigDecimal(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
164

A
Arjen Poutsma 已提交
165 166 167
	/**
	 * @see java.sql.ResultSet#getBigDecimal(String)
	 */
168 169
	public BigDecimal getBigDecimal(String columnLabel) throws InvalidResultSetAccessException {
		return getBigDecimal(findColumn(columnLabel));
A
Arjen Poutsma 已提交
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
	}

	/**
	 * @see java.sql.ResultSet#getBoolean(int)
	 */
	public boolean getBoolean(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getBoolean(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#getBoolean(String)
	 */
187 188
	public boolean getBoolean(String columnLabel) throws InvalidResultSetAccessException {
		return getBoolean(findColumn(columnLabel));
A
Arjen Poutsma 已提交
189
	}
190

A
Arjen Poutsma 已提交
191 192 193 194 195 196 197 198 199 200 201
	/**
	 * @see java.sql.ResultSet#getByte(int)
	 */
	public byte getByte(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getByte(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
202

A
Arjen Poutsma 已提交
203 204 205
	/**
	 * @see java.sql.ResultSet#getByte(String)
	 */
206 207
	public byte getByte(String columnLabel) throws InvalidResultSetAccessException {
		return getByte(findColumn(columnLabel));
A
Arjen Poutsma 已提交
208
	}
209

A
Arjen Poutsma 已提交
210 211 212 213 214 215 216 217 218 219 220
	/**
	 * @see java.sql.ResultSet#getDate(int, java.util.Calendar)
	 */
	public Date getDate(int columnIndex, Calendar cal) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getDate(columnIndex, cal);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
221

A
Arjen Poutsma 已提交
222 223 224 225 226 227 228 229 230 231 232 233 234 235
	/**
	 * @see java.sql.ResultSet#getDate(int)
	 */
	public Date getDate(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getDate(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
	/**
	 * @see java.sql.ResultSet#getDate(String, java.util.Calendar)
	 */
236 237
	public Date getDate(String columnLabel, Calendar cal) throws InvalidResultSetAccessException {
		return getDate(findColumn(columnLabel), cal);
A
Arjen Poutsma 已提交
238
	}
239

A
Arjen Poutsma 已提交
240 241 242
	/**
	 * @see java.sql.ResultSet#getDate(String)
	 */
243 244
	public Date getDate(String columnLabel) throws InvalidResultSetAccessException {
		return getDate(findColumn(columnLabel));
A
Arjen Poutsma 已提交
245
	}
246

A
Arjen Poutsma 已提交
247 248 249 250 251 252 253 254 255 256 257
	/**
	 * @see java.sql.ResultSet#getDouble(int)
	 */
	public double getDouble(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getDouble(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
258

A
Arjen Poutsma 已提交
259 260 261
	/**
	 * @see java.sql.ResultSet#getDouble(String)
	 */
262 263
	public double getDouble(String columnLabel) throws InvalidResultSetAccessException {
		return getDouble(findColumn(columnLabel));
A
Arjen Poutsma 已提交
264
	}
265

A
Arjen Poutsma 已提交
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
	/**
	 * @see java.sql.ResultSet#getFloat(int)
	 */
	public float getFloat(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getFloat(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#getFloat(String)
	 */
281 282
	public float getFloat(String columnLabel) throws InvalidResultSetAccessException {
		return getFloat(findColumn(columnLabel));
A
Arjen Poutsma 已提交
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
	}
	/**
	 * @see java.sql.ResultSet#getInt(int)
	 */
	public int getInt(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getInt(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#getInt(String)
	 */
299 300
	public int getInt(String columnLabel) throws InvalidResultSetAccessException {
		return getInt(findColumn(columnLabel));
A
Arjen Poutsma 已提交
301
	}
302

A
Arjen Poutsma 已提交
303 304 305 306 307 308 309 310 311 312 313
	/**
	 * @see java.sql.ResultSet#getLong(int)
	 */
	public long getLong(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getLong(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
314

A
Arjen Poutsma 已提交
315 316 317
	/**
	 * @see java.sql.ResultSet#getLong(String)
	 */
318 319
	public long getLong(String columnLabel) throws InvalidResultSetAccessException {
		return getLong(findColumn(columnLabel));
A
Arjen Poutsma 已提交
320
	}
321

A
Arjen Poutsma 已提交
322 323 324
	/**
	 * @see java.sql.ResultSet#getObject(int, java.util.Map)
	 */
325
	public Object getObject(int i,  Map<String, Class<?>> map) throws InvalidResultSetAccessException {
A
Arjen Poutsma 已提交
326 327 328 329 330 331 332
		try {
			return this.resultSet.getObject(i, map);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
333

A
Arjen Poutsma 已提交
334 335 336 337 338 339 340 341 342 343 344
	/**
	 * @see java.sql.ResultSet#getObject(int)
	 */
	public Object getObject(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getObject(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
345

A
Arjen Poutsma 已提交
346 347 348
	/**
	 * @see java.sql.ResultSet#getObject(String, java.util.Map)
	 */
349 350
	public Object getObject(String columnLabel,  Map<String, Class<?>> map) throws InvalidResultSetAccessException {
		return getObject(findColumn(columnLabel), map);
A
Arjen Poutsma 已提交
351
	}
352

A
Arjen Poutsma 已提交
353 354 355
	/**
	 * @see java.sql.ResultSet#getObject(String)
	 */
356 357
	public Object getObject(String columnLabel) throws InvalidResultSetAccessException {
		return getObject(findColumn(columnLabel));
A
Arjen Poutsma 已提交
358
	}
359

A
Arjen Poutsma 已提交
360 361 362 363 364 365 366 367 368 369 370
	/**
	 * @see java.sql.ResultSet#getShort(int)
	 */
	public short getShort(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getShort(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
371

A
Arjen Poutsma 已提交
372 373 374
	/**
	 * @see java.sql.ResultSet#getShort(String)
	 */
375 376
	public short getShort(String columnLabel) throws InvalidResultSetAccessException {
		return getShort(findColumn(columnLabel));
A
Arjen Poutsma 已提交
377
	}
378

A
Arjen Poutsma 已提交
379 380 381 382 383 384 385 386 387 388 389
	/**
	 * @see java.sql.ResultSet#getString(int)
	 */
	public String getString(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getString(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
390

A
Arjen Poutsma 已提交
391 392 393
	/**
	 * @see java.sql.ResultSet#getString(String)
	 */
394 395
	public String getString(String columnLabel) throws InvalidResultSetAccessException {
		return getString(findColumn(columnLabel));
A
Arjen Poutsma 已提交
396
	}
397

A
Arjen Poutsma 已提交
398 399 400 401 402 403 404 405 406 407 408
	/**
	 * @see java.sql.ResultSet#getTime(int, java.util.Calendar)
	 */
	public Time getTime(int columnIndex, Calendar cal) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getTime(columnIndex, cal);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
409

A
Arjen Poutsma 已提交
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
	/**
	 * @see java.sql.ResultSet#getTime(int)
	 */
	public Time getTime(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getTime(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#getTime(String, java.util.Calendar)
	 */
425 426
	public Time getTime(String columnLabel, Calendar cal) throws InvalidResultSetAccessException {
		return getTime(findColumn(columnLabel), cal);
A
Arjen Poutsma 已提交
427
	}
428

A
Arjen Poutsma 已提交
429 430 431
	/**
	 * @see java.sql.ResultSet#getTime(String)
	 */
432 433
	public Time getTime(String columnLabel) throws InvalidResultSetAccessException {
		return getTime(findColumn(columnLabel));
A
Arjen Poutsma 已提交
434
	}
435

A
Arjen Poutsma 已提交
436 437 438 439 440 441 442 443 444 445 446
	/**
	 * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar)
	 */
	public Timestamp getTimestamp(int columnIndex, Calendar cal) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getTimestamp(columnIndex, cal);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
447

A
Arjen Poutsma 已提交
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
	/**
	 * @see java.sql.ResultSet#getTimestamp(int)
	 */
	public Timestamp getTimestamp(int columnIndex) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getTimestamp(columnIndex);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#getTimestamp(String, java.util.Calendar)
	 */
463 464
	public Timestamp getTimestamp(String columnLabel, Calendar cal) throws InvalidResultSetAccessException {
		return getTimestamp(findColumn(columnLabel), cal);
A
Arjen Poutsma 已提交
465 466 467 468 469
	}

	/**
	 * @see java.sql.ResultSet#getTimestamp(String)
	 */
470 471
	public Timestamp getTimestamp(String columnLabel) throws InvalidResultSetAccessException {
		return getTimestamp(findColumn(columnLabel));
A
Arjen Poutsma 已提交
472 473 474 475
	}


	// RowSet navigation methods
476

A
Arjen Poutsma 已提交
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499
	/**
	 * @see java.sql.ResultSet#absolute(int)
	 */
	public boolean absolute(int row) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.absolute(row);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#afterLast()
	 */
	public void afterLast() throws InvalidResultSetAccessException {
		try {
			this.resultSet.afterLast();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
500

A
Arjen Poutsma 已提交
501 502 503 504 505 506 507 508 509 510 511
	/**
	 * @see java.sql.ResultSet#beforeFirst()
	 */
	public void beforeFirst() throws InvalidResultSetAccessException {
		try {
			this.resultSet.beforeFirst();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
512

A
Arjen Poutsma 已提交
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
	/**
	 * @see java.sql.ResultSet#first()
	 */
	public boolean first() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.first();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#getRow()
	 */
	public int getRow() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.getRow();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#isAfterLast()
	 */
	public boolean isAfterLast() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.isAfterLast();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

	/**
	 * @see java.sql.ResultSet#isBeforeFirst()
	 */
	public boolean isBeforeFirst() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.isBeforeFirst();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
560

A
Arjen Poutsma 已提交
561 562 563 564 565 566 567 568 569 570 571
	/**
	 * @see java.sql.ResultSet#isFirst()
	 */
	public boolean isFirst() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.isFirst();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
572

A
Arjen Poutsma 已提交
573 574 575 576 577 578 579 580 581 582 583
	/**
	 * @see java.sql.ResultSet#isLast()
	 */
	public boolean isLast() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.isLast();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
584

A
Arjen Poutsma 已提交
585 586 587 588 589 590 591 592 593 594 595
	/**
	 * @see java.sql.ResultSet#last()
	 */
	public boolean last() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.last();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
596

A
Arjen Poutsma 已提交
597 598 599 600 601 602 603 604 605 606 607
	/**
	 * @see java.sql.ResultSet#next()
	 */
	public boolean next() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.next();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
608

A
Arjen Poutsma 已提交
609 610 611 612 613 614 615 616 617 618 619
	/**
	 * @see java.sql.ResultSet#previous()
	 */
	public boolean previous() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.previous();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
620

A
Arjen Poutsma 已提交
621 622 623 624 625 626 627 628 629 630 631
	/**
	 * @see java.sql.ResultSet#relative(int)
	 */
	public boolean relative(int rows) throws InvalidResultSetAccessException {
		try {
			return this.resultSet.relative(rows);
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}
632

A
Arjen Poutsma 已提交
633 634 635 636 637 638 639 640 641 642 643 644 645
	/**
	 * @see java.sql.ResultSet#wasNull()
	 */
	public boolean wasNull() throws InvalidResultSetAccessException {
		try {
			return this.resultSet.wasNull();
		}
		catch (SQLException se) {
			throw new InvalidResultSetAccessException(se);
		}
	}

}