package org.littlestar.propsjdbc;
import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.NClob;
import java.sql.Ref;
import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Statement;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
public class ResultSetImpl implements java.sql.ResultSet {
final Properties props;
Iterator<Entry<Object, Object>> iterator;
Entry<Object, Object> row;
public ResultSetImpl(Properties props) {
this.props = props;
iterator = props.entrySet().iterator();
}
@Override
public boolean next() throws SQLException {
boolean next = iterator.hasNext();
if (next) {
row = iterator.next();
}
return next;
}
@Override
public String getString(int columnIndex) throws SQLException {
if (row == null) {
return null;
}
if (columnIndex == 1) {
return row.getKey().toString();
} else if (columnIndex == 2) {
return row.getValue().toString();
} else {
return null;
}
}
@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
try {
return iface.cast(this);
} catch (ClassCastException cce) {
throw new SQLException("Common.UnableToUnwrap");
}
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
return iface.isInstance(this);
}
@Override
public void close() throws SQLException {}
@Override
public boolean wasNull() throws SQLException {
return false;
}
@Override
public boolean getBoolean(int columnIndex) throws SQLException {
return false;
}
@Override
public byte getByte(int columnIndex) throws SQLException {
return 0;
}
@Override
public short getShort(int columnIndex) throws SQLException {
return 0;
}
@Override
public int getInt(int columnIndex) throws SQLException {
return 0;
}
@Override
public long getLong(int columnIndex) throws SQLException {
return 0;
}
@Override
public float getFloat(int columnIndex) throws SQLException {
return 0;
}
@Override
public double getDouble(int columnIndex) throws SQLException {
return 0;
}
@Override
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
return null;
}
@Override
public byte[] getBytes(int columnIndex) throws SQLException {
return null;
}
@Override
public Date getDate(int columnIndex) throws SQLException {
return null;
}
@Override
public Time getTime(int columnIndex) throws SQLException {
return null;
}
@Override
public Timestamp getTimestamp(int columnIndex) throws SQLException {
return null;
}
@Override
public InputStream getAsciiStream(int columnIndex) throws SQLException {
return null;
}
@Override
public InputStream getUnicodeStream(int columnIndex) throws SQLException {
return null;
}
@Override
public InputStream getBinaryStream(int columnIndex) throws SQLException {
return null;
}
@Override
public String getString(String columnLabel) throws SQLException {
return null;
}
@Override
public boolean getBoolean(String columnLabel) throws SQLException {
return false;
}
@Override
public byte getByte(String columnLabel) throws SQLException {
return 0;
}
@Override
public short getShort(String columnLabel) throws SQLException {
return 0;
}
@Override
public int getInt(String columnLabel) throws SQLException {
return 0;
}
@Override
public long getLong(String columnLabel) throws SQLException {
return 0;
}
@Override
public float getFloat(String columnLabel) throws SQLException {
return 0;
}
@Override
public double getDouble(String columnLabel) throws SQLException {
return 0;
}
@Override
public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException {
return null;
}
@Override
public byte[] getBytes(String columnLabel) throws SQLException {
return null;
}
@Override
public Date getDate(String columnLabel) throws SQLException {
return null;
}
@Override
public Time getTime(String columnLabel) throws SQLException {
return null;
}
@Override
public Timestamp getTimestamp(String columnLabel) throws SQLException {
return null;
}
@Override
public InputStream getAsciiStream(String columnLabel) throws SQLException {
return null;
}
@Override
public InputStream getUnicodeStream(String columnLabel) throws SQLException {
return null;
}
@Override
public InputStream getBinaryStream(String columnLabel) throws SQLException {
return null;
}
@Override
public SQLWarning getWarnings() throws SQLException {
return null;
}
@Override
public void clearWarnings() throws SQLException {
}
@Override
public String getCursorName() throws SQLException {
return null;
}
@Override
public ResultSetMetaData getMetaData() throws SQLException {
return null;
}
@Override
public Object getObject(int columnIndex) throws SQLException {
return null;
}
@Override
public Object getObject(String columnLabel) throws SQLException {
return null;
}
@Override
public int findColumn(String columnLabel) throws SQLException {
return 0;
}
@Override
public Reader getCharacterStream(int columnIndex) throws SQLException {
return null;
}
@Override
public Reader getCharacterStream(String columnLabel) throws SQLException {
return null;
}
@Override
public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
return null;
}
@Override
public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
return null;
}
@Override
public boolean isBeforeFirst() throws SQLException {
return false;
}
@Override
public boolean isAfterLast() throws SQLException {
return false;
}
@Override
public boolean isFirst() throws SQLException {
return false;
}
@Override
public boolean isLast() throws SQLException {
return false;
}
@Override
public void beforeFirst() throws SQLException {
}
@Override
public void afterLast() throws SQLException {
}
@Override
public boolean first() throws SQLException {
return false;
}
@Override
public boolean last() throws SQLException {
return false;
}
@Override
public int getRow() throws SQLException {
return 0;
}
@Override
public boolean absolute(int row) throws SQLException {
return false;
}
@Override
public boolean relative(int rows) throws SQLException {
return false;
}
@Override
public boolean previous() throws SQLException {
return false;
}
@Override
public void setFetchDirection(int direction) throws SQLException {
}
@Override
public int getFetchDirection() throws SQLException {
return 0;
}
@Override
public void setFetchSize(int rows) throws SQLException {
}
@Override
public int getFetchSize() throws SQLException {
return 0;
}
@Override
public int getType() throws SQLException {
return 0;
}
@Override
public int getConcurrency() throws SQLException {
return 0;
}
@Override
public boolean rowUpdated() throws SQLException {
return false;
}
@Override
public boolean rowInserted() throws SQLException {
return false;
}
@Override
public boolean rowDeleted() throws SQLException {
return false;
}
@Override
public void updateNull(int columnIndex) throws SQLException {
}
@Override
public void updateBoolean(int columnIndex, boolean x) throws SQLExce