0001: /*
0002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
0003: *
0004: * This file is part of Resin(R) Open Source
0005: *
0006: * Each copy or derived work must preserve the copyright notice and this
0007: * notice unmodified.
0008: *
0009: * Resin Open Source is free software; you can redistribute it and/or modify
0010: * it under the terms of the GNU General Public License as published by
0011: * the Free Software Foundation; either version 2 of the License, or
0012: * (at your option) any later version.
0013: *
0014: * Resin Open Source is distributed in the hope that it will be useful,
0015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
0017: * of NON-INFRINGEMENT. See the GNU General Public License for more
0018: * details.
0019: *
0020: * You should have received a copy of the GNU General Public License
0021: * along with Resin Open Source; if not, write to the
0022: * Free Software Foundation, Inc.
0023: * 59 Temple Place, Suite 330
0024: * Boston, MA 02111-1307 USA
0025: *
0026: * @author Scott Ferguson
0027: */
0028:
0029: package com.caucho.amber.query;
0030:
0031: import com.caucho.amber.entity.AmberEntityHome;
0032: import com.caucho.amber.entity.Entity;
0033: import com.caucho.amber.entity.EntityItem;
0034: import com.caucho.amber.expr.AmberExpr;
0035: import com.caucho.amber.expr.LoadEntityExpr;
0036: import com.caucho.amber.manager.AmberConnection;
0037: import com.caucho.amber.type.EntityType;
0038: import com.caucho.util.L10N;
0039:
0040: import java.io.InputStream;
0041: import java.io.Reader;
0042: import java.math.BigDecimal;
0043: import java.net.URL;
0044: import java.sql.*;
0045: import java.util.ArrayList;
0046: import java.util.Calendar;
0047: import java.util.Map;
0048: import java.util.logging.Level;
0049: import java.util.logging.Logger;
0050:
0051: /**
0052: * The JDBC statement implementation.
0053: */
0054: public class ResultSetImpl implements ResultSet {
0055: private static final Logger log = Logger
0056: .getLogger(ResultSetImpl.class.getName());
0057: private static final L10N L = new L10N(ResultSetImpl.class);
0058:
0059: public static final int CACHE_CHUNK_SIZE = 64;
0060:
0061: private UserQuery _userQuery;
0062: private ResultSet _rs;
0063: private ArrayList<FromItem> _fromList;
0064: private ArrayList<AmberExpr> _resultList;
0065: private Map<AmberExpr, String> _joinFetchMap;
0066: private AmberConnection _session;
0067:
0068: private QueryCacheKey _cacheKey;
0069: private ResultSetCacheChunk _cacheChunk;
0070: private ResultSetMetaData _cacheMetaData;
0071: private boolean _isCache;
0072:
0073: private int _firstResult;
0074: private int _maxResults = Integer.MAX_VALUE / 2;
0075: private int _row;
0076:
0077: private int _numberOfLoadingColumns = 1;
0078:
0079: public ResultSetImpl() {
0080: }
0081:
0082: /**
0083: * Returns the join fetch map.
0084: */
0085: public Map<AmberExpr, String> getJoinFetchMap() {
0086: return _joinFetchMap;
0087: }
0088:
0089: /**
0090: * Sets the user query
0091: */
0092: public void setUserQuery(UserQuery userQuery) {
0093: _userQuery = userQuery;
0094: }
0095:
0096: /**
0097: * Sets the result set.
0098: */
0099: public void setResultSet(ResultSet rs) throws SQLException {
0100: _rs = rs;
0101:
0102: if (rs != null)
0103: _cacheMetaData = rs.getMetaData();
0104: }
0105:
0106: /**
0107: * Sets the result set and meta data.
0108: */
0109: public void setResultSet(ResultSet rs, ResultSetMetaData metaData) {
0110: _rs = rs;
0111: _cacheMetaData = metaData;
0112: }
0113:
0114: /**
0115: * Sets the query.
0116: */
0117: public void setQuery(SelectQuery query) {
0118: _fromList = query.getFromList();
0119: _resultList = query.getResultList();
0120: _joinFetchMap = query.getJoinFetchMap();
0121: }
0122:
0123: /**
0124: * Sets the session.
0125: */
0126: public void setSession(AmberConnection aConn) {
0127: _session = aConn;
0128: }
0129:
0130: /**
0131: * Sets the first cache chunk
0132: */
0133: public void setCacheChunk(ResultSetCacheChunk cacheChunk,
0134: ResultSetMetaData metaData) {
0135: _cacheChunk = cacheChunk;
0136: _cacheMetaData = metaData;
0137: _isCache = true;
0138: }
0139:
0140: /**
0141: * Sets the first result.
0142: */
0143: public void setFirstResult(int first) {
0144: _firstResult = first;
0145: }
0146:
0147: /**
0148: * Sets the max result.
0149: */
0150: public void setMaxResults(int max) {
0151: if (max < 0)
0152: _maxResults = Integer.MAX_VALUE / 2;
0153: else
0154: _maxResults = max;
0155: }
0156:
0157: /**
0158: * Fills the cache chunk.
0159: */
0160: public void fillCacheChunk(ResultSetCacheChunk cacheChunk)
0161: throws SQLException {
0162: int size = CACHE_CHUNK_SIZE;
0163: int maxSize = Integer.MAX_VALUE / 2;
0164: int i = 0;
0165:
0166: ResultSetCacheChunk tail = cacheChunk;
0167:
0168: // max length of the cached value
0169: for (; maxSize-- > 0; i++) {
0170: if (_rs.next()) {
0171: if (size <= i) {
0172: i = 0;
0173:
0174: ResultSetCacheChunk next = new ResultSetCacheChunk(
0175: tail);
0176: tail.setNext(next);
0177: tail = next;
0178: }
0179:
0180: tail.newRow();
0181:
0182: int len = _resultList.size();
0183: int offset = 0;
0184:
0185: for (int j = 0; j < len; j++) {
0186: int index = getColumn(j + 1);
0187:
0188: AmberExpr expr = _resultList.get(j);
0189:
0190: if (expr instanceof LoadEntityExpr) {
0191: LoadEntityExpr entityExpr = (LoadEntityExpr) expr;
0192:
0193: Object obj = entityExpr.getCacheObject(
0194: _session, _rs, index + offset,
0195: _joinFetchMap);
0196:
0197: tail.setValue(i, j, obj);
0198:
0199: // jpa/11z1
0200: offset += entityExpr.getIndex();
0201: } else {
0202: Object obj = expr.getCacheObject(_session, _rs,
0203: index + offset);
0204:
0205: tail.setValue(i, j, obj);
0206: }
0207: }
0208: } else {
0209: tail.setLast(true);
0210: return;
0211: }
0212: }
0213:
0214: /*
0215: if (! _rs.next()) {
0216: tail.setLast(true);
0217: }
0218: */
0219: }
0220:
0221: /**
0222: * Initialize
0223: */
0224: public void init() throws SQLException {
0225: _row = 0;
0226: _numberOfLoadingColumns = 1;
0227:
0228: while (_row < _firstResult && next()) {
0229: }
0230: }
0231:
0232: /**
0233: * Returns the current row number.
0234: */
0235: public int getRow() throws SQLException {
0236: return _rs.getRow();
0237: }
0238:
0239: /**
0240: * Returns true before the first row.
0241: */
0242: public boolean isBeforeFirst() throws SQLException {
0243: return _rs.isBeforeFirst();
0244: }
0245:
0246: /**
0247: * Returns true if this is the first row.
0248: */
0249: public boolean isFirst() throws SQLException {
0250: return _rs.isFirst();
0251: }
0252:
0253: /**
0254: * Returns true if this is the last row.
0255: */
0256: public boolean isLast() throws SQLException {
0257: return _rs.isLast();
0258: }
0259:
0260: /**
0261: * Returns true if this is after the last row.
0262: */
0263: public boolean isAfterLast() throws SQLException {
0264: return _rs.isAfterLast();
0265: }
0266:
0267: /**
0268: * Returns the statement for the result.
0269: */
0270: public java.sql.Statement getStatement() throws SQLException {
0271: return _rs.getStatement();
0272: }
0273:
0274: /**
0275: * Returns the metadata.
0276: */
0277: public java.sql.ResultSetMetaData getMetaData() throws SQLException {
0278: try {
0279:
0280: if (_rs == null)
0281: return _cacheMetaData;
0282: else {
0283: _cacheMetaData = _rs.getMetaData();
0284:
0285: return _cacheMetaData;
0286: }
0287:
0288: } catch (NullPointerException ex) {
0289: }
0290:
0291: return null;
0292: }
0293:
0294: /**
0295: * Returns the warnings.
0296: */
0297: public SQLWarning getWarnings() throws SQLException {
0298: return _rs.getWarnings();
0299: }
0300:
0301: /**
0302: * Clears the warnings.
0303: */
0304: public void clearWarnings() throws SQLException {
0305: _rs.clearWarnings();
0306: }
0307:
0308: /**
0309: * Returns the cursor name.
0310: */
0311: public String getCursorName() throws SQLException {
0312: return _rs.getCursorName();
0313: }
0314:
0315: /**
0316: * Sets the fetch size.
0317: */
0318: public void setFetchSize(int size) throws SQLException {
0319: _rs.setFetchSize(size);
0320: }
0321:
0322: /**
0323: * Gets the fetch size.
0324: */
0325: public int getFetchSize() throws SQLException {
0326: return _rs.getFetchSize();
0327: }
0328:
0329: /**
0330: * Gets the fetch direction.
0331: */
0332: public int getFetchDirection() throws SQLException {
0333: return _rs.getFetchDirection();
0334: }
0335:
0336: /**
0337: * Sets the fetch direction.
0338: */
0339: public void setFetchDirection(int dir) throws SQLException {
0340: _rs.setFetchDirection(dir);
0341: }
0342:
0343: /**
0344: * Gets the concurrency.
0345: */
0346: public int getConcurrency() throws SQLException {
0347: return _rs.getConcurrency();
0348: }
0349:
0350: /**
0351: * Returns the next row.
0352: */
0353: public boolean next() throws SQLException {
0354: if (_firstResult + _maxResults <= _row)
0355: return false;
0356:
0357: int row = _row++;
0358: ResultSetCacheChunk cacheChunk = _cacheChunk;
0359:
0360: if (cacheChunk == null)
0361: return _rs.next();
0362: else if (row < cacheChunk.getRowCount()) {
0363: return true;
0364: } else {
0365: ResultSetCacheChunk next = cacheChunk.getNext();
0366:
0367: if (next != null) {
0368: _cacheChunk = next;
0369: return true;
0370: }
0371:
0372: _isCache = false;
0373: _cacheChunk = null;
0374:
0375: if (cacheChunk.isLast()) {
0376: _maxResults = 0;
0377: return false;
0378: } else if (_rs != null)
0379: return true;
0380: else if (_userQuery != null) {
0381: _rs = _userQuery.executeQuery(row, -1);
0382:
0383: _cacheMetaData = _rs.getMetaData();
0384:
0385: return _rs.next();
0386: } else {
0387: return false;
0388: }
0389: }
0390: }
0391:
0392: /**
0393: * Returns the previous row.
0394: */
0395: public boolean previous() throws SQLException {
0396: if (_row <= _firstResult)
0397: return false;
0398:
0399: _row--;
0400:
0401: return _rs.previous();
0402: }
0403:
0404: /**
0405: * Move relative.
0406: */
0407: public boolean relative(int delta) throws SQLException {
0408: return _rs.relative(delta);
0409: }
0410:
0411: /**
0412: * Move absolute.
0413: */
0414: public boolean absolute(int delta) throws SQLException {
0415: return _rs.absolute(delta);
0416: }
0417:
0418: /**
0419: * Moves before the first row.
0420: */
0421: public void beforeFirst() throws SQLException {
0422: _rs.beforeFirst();
0423: }
0424:
0425: /**
0426: * Move to first
0427: */
0428: public boolean first() throws SQLException {
0429: return _rs.first();
0430: }
0431:
0432: /**
0433: * Move to last
0434: */
0435: public boolean last() throws SQLException {
0436: return _rs.last();
0437: }
0438:
0439: /**
0440: * Moves after the last row.
0441: */
0442: public void afterLast() throws SQLException {
0443: _rs.afterLast();
0444: }
0445:
0446: /**
0447: * Returns true if the last column read was null.
0448: */
0449: public boolean wasNull() throws SQLException {
0450: return _rs.wasNull();
0451: }
0452:
0453: /**
0454: * Returns the type of the last column.
0455: */
0456: public int getType() throws SQLException {
0457: return _rs.getType();
0458: }
0459:
0460: /**
0461: * Returns the external column id corresponding to the column name.
0462: */
0463: public int findColumn(String columnName) throws SQLException {
0464: throw new UnsupportedOperationException();
0465: }
0466:
0467: /**
0468: * Returns the boolean value for the column.
0469: */
0470: public boolean getBoolean(String columnName) throws SQLException {
0471: int column = getColumn(columnName);
0472:
0473: if (_cacheChunk != null)
0474: return _cacheChunk.getBoolean(_row - 1, column - 1);
0475: else
0476: return _rs.getBoolean(column);
0477: }
0478:
0479: /**
0480: * Returns the boolean value for the column.
0481: */
0482: public boolean getBoolean(int column) throws SQLException {
0483: if (_cacheChunk != null)
0484: return _cacheChunk.getBoolean(_row - 1, column - 1);
0485: else
0486: return _rs.getBoolean(column);
0487: }
0488:
0489: /**
0490: * Returns the byte value for the column.
0491: */
0492: public byte getByte(String columnName) throws SQLException {
0493: int column = getColumn(columnName);
0494:
0495: if (_cacheChunk != null)
0496: return _cacheChunk.getByte(_row - 1, column - 1);
0497: else
0498: return _rs.getByte(column);
0499: }
0500:
0501: /**
0502: * Returns the byte value for the column.
0503: */
0504: public byte getByte(int column) throws SQLException {
0505: if (_cacheChunk != null)
0506: return _cacheChunk.getByte(_row - 1, column - 1);
0507: else
0508: return _rs.getByte(column);
0509: }
0510:
0511: /**
0512: * Returns the short value for the column.
0513: */
0514: public short getShort(String columnName) throws SQLException {
0515: int column = getColumn(columnName);
0516:
0517: if (_cacheChunk != null)
0518: return _cacheChunk.getShort(_row - 1, column - 1);
0519: else
0520: return _rs.getShort(column);
0521: }
0522:
0523: /**
0524: * Returns the short value for the column.
0525: */
0526: public short getShort(int column) throws SQLException {
0527: if (_cacheChunk != null)
0528: return _cacheChunk.getShort(_row - 1, column - 1);
0529: else
0530: return _rs.getShort(column);
0531: }
0532:
0533: /**
0534: * Returns the int value for the column.
0535: */
0536: public int getInt(String columnName) throws SQLException {
0537: int column = getColumn(columnName);
0538:
0539: if (_cacheChunk != null)
0540: return _cacheChunk.getInt(_row - 1, column - 1);
0541: else
0542: return _rs.getInt(column);
0543: }
0544:
0545: /**
0546: * Returns the int value for the column.
0547: */
0548: public int getInt(int column) throws SQLException {
0549: if (_cacheChunk != null)
0550: return _cacheChunk.getInt(_row - 1, column - 1);
0551: else
0552: return _rs.getInt(column);
0553: }
0554:
0555: /**
0556: * Returns the long value for the column.
0557: */
0558: public long getLong(String columnName) throws SQLException {
0559: int column = getColumn(columnName);
0560:
0561: if (_cacheChunk != null)
0562: return _cacheChunk.getLong(_row - 1, column - 1);
0563: else
0564: return _rs.getLong(column);
0565: }
0566:
0567: /**
0568: * Returns the long value for the column.
0569: */
0570: public long getLong(int column) throws SQLException {
0571: if (_cacheChunk != null)
0572: return _cacheChunk.getLong(_row - 1, column - 1);
0573: else
0574: return _rs.getLong(column);
0575: }
0576:
0577: /**
0578: * Returns the float value for the column.
0579: */
0580: public float getFloat(String columnName) throws SQLException {
0581: int column = getColumn(columnName);
0582:
0583: if (_cacheChunk != null)
0584: return _cacheChunk.getFloat(_row - 1, column - 1);
0585: else
0586: return _rs.getFloat(column);
0587: }
0588:
0589: /**
0590: * Returns the float value for the column.
0591: */
0592: public float getFloat(int column) throws SQLException {
0593: if (_cacheChunk != null)
0594: return _cacheChunk.getFloat(_row - 1, column - 1);
0595: else
0596: return _rs.getFloat(column);
0597: }
0598:
0599: /**
0600: * Returns the double value for the column.
0601: */
0602: public double getDouble(String columnName) throws SQLException {
0603: int column = getColumn(columnName);
0604:
0605: if (_cacheChunk != null)
0606: return _cacheChunk.getDouble(_row - 1, column - 1);
0607: else
0608: return _rs.getDouble(column);
0609: }
0610:
0611: /**
0612: * Returns the double value for the column.
0613: */
0614: public double getDouble(int column) throws SQLException {
0615: if (_cacheChunk != null)
0616: return _cacheChunk.getDouble(_row - 1, column - 1);
0617: else
0618: return _rs.getDouble(column);
0619: }
0620:
0621: /**
0622: * Returns the string value for the column.
0623: */
0624: public String getString(int column) throws SQLException {
0625: if (_cacheChunk != null)
0626: return _cacheChunk.getString(_row - 1, column - 1);
0627: else
0628: return _rs.getString(column);
0629: }
0630:
0631: /**
0632: * Returns the string value for the column.
0633: */
0634: public String getString(String columnName) throws SQLException {
0635: int column = getColumn(columnName);
0636:
0637: if (_cacheChunk != null)
0638: return _cacheChunk.getString(_row - 1, column - 1);
0639: else
0640: return _rs.getString(column);
0641: }
0642:
0643: /**
0644: * Returns the bytes value for the column.
0645: */
0646: public byte[] getBytes(int column) throws SQLException {
0647: return _rs.getBytes(getColumn(column));
0648: }
0649:
0650: /**
0651: * Returns the bytes value for the column.
0652: */
0653: public byte[] getBytes(String column) throws SQLException {
0654: return _rs.getBytes(getColumn(column));
0655: }
0656:
0657: /**
0658: * Returns the column value as a date.
0659: */
0660: public java.sql.Date getDate(int column) throws SQLException {
0661: return _rs.getDate(getColumn(column));
0662: }
0663:
0664: /**
0665: * Returns the column value as a date.
0666: */
0667: public java.sql.Date getDate(String column) throws SQLException {
0668: return _rs.getDate(getColumn(column));
0669: }
0670:
0671: /**
0672: * Returns the column value as a date.
0673: */
0674: public java.sql.Date getDate(int column, Calendar cal)
0675: throws SQLException {
0676: return _rs.getDate(getColumn(column), cal);
0677: }
0678:
0679: /**
0680: * Returns the column value as a date.
0681: */
0682: public java.sql.Date getDate(String column, Calendar cal)
0683: throws SQLException {
0684: return _rs.getDate(getColumn(column), cal);
0685: }
0686:
0687: /**
0688: * Returns the time value for the column.
0689: */
0690: public Time getTime(int column) throws SQLException {
0691: return _rs.getTime(getColumn(column));
0692: }
0693:
0694: /**
0695: * Returns the time value for the column.
0696: */
0697: public Time getTime(String column) throws SQLException {
0698: return _rs.getTime(getColumn(column));
0699: }
0700:
0701: /**
0702: * Returns the time value for the column.
0703: */
0704: public Time getTime(int column, Calendar cal) throws SQLException {
0705: return _rs.getTime(getColumn(column), cal);
0706: }
0707:
0708: /**
0709: * Returns the time value for the column.
0710: */
0711: public Time getTime(String column, Calendar cal)
0712: throws SQLException {
0713: return _rs.getTime(getColumn(column), cal);
0714: }
0715:
0716: /**
0717: * Returns the column as a timestamp.
0718: */
0719: public Timestamp getTimestamp(int column) throws SQLException {
0720: return _rs.getTimestamp(getColumn(column));
0721: }
0722:
0723: /**
0724: * Returns the column as a timestamp.
0725: */
0726: public Timestamp getTimestamp(String column) throws SQLException {
0727: return _rs.getTimestamp(getColumn(column));
0728: }
0729:
0730: /**
0731: * Returns the column as a timestamp.
0732: */
0733: public Timestamp getTimestamp(int column, Calendar cal)
0734: throws SQLException {
0735: return _rs.getTimestamp(getColumn(column), cal);
0736: }
0737:
0738: /**
0739: * Returns the column as a timestamp.
0740: */
0741: public Timestamp getTimestamp(String column, Calendar cal)
0742: throws SQLException {
0743: return _rs.getTimestamp(getColumn(column), cal);
0744: }
0745:
0746: /**
0747: * Returns a ref value for the column.
0748: */
0749: public Ref getRef(int column) throws SQLException {
0750: return _rs.getRef(getColumn(column));
0751: }
0752:
0753: /**
0754: * Returns a ref value for the column.
0755: */
0756: public Ref getRef(String column) throws SQLException {
0757: return _rs.getRef(getColumn(column));
0758: }
0759:
0760: /**
0761: * Returns a clob value for the column.
0762: */
0763: public Clob getClob(int column) throws SQLException {
0764: return _rs.getClob(getColumn(column));
0765: }
0766:
0767: /**
0768: * Returns a clob value for the column.
0769: */
0770: public Clob getClob(String column) throws SQLException {
0771: return _rs.getClob(getColumn(column));
0772: }
0773:
0774: /**
0775: * Returns a blob value for the column.
0776: */
0777: public Blob getBlob(int column) throws SQLException {
0778: return _rs.getBlob(getColumn(column));
0779: }
0780:
0781: /**
0782: * Returns a blob value for the column.
0783: */
0784: public Blob getBlob(String column) throws SQLException {
0785: return _rs.getBlob(getColumn(column));
0786: }
0787:
0788: /**
0789: * Returns a character stream for the column.
0790: */
0791: public Reader getCharacterStream(int column) throws SQLException {
0792: return _rs.getCharacterStream(getColumn(column));
0793: }
0794:
0795: /**
0796: * Returns a character stream for the column.
0797: */
0798: public Reader getCharacterStream(String column) throws SQLException {
0799: return _rs.getCharacterStream(getColumn(column));
0800: }
0801:
0802: /**
0803: * Returns a binary stream for the column.
0804: */
0805: public InputStream getBinaryStream(int column) throws SQLException {
0806: return _rs.getBinaryStream(getColumn(column));
0807: }
0808:
0809: /**
0810: * Returns a binary stream for the column.
0811: */
0812: public InputStream getBinaryStream(String column)
0813: throws SQLException {
0814: return _rs.getBinaryStream(getColumn(column));
0815: }
0816:
0817: /**
0818: * Returns an ascii stream for the column.
0819: */
0820: public InputStream getAsciiStream(int column) throws SQLException {
0821: return _rs.getAsciiStream(getColumn(column));
0822: }
0823:
0824: /**
0825: * Returns an ascii stream for the column.
0826: */
0827: public InputStream getAsciiStream(String column)
0828: throws SQLException {
0829: return _rs.getAsciiStream(getColumn(column));
0830: }
0831:
0832: /**
0833: * Returns a unicode stream for the column.
0834: */
0835: public InputStream getUnicodeStream(int column) throws SQLException {
0836: return _rs.getUnicodeStream(getColumn(column));
0837: }
0838:
0839: /**
0840: * Returns a unicode stream for the column.
0841: */
0842: public InputStream getUnicodeStream(String column)
0843: throws SQLException {
0844: return _rs.getUnicodeStream(getColumn(column));
0845: }
0846:
0847: /**
0848: * Returns an array value for the column.
0849: */
0850: public Array getArray(int column) throws SQLException {
0851: return _rs.getArray(getColumn(column));
0852: }
0853:
0854: /**
0855: * Returns an array value for the column.
0856: */
0857: public Array getArray(String column) throws SQLException {
0858: return _rs.getArray(getColumn(column));
0859: }
0860:
0861: /**
0862: * Returns a URL value for the column.
0863: */
0864: public URL getURL(int column) throws SQLException {
0865: return _rs.getURL(getColumn(column));
0866: }
0867:
0868: /**
0869: * Returns a URL value for the column.
0870: */
0871: public URL getURL(String column) throws SQLException {
0872: return _rs.getURL(getColumn(column));
0873: }
0874:
0875: /**
0876: * Returns a big decimal value for the column.
0877: */
0878: public BigDecimal getBigDecimal(int column) throws SQLException {
0879: return _rs.getBigDecimal(getColumn(column));
0880: }
0881:
0882: /**
0883: * Returns a big decimal value for the column.
0884: */
0885: public BigDecimal getBigDecimal(String column) throws SQLException {
0886: return _rs.getBigDecimal(getColumn(column));
0887: }
0888:
0889: /**
0890: * Returns a big decimal value for the column.
0891: */
0892: public BigDecimal getBigDecimal(int column, int digit)
0893: throws SQLException {
0894: return _rs.getBigDecimal(getColumn(column), digit);
0895: }
0896:
0897: /**
0898: * Returns a big decimal value for the column.
0899: */
0900: public BigDecimal getBigDecimal(String column, int digit)
0901: throws SQLException {
0902: return _rs.getBigDecimal(getColumn(column), digit);
0903: }
0904:
0905: /**
0906: * Returns the object value for the column.
0907: */
0908: public Object getObject(int column) throws SQLException {
0909: ResultSetCacheChunk cacheChunk = _cacheChunk;
0910:
0911: Object value = null;
0912:
0913: if (cacheChunk != null) {
0914: if (log.isLoggable(Level.FINER))
0915: log.finer(L.l(
0916: "amber Query returning cached getObject({0})",
0917: column));
0918:
0919: Object obj = cacheChunk.getObject(_row - 1, column - 1);
0920:
0921: if (obj instanceof EntityItem) {
0922: EntityItem entityItem = (EntityItem) obj;
0923:
0924: if (_session.isJPA())
0925: return _session.getEntity(entityItem);
0926: else
0927: return _session.loadProxy(entityItem);
0928:
0929: /*
0930: Entity entity = entityItem.getEntity();
0931:
0932: int index = getColumn(column);
0933:
0934: AmberExpr expr = _resultList.get(column - 1);
0935:
0936: EntityType entityType = entity.__caucho_getEntityType();
0937:
0938: boolean forceLoad = false;
0939:
0940: // jpa/0gf1
0941: // XXX: assert.
0942: if (expr instanceof LoadEntityExpr) {
0943: LoadEntityExpr entityExpr = (LoadEntityExpr) expr;
0944:
0945: if (entityType != entityExpr.getEntityType()) {
0946: forceLoad = true;
0947: entityType = entityExpr.getEntityType();
0948: }
0949: }
0950:
0951: if (entityType.getParentType() == null && ! forceLoad) {
0952: value = _session.loadProxy(entityType,
0953: entity.__caucho_getPrimaryKey());
0954: }
0955: else {
0956: // jpa/0l4a
0957: value = _session.loadFromHome(entityType.getBeanClass().getName(),
0958: entity.__caucho_getPrimaryKey());
0959: }
0960:
0961: _numberOfLoadingColumns = entityItem.getNumberOfLoadingColumns();
0962: */
0963: } else {
0964: value = obj;
0965: }
0966: } else {
0967: int index = getColumn(column);
0968:
0969: AmberExpr expr = _resultList.get(column - 1);
0970:
0971: if (_session == null)
0972: throw new NullPointerException();
0973:
0974: value = expr.getObject(_session, _rs, index);
0975:
0976: /*
0977: if (expr instanceof LoadEntityExpr) {
0978: if (log.isLoggable(Level.FINER))
0979: log.log(Level.FINER, L.l("ResultSetImpl expr is instance of LoadEntityExpr"));
0980:
0981: LoadEntityExpr entityExpr = (LoadEntityExpr) expr;
0982: _numberOfLoadingColumns = entityExpr.getIndex();
0983: }
0984: */
0985: }
0986:
0987: // jpa/0o40, jpa/1160
0988: if (value instanceof Entity) {
0989: Entity entity = (Entity) value;
0990:
0991: if (_session.isActiveTransaction())
0992: _session.setTransactionalState(entity);
0993:
0994: // jpa/1160
0995: // Should always add the entity to the context
0996: // and detach the entities after the result
0997: // list is fully retrieved. See manager.QueryImpl
0998:
0999: // XXX: should already be handled
1000: // _session.addEntity(entity);
1001:
1002: if (!_session.isJPA())
1003: return _session.loadProxy(entity
1004: .__caucho_getCacheItem());
1005: }
1006:
1007: return value;
1008: }
1009:
1010: /**
1011: * Returns the object value for the column.
1012: */
1013: public EntityItem findEntityItem(int column) throws SQLException {
1014: ResultSetCacheChunk cacheChunk = _cacheChunk;
1015:
1016: if (cacheChunk != null) {
1017: Object obj = cacheChunk.getObject(_row - 1, column - 1);
1018:
1019: if (obj instanceof EntityItem) {
1020: return (EntityItem) obj;
1021: } else
1022: throw new SQLException(L.l(
1023: "'{0}' is an unexpected type.", obj));
1024: } else {
1025: int index = getColumn(column);
1026:
1027: AmberExpr expr = _resultList.get(column - 1);
1028:
1029: EntityItem item = expr.findItem(_session, _rs, index);
1030:
1031: return item;
1032: }
1033: /*
1034: FromItem item = _fromList.get(column - 1);
1035: AmberEntityHome home = item.getEntityHome();
1036:
1037: return home.load(_session, _rs, index);
1038: */
1039: }
1040:
1041: /**
1042: * Returns the object value for the column.
1043: */
1044: public Object getObject(String column) throws SQLException {
1045: throw new UnsupportedOperationException();
1046: }
1047:
1048: /**
1049: * Returns the object value for the column.
1050: */
1051: public Object getKey(int column) throws SQLException {
1052: int index = getColumn(column);
1053:
1054: FromItem item = _fromList.get(column - 1);
1055: AmberEntityHome home = item.getEntityHome();
1056:
1057: Object key = home.getEntityType().getId().getObject(_rs, index);
1058:
1059: return key;
1060: }
1061:
1062: /**
1063: * Returns the object value for the column.
1064: */
1065: public Object getObject(int column, Map<String, Class<?>> map)
1066: throws SQLException {
1067: throw new UnsupportedOperationException();
1068: }
1069:
1070: /**
1071: * Returns the object value for the column.
1072: */
1073: public Object getObject(String column, Map<String, Class<?>> map)
1074: throws SQLException {
1075: throw new UnsupportedOperationException();
1076: }
1077:
1078: /**
1079: * Updating a string column in the row.
1080: */
1081: public void updateString(String column, String value)
1082: throws SQLException {
1083: throw new UnsupportedOperationException();
1084: }
1085:
1086: /**
1087: * Updating a string column in the row.
1088: */
1089: public void updateString(int column, String value)
1090: throws SQLException {
1091: throw new UnsupportedOperationException();
1092: }
1093:
1094: /**
1095: * Updating an object column in the row.
1096: */
1097: public void updateObject(String column, Object value)
1098: throws SQLException {
1099: throw new UnsupportedOperationException();
1100: }
1101:
1102: /**
1103: * Updating an object column in the row.
1104: */
1105: public void updateObject(int column, Object value)
1106: throws SQLException {
1107: throw new UnsupportedOperationException();
1108: }
1109:
1110: /**
1111: * Updating an object column in the row.
1112: */
1113: public void updateObject(String column, Object value, int scale)
1114: throws SQLException {
1115: throw new UnsupportedOperationException();
1116: }
1117:
1118: /**
1119: * Updating an object column in the row.
1120: */
1121: public void updateObject(int column, Object value, int scale)
1122: throws SQLException {
1123: throw new UnsupportedOperationException();
1124: }
1125:
1126: /**
1127: * Updating a timestamp column in the row.
1128: */
1129: public void updateTimestamp(String column, Timestamp timestamp)
1130: throws SQLException {
1131: throw new UnsupportedOperationException();
1132: }
1133:
1134: /**
1135: * Updating a timestamp column in the row.
1136: */
1137: public void updateTimestamp(int column, Timestamp timestamp)
1138: throws SQLException {
1139: throw new UnsupportedOperationException();
1140: }
1141:
1142: /**
1143: * Updating a time column in the row.
1144: */
1145: public void updateTime(String column, Time time)
1146: throws SQLException {
1147: throw new UnsupportedOperationException();
1148: }
1149:
1150: /**
1151: * Updating a time column in the row.
1152: */
1153: public void updateTime(int column, Time time) throws SQLException {
1154: throw new UnsupportedOperationException();
1155: }
1156:
1157: /**
1158: * Updating a date column in the row.
1159: */
1160: public void updateDate(String column, java.sql.Date date)
1161: throws SQLException {
1162: throw new UnsupportedOperationException();
1163: }
1164:
1165: /**
1166: * Updating a date column in the row.
1167: */
1168: public void updateDate(int column, java.sql.Date date)
1169: throws SQLException {
1170: throw new UnsupportedOperationException();
1171: }
1172:
1173: /**
1174: * Updating a clob column in the row.
1175: */
1176: public void updateClob(String column, Clob clob)
1177: throws SQLException {
1178: throw new UnsupportedOperationException();
1179: }
1180:
1181: /**
1182: * Updating a clob column in the row.
1183: */
1184: public void updateClob(int column, Clob clob) throws SQLException {
1185: throw new UnsupportedOperationException();
1186: }
1187:
1188: /**
1189: * Updating a blob column in the row.
1190: */
1191: public void updateBlob(String column, Blob blob)
1192: throws SQLException {
1193: throw new UnsupportedOperationException();
1194: }
1195:
1196: /**
1197: * Updating a blob column in the row.
1198: */
1199: public void updateBlob(int column, Blob blob) throws SQLException {
1200: throw new UnsupportedOperationException();
1201: }
1202:
1203: /**
1204: * Updating an array column in the row.
1205: */
1206: public void updateArray(String column, Array array)
1207: throws SQLException {
1208: throw new UnsupportedOperationException();
1209: }
1210:
1211: /**
1212: * Updating an array column in the row.
1213: */
1214: public void updateArray(int column, Array array)
1215: throws SQLException {
1216: throw new UnsupportedOperationException();
1217: }
1218:
1219: /**
1220: * Updating a big decimal column in the row.
1221: */
1222: public void updateBigDecimal(String column, BigDecimal decimal)
1223: throws SQLException {
1224: throw new UnsupportedOperationException();
1225: }
1226:
1227: /**
1228: * Updating a big decimal column in the row.
1229: */
1230: public void updateBigDecimal(int column, BigDecimal decimal)
1231: throws SQLException {
1232: throw new UnsupportedOperationException();
1233: }
1234:
1235: /**
1236: * Updating a ref column in the row.
1237: */
1238: public void updateRef(String column, Ref ref) throws SQLException {
1239: throw new UnsupportedOperationException();
1240: }
1241:
1242: /**
1243: * Updating a ref column in the row.
1244: */
1245: public void updateRef(int column, Ref ref) throws SQLException {
1246: throw new UnsupportedOperationException();
1247: }
1248:
1249: /**
1250: * Updating a character stream.
1251: */
1252: public void updateCharacterStream(String column, Reader x,
1253: int length) throws SQLException {
1254: throw new UnsupportedOperationException();
1255: }
1256:
1257: /**
1258: * Updating a character stream.
1259: */
1260: public void updateCharacterStream(int column, Reader x, int length)
1261: throws SQLException {
1262: throw new UnsupportedOperationException();
1263: }
1264:
1265: /**
1266: * Updating a binary stream.
1267: */
1268: public void updateBinaryStream(String column, InputStream x,
1269: int length) throws SQLException {
1270: throw new UnsupportedOperationException();
1271: }
1272:
1273: /**
1274: * Updating a binary stream.
1275: */
1276: public void updateBinaryStream(int column, InputStream x, int length)
1277: throws SQLException {
1278: throw new UnsupportedOperationException();
1279: }
1280:
1281: /**
1282: * Updating an ascii stream.
1283: */
1284: public void updateAsciiStream(String column, InputStream x,
1285: int length) throws SQLException {
1286: throw new UnsupportedOperationException();
1287: }
1288:
1289: /**
1290: * Updating an ascii stream.
1291: */
1292: public void updateAsciiStream(int column, InputStream x, int length)
1293: throws SQLException {
1294: throw new UnsupportedOperationException();
1295: }
1296:
1297: /**
1298: * Updating a unicode stream.
1299: */
1300: public void updateUnicodeStream(String column, InputStream x,
1301: int length) throws SQLException {
1302: throw new UnsupportedOperationException();
1303: }
1304:
1305: /**
1306: * Updating a unicode stream.
1307: */
1308: public void updateUnicodeStream(int column, InputStream x,
1309: int length) throws SQLException {
1310: throw new UnsupportedOperationException();
1311: }
1312:
1313: /**
1314: * Updating bytes.
1315: */
1316: public void updateBytes(String column, byte[] value)
1317: throws SQLException {
1318: throw new UnsupportedOperationException();
1319: }
1320:
1321: /**
1322: * Updating bytes.
1323: */
1324: public void updateBytes(int column, byte[] value)
1325: throws SQLException {
1326: throw new UnsupportedOperationException();
1327: }
1328:
1329: /**
1330: * Updating boolean.
1331: */
1332: public void updateBoolean(String column, boolean value)
1333: throws SQLException {
1334: throw new UnsupportedOperationException();
1335: }
1336:
1337: /**
1338: * Updating boolean.
1339: */
1340: public void updateBoolean(int column, boolean value)
1341: throws SQLException {
1342: throw new UnsupportedOperationException();
1343: }
1344:
1345: /**
1346: * Updating byte.
1347: */
1348: public void updateByte(String column, byte value)
1349: throws SQLException {
1350: throw new UnsupportedOperationException();
1351: }
1352:
1353: /**
1354: * Updating byte.
1355: */
1356: public void updateByte(int column, byte value) throws SQLException {
1357: throw new UnsupportedOperationException();
1358: }
1359:
1360: /**
1361: * Updating short.
1362: */
1363: public void updateShort(String column, short value)
1364: throws SQLException {
1365: throw new UnsupportedOperationException();
1366: }
1367:
1368: /**
1369: * Updating short.
1370: */
1371: public void updateShort(int column, short value)
1372: throws SQLException {
1373: throw new UnsupportedOperationException();
1374: }
1375:
1376: /**
1377: * Updating int.
1378: */
1379: public void updateInt(String column, int value) throws SQLException {
1380: throw new UnsupportedOperationException();
1381: }
1382:
1383: /**
1384: * Updating int.
1385: */
1386: public void updateInt(int column, int value) throws SQLException {
1387: throw new UnsupportedOperationException();
1388: }
1389:
1390: /**
1391: * Updating long.
1392: */
1393: public void updateLong(String column, long value)
1394: throws SQLException {
1395: throw new UnsupportedOperationException();
1396: }
1397:
1398: /**
1399: * Updating long.
1400: */
1401: public void updateLong(int column, long value) throws SQLException {
1402: throw new UnsupportedOperationException();
1403: }
1404:
1405: /**
1406: * Updating float.
1407: */
1408: public void updateFloat(String column, float value)
1409: throws SQLException {
1410: throw new UnsupportedOperationException();
1411: }
1412:
1413: /**
1414: * Updating float.
1415: */
1416: public void updateFloat(int column, float value)
1417: throws SQLException {
1418: throw new UnsupportedOperationException();
1419: }
1420:
1421: /**
1422: * Updating double.
1423: */
1424: public void updateDouble(String column, double value)
1425: throws SQLException {
1426: throw new UnsupportedOperationException();
1427: }
1428:
1429: /**
1430: * Updating double.
1431: */
1432: public void updateDouble(int column, double value)
1433: throws SQLException {
1434: throw new UnsupportedOperationException();
1435: }
1436:
1437: /**
1438: * Updating null.
1439: */
1440: public void updateNull(String column) throws SQLException {
1441: throw new UnsupportedOperationException();
1442: }
1443:
1444: /**
1445: * Updating null.
1446: */
1447: public void updateNull(int column) throws SQLException {
1448: throw new UnsupportedOperationException();
1449: }
1450:
1451: /**
1452: * updates the row
1453: */
1454: public void updateRow() throws SQLException {
1455: throw new UnsupportedOperationException();
1456: }
1457:
1458: /**
1459: * cancels the row updates.
1460: */
1461: public void cancelRowUpdates() throws SQLException {
1462: throw new UnsupportedOperationException();
1463: }
1464:
1465: /**
1466: * refreshes the row
1467: */
1468: public void refreshRow() throws SQLException {
1469: throw new UnsupportedOperationException();
1470: }
1471:
1472: /**
1473: * move to the current row
1474: */
1475: public void moveToCurrentRow() throws SQLException {
1476: throw new UnsupportedOperationException();
1477: }
1478:
1479: /**
1480: * Updating
1481: */
1482: public boolean rowUpdated() throws SQLException {
1483: throw new UnsupportedOperationException();
1484: }
1485:
1486: /**
1487: * True if the row was inserted.
1488: */
1489: public boolean rowInserted() throws SQLException {
1490: throw new UnsupportedOperationException();
1491: }
1492:
1493: /**
1494: * move to insert the row
1495: */
1496: public void moveToInsertRow() throws SQLException {
1497: throw new UnsupportedOperationException();
1498: }
1499:
1500: /**
1501: * insert the row
1502: */
1503: public void insertRow() throws SQLException {
1504: throw new UnsupportedOperationException();
1505: }
1506:
1507: /**
1508: * True if the row was deleted.
1509: */
1510: public boolean rowDeleted() throws SQLException {
1511: throw new UnsupportedOperationException();
1512: }
1513:
1514: /**
1515: * delete the row
1516: */
1517: public void deleteRow() throws SQLException {
1518: throw new UnsupportedOperationException();
1519: }
1520:
1521: public int getNumberOfLoadingColumns() {
1522: return _numberOfLoadingColumns;
1523: }
1524:
1525: private int getColumn(String name) {
1526: throw new UnsupportedOperationException();
1527: }
1528:
1529: private int getColumn(int index) {
1530: return index;
1531: }
1532:
1533: public void close() {
1534: ResultSet rs = _rs;
1535: _rs = null;
1536:
1537: if (rs != null) {
1538: try {
1539: rs.close();
1540: } catch (SQLException e) {
1541: log.log(Level.FINE, e.toString(), e);
1542: }
1543: }
1544: }
1545:
1546: public RowId getRowId(int columnIndex) throws SQLException {
1547: throw new UnsupportedOperationException("Not supported yet.");
1548: }
1549:
1550: public RowId getRowId(String columnLabel) throws SQLException {
1551: throw new UnsupportedOperationException("Not supported yet.");
1552: }
1553:
1554: public void updateRowId(int columnIndex, RowId x)
1555: throws SQLException {
1556: throw new UnsupportedOperationException("Not supported yet.");
1557: }
1558:
1559: public void updateRowId(String columnLabel, RowId x)
1560: throws SQLException {
1561: throw new UnsupportedOperationException("Not supported yet.");
1562: }
1563:
1564: public int getHoldability() throws SQLException {
1565: throw new UnsupportedOperationException("Not supported yet.");
1566: }
1567:
1568: public boolean isClosed() throws SQLException {
1569: throw new UnsupportedOperationException("Not supported yet.");
1570: }
1571:
1572: public void updateNString(int columnIndex, String nString)
1573: throws SQLException {
1574: throw new UnsupportedOperationException("Not supported yet.");
1575: }
1576:
1577: public void updateNString(String columnLabel, String nString)
1578: throws SQLException {
1579: throw new UnsupportedOperationException("Not supported yet.");
1580: }
1581:
1582: public void updateNClob(int columnIndex, NClob nClob)
1583: throws SQLException {
1584: throw new UnsupportedOperationException("Not supported yet.");
1585: }
1586:
1587: public void updateNClob(String columnLabel, NClob nClob)
1588: throws SQLException {
1589: throw new UnsupportedOperationException("Not supported yet.");
1590: }
1591:
1592: public NClob getNClob(int columnIndex) throws SQLException {
1593: throw new UnsupportedOperationException("Not supported yet.");
1594: }
1595:
1596: public NClob getNClob(String columnLabel) throws SQLException {
1597: throw new UnsupportedOperationException("Not supported yet.");
1598: }
1599:
1600: public SQLXML getSQLXML(int columnIndex) throws SQLException {
1601: throw new UnsupportedOperationException("Not supported yet.");
1602: }
1603:
1604: public SQLXML getSQLXML(String columnLabel) throws SQLException {
1605: throw new UnsupportedOperationException("Not supported yet.");
1606: }
1607:
1608: public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1609: throws SQLException {
1610: throw new UnsupportedOperationException("Not supported yet.");
1611: }
1612:
1613: public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1614: throws SQLException {
1615: throw new UnsupportedOperationException("Not supported yet.");
1616: }
1617:
1618: public String getNString(int columnIndex) throws SQLException {
1619: throw new UnsupportedOperationException("Not supported yet.");
1620: }
1621:
1622: public String getNString(String columnLabel) throws SQLException {
1623: throw new UnsupportedOperationException("Not supported yet.");
1624: }
1625:
1626: public Reader getNCharacterStream(int columnIndex)
1627: throws SQLException {
1628: throw new UnsupportedOperationException("Not supported yet.");
1629: }
1630:
1631: public Reader getNCharacterStream(String columnLabel)
1632: throws SQLException {
1633: throw new UnsupportedOperationException("Not supported yet.");
1634: }
1635:
1636: public void updateNCharacterStream(int columnIndex, Reader x,
1637: long length) throws SQLException {
1638: throw new UnsupportedOperationException("Not supported yet.");
1639: }
1640:
1641: public void updateNCharacterStream(String columnLabel,
1642: Reader reader, long length) throws SQLException {
1643: throw new UnsupportedOperationException("Not supported yet.");
1644: }
1645:
1646: public void updateAsciiStream(int columnIndex, InputStream x,
1647: long length) throws SQLException {
1648: throw new UnsupportedOperationException("Not supported yet.");
1649: }
1650:
1651: public void updateBinaryStream(int columnIndex, InputStream x,
1652: long length) throws SQLException {
1653: throw new UnsupportedOperationException("Not supported yet.");
1654: }
1655:
1656: public void updateCharacterStream(int columnIndex, Reader x,
1657: long length) throws SQLException {
1658: throw new UnsupportedOperationException("Not supported yet.");
1659: }
1660:
1661: public void updateAsciiStream(String columnLabel, InputStream x,
1662: long length) throws SQLException {
1663: throw new UnsupportedOperationException("Not supported yet.");
1664: }
1665:
1666: public void updateBinaryStream(String columnLabel, InputStream x,
1667: long length) throws SQLException {
1668: throw new UnsupportedOperationException("Not supported yet.");
1669: }
1670:
1671: public void updateCharacterStream(String columnLabel,
1672: Reader reader, long length) throws SQLException {
1673: throw new UnsupportedOperationException("Not supported yet.");
1674: }
1675:
1676: public void updateBlob(int columnIndex, InputStream inputStream,
1677: long length) throws SQLException {
1678: throw new UnsupportedOperationException("Not supported yet.");
1679: }
1680:
1681: public void updateBlob(String columnLabel, InputStream inputStream,
1682: long length) throws SQLException {
1683: throw new UnsupportedOperationException("Not supported yet.");
1684: }
1685:
1686: public void updateClob(int columnIndex, Reader reader, long length)
1687: throws SQLException {
1688: throw new UnsupportedOperationException("Not supported yet.");
1689: }
1690:
1691: public void updateClob(String columnLabel, Reader reader,
1692: long length) throws SQLException {
1693: throw new UnsupportedOperationException("Not supported yet.");
1694: }
1695:
1696: public void updateNClob(int columnIndex, Reader reader, long length)
1697: throws SQLException {
1698: throw new UnsupportedOperationException("Not supported yet.");
1699: }
1700:
1701: public void updateNClob(String columnLabel, Reader reader,
1702: long length) throws SQLException {
1703: throw new UnsupportedOperationException("Not supported yet.");
1704: }
1705:
1706: public void updateNCharacterStream(int columnIndex, Reader x)
1707: throws SQLException {
1708: throw new UnsupportedOperationException("Not supported yet.");
1709: }
1710:
1711: public void updateNCharacterStream(String columnLabel, Reader reader)
1712: throws SQLException {
1713: throw new UnsupportedOperationException("Not supported yet.");
1714: }
1715:
1716: public void updateAsciiStream(int columnIndex, InputStream x)
1717: throws SQLException {
1718: throw new UnsupportedOperationException("Not supported yet.");
1719: }
1720:
1721: public void updateBinaryStream(int columnIndex, InputStream x)
1722: throws SQLException {
1723: throw new UnsupportedOperationException("Not supported yet.");
1724: }
1725:
1726: public void updateCharacterStream(int columnIndex, Reader x)
1727: throws SQLException {
1728: throw new UnsupportedOperationException("Not supported yet.");
1729: }
1730:
1731: public void updateAsciiStream(String columnLabel, InputStream x)
1732: throws SQLException {
1733: throw new UnsupportedOperationException("Not supported yet.");
1734: }
1735:
1736: public void updateBinaryStream(String columnLabel, InputStream x)
1737: throws SQLException {
1738: throw new UnsupportedOperationException("Not supported yet.");
1739: }
1740:
1741: public void updateCharacterStream(String columnLabel, Reader reader)
1742: throws SQLException {
1743: throw new UnsupportedOperationException("Not supported yet.");
1744: }
1745:
1746: public void updateBlob(int columnIndex, InputStream inputStream)
1747: throws SQLException {
1748: throw new UnsupportedOperationException("Not supported yet.");
1749: }
1750:
1751: public void updateBlob(String columnLabel, InputStream inputStream)
1752: throws SQLException {
1753: throw new UnsupportedOperationException("Not supported yet.");
1754: }
1755:
1756: public void updateClob(int columnIndex, Reader reader)
1757: throws SQLException {
1758: throw new UnsupportedOperationException("Not supported yet.");
1759: }
1760:
1761: public void updateClob(String columnLabel, Reader reader)
1762: throws SQLException {
1763: throw new UnsupportedOperationException("Not supported yet.");
1764: }
1765:
1766: public void updateNClob(int columnIndex, Reader reader)
1767: throws SQLException {
1768: throw new UnsupportedOperationException("Not supported yet.");
1769: }
1770:
1771: public void updateNClob(String columnLabel, Reader reader)
1772: throws SQLException {
1773: throw new UnsupportedOperationException("Not supported yet.");
1774: }
1775:
1776: public <T> T unwrap(Class<T> iface) throws SQLException {
1777: throw new UnsupportedOperationException("Not supported yet.");
1778: }
1779:
1780: public boolean isWrapperFor(Class<?> iface) throws SQLException {
1781: throw new UnsupportedOperationException("Not supported yet.");
1782: }
1783: }
|