001package org.xbib.elasticsearch.river.jdbc.strategy.mock;
002
003import org.xbib.elasticsearch.plugin.jdbc.util.SQLCommand;
004import org.xbib.elasticsearch.river.jdbc.RiverSource;
005import org.xbib.elasticsearch.plugin.jdbc.keyvalue.KeyValueStreamListener;
006
007import java.io.IOException;
008import java.sql.CallableStatement;
009import java.sql.Connection;
010import java.sql.PreparedStatement;
011import java.sql.ResultSet;
012import java.sql.SQLException;
013import java.sql.Statement;
014import java.text.ParseException;
015import java.util.List;
016import java.util.Locale;
017import java.util.Map;
018import java.util.TimeZone;
019
020/**
021 * @author <a href="piotr.sliwa@zineinc.com">Piotr Śliwa</a>
022 */
023public class MockRiverSource implements RiverSource<MockRiverContext> {
024
025    @Override
026    public String strategy() {
027        throw new UnsupportedOperationException("Not supported yet.");
028    }
029
030    @Override
031    public RiverSource<MockRiverContext> newInstance() {
032        return new MockRiverSource();
033    }
034
035    @Override
036    public RiverSource setRiverContext(MockRiverContext context) {
037        throw new UnsupportedOperationException("Not supported yet.");
038    }
039
040    @Override
041    public void beforeFetch() throws Exception {
042    }
043
044    @Override
045    public void afterFetch() throws Exception {
046    }
047
048    @Override
049    public void fetch() throws SQLException, IOException {
050        throw new UnsupportedOperationException("Not supported yet.");
051    }
052
053    @Override
054    public RiverSource setUrl(String url) {
055        throw new UnsupportedOperationException("Not supported yet.");
056    }
057
058    @Override
059    public RiverSource setUser(String user) {
060        throw new UnsupportedOperationException("Not supported yet.");
061    }
062
063    @Override
064    public RiverSource setPassword(String password) {
065        throw new UnsupportedOperationException("Not supported yet.");
066    }
067
068    @Override
069    public Connection getConnectionForReading() throws SQLException {
070        throw new UnsupportedOperationException("Not supported yet.");
071    }
072
073    @Override
074    public Connection getConnectionForWriting() throws SQLException {
075        throw new UnsupportedOperationException("Not supported yet.");
076    }
077
078    @Override
079    public PreparedStatement prepareQuery(String sql) throws SQLException {
080        throw new UnsupportedOperationException("Not supported yet.");
081    }
082
083    @Override
084    public PreparedStatement prepareUpdate(String sql) throws SQLException {
085        throw new UnsupportedOperationException("Not supported yet.");
086    }
087
088    @Override
089    public RiverSource bind(PreparedStatement statement, List<Object> values) throws SQLException {
090        throw new UnsupportedOperationException("Not supported yet.");
091    }
092
093    @Override
094    public RiverSource register(CallableStatement statement, Map<String, Object> values) throws SQLException {
095        throw new UnsupportedOperationException("Not supported yet.");
096    }
097
098    @Override
099    public ResultSet executeQuery(PreparedStatement statement) throws SQLException {
100        throw new UnsupportedOperationException("Not supported yet.");
101    }
102
103    @Override
104    public ResultSet executeQuery(Statement statement, String sql) throws SQLException {
105        throw new UnsupportedOperationException("Not supported yet.");
106    }
107
108    @Override
109    public RiverSource executeUpdate(PreparedStatement statement) throws SQLException {
110        throw new UnsupportedOperationException("Not supported yet.");
111    }
112
113    @Override
114    public RiverSource executeUpdate(Statement statement, String sql) throws SQLException {
115        throw new UnsupportedOperationException("Not supported yet.");
116    }
117
118    @Override
119    public void beforeRows(ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException {
120        throw new UnsupportedOperationException("Not supported yet.");
121    }
122
123    @Override
124    public void beforeRows(SQLCommand command, ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException {
125        throw new UnsupportedOperationException("Not supported yet.");
126    }
127
128    @Override
129    public boolean nextRow(ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException {
130        throw new UnsupportedOperationException("Not supported yet.");
131    }
132
133    @Override
134    public boolean nextRow(SQLCommand command, ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException {
135        throw new UnsupportedOperationException("Not supported yet.");
136    }
137
138    @Override
139    public void afterRows(ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException {
140        throw new UnsupportedOperationException("Not supported yet.");
141    }
142
143    @Override
144    public void afterRows(SQLCommand command, ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException {
145        throw new UnsupportedOperationException("Not supported yet.");
146    }
147
148    @Override
149    public Object parseType(ResultSet result, Integer num, int type, Locale locale) throws SQLException, IOException, ParseException {
150        throw new UnsupportedOperationException("Not supported yet.");
151    }
152
153    @Override
154    public RiverSource close(ResultSet result) throws SQLException {
155        throw new UnsupportedOperationException("Not supported yet.");
156    }
157
158    @Override
159    public RiverSource close(Statement statement) throws SQLException {
160        throw new UnsupportedOperationException("Not supported yet.");
161    }
162
163    @Override
164    public RiverSource closeReading() {
165        throw new UnsupportedOperationException("Not supported yet.");
166    }
167
168    @Override
169    public RiverSource closeWriting() {
170        throw new UnsupportedOperationException("Not supported yet.");
171    }
172
173    @Override
174    public RiverSource setLocale(Locale locale) {
175        return this;
176    }
177
178    @Override
179    public Locale getLocale() {
180        return Locale.ROOT;
181    }
182
183    @Override
184    public RiverSource setTimeZone(TimeZone timezone) {
185        return this;
186    }
187
188    @Override
189    public TimeZone getTimeZone() {
190        return TimeZone.getDefault();
191    }
192
193    @Override
194    public void suspend() throws Exception {
195    }
196
197    @Override
198    public void resume() throws Exception {
199    }
200
201    @Override
202    public void shutdown() throws IOException {
203    }
204
205}