001: /*
002: * HA-JDBC: High-Availability JDBC
003: * Copyright (c) 2004-2007 Paul Ferraro
004: *
005: * This library is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU Lesser General Public License as published by the
007: * Free Software Foundation; either version 2.1 of the License, or (at your
008: * option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful, but WITHOUT
011: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
012: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
013: * for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public License
016: * along with this library; if not, write to the Free Software Foundation,
017: * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: *
019: * Contact: ferraro@users.sourceforge.net
020: */
021: package net.sf.hajdbc.sql;
022:
023: import java.io.InputStream;
024: import java.io.OutputStream;
025: import java.io.Reader;
026: import java.io.StringReader;
027: import java.io.Writer;
028: import java.sql.Clob;
029: import java.sql.NClob;
030:
031: /**
032: * @author Paul Ferraro
033: *
034: */
035: public class MockClob implements NClob {
036:
037: /**
038: * @see java.sql.Clob#free()
039: */
040: public void free() {
041: }
042:
043: /**
044: * @see java.sql.Clob#getAsciiStream()
045: */
046: public InputStream getAsciiStream() {
047: return null;
048: }
049:
050: /**
051: * @see java.sql.Clob#getCharacterStream()
052: */
053: public Reader getCharacterStream() {
054: return new StringReader(""); //$NON-NLS-1$
055: }
056:
057: /**
058: * @see java.sql.Clob#getCharacterStream(long, long)
059: */
060: public Reader getCharacterStream(long arg0, long arg1) {
061: return new StringReader(""); //$NON-NLS-1$
062: }
063:
064: /**
065: * @see java.sql.Clob#getSubString(long, int)
066: */
067: public String getSubString(long arg0, int arg1) {
068: return null;
069: }
070:
071: /**
072: * @see java.sql.Clob#length()
073: */
074: public long length() {
075: return 0;
076: }
077:
078: /**
079: * @see java.sql.Clob#position(java.lang.String, long)
080: */
081: public long position(String arg0, long arg1) {
082: return 0;
083: }
084:
085: /**
086: * @see java.sql.Clob#position(java.sql.Clob, long)
087: */
088: public long position(Clob arg0, long arg1) {
089: return 0;
090: }
091:
092: /**
093: * @see java.sql.Clob#setAsciiStream(long)
094: */
095: public OutputStream setAsciiStream(long arg0) {
096: return null;
097: }
098:
099: /**
100: * @see java.sql.Clob#setCharacterStream(long)
101: */
102: public Writer setCharacterStream(long arg0) {
103: return null;
104: }
105:
106: /**
107: * @see java.sql.Clob#setString(long, java.lang.String)
108: */
109: public int setString(long arg0, String arg1) {
110: return 0;
111: }
112:
113: /**
114: * @see java.sql.Clob#setString(long, java.lang.String, int, int)
115: */
116: public int setString(long arg0, String arg1, int arg2, int arg3) {
117: return 0;
118: }
119:
120: /**
121: * @see java.sql.Clob#truncate(long)
122: */
123: public void truncate(long arg0) {
124: }
125: }
|