Changeset: bd05e362bc4c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd05e362bc4c
Modified Files:
java/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetDataSource.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetSavepoint.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetWrapper.java
java/src/main/java/nl/cwi/monetdb/jdbc/types/INET.java
java/src/main/java/nl/cwi/monetdb/jdbc/types/URL.java
java/src/main/java/nl/cwi/monetdb/mcl/MCLException.java
java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLReader.java
java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLWriter.java
java/src/main/java/nl/cwi/monetdb/mcl/net/MapiSocket.java
java/src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java
java/src/main/java/nl/cwi/monetdb/mcl/parser/MCLParseException.java
java/src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java
Branch: Jul2015
Log Message:
Add a few missing annotations and serial ids
diffs (truncated from 4945 to 300 lines):
diff --git a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java
b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java
--- a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java
+++ b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java
@@ -54,6 +54,7 @@ public class MonetBlob implements Blob {
* @throws SQLFeatureNotSupportedException - if the JDBC driver does
* not support this method
*/
+ @Override
public void free() throws SQLException {
buf = null;
}
@@ -67,6 +68,7 @@ public class MonetBlob implements Blob {
* @throws SQLFeatureNotSupportedException if the JDBC driver does
* not support this method
*/
+ @Override
public InputStream getBinaryStream() throws SQLException {
if (buf == null)
throw new SQLException("This Blob object has been
freed", "M1M20");
@@ -90,6 +92,7 @@ public class MonetBlob implements Blob {
* @throws SQLFeatureNotSupportedException if the JDBC driver does
* not support this method
*/
+ @Override
public InputStream getBinaryStream(long pos, long length)
throws SQLException
{
@@ -118,6 +121,7 @@ public class MonetBlob implements Blob {
* @throws SQLException if there is an error accessing the
* BLOB value
*/
+ @Override
public byte[] getBytes(long pos, int length) throws SQLException {
if (buf == null)
throw new SQLException("This Blob object has been
freed", "M1M20");
@@ -136,6 +140,7 @@ public class MonetBlob implements Blob {
* @throws SQLException if there is an error accessing the length
* of the BLOB value
*/
+ @Override
public long length() throws SQLException {
if (buf == null)
throw new SQLException("This Blob object has been
freed", "M1M20");
@@ -155,6 +160,7 @@ public class MonetBlob implements Blob {
* @throws SQLException if there is an error accessing the
* BLOB value
*/
+ @Override
public long position(Blob pattern, long start) throws SQLException {
return position(pattern.getBytes(1L, (int)pattern.length()),
start);
}
@@ -171,6 +177,7 @@ public class MonetBlob implements Blob {
* @throws SQLException if there is an error accessing the
* BLOB value
*/
+ @Override
public long position(byte[] pattern, long start) throws SQLException {
if (buf == null)
throw new SQLException("This Blob object has been
freed", "M1M20");
@@ -208,6 +215,7 @@ public class MonetBlob implements Blob {
* @throws SQLFeatureNotSupportedException if the JDBC driver does
* not support this method
*/
+ @Override
public OutputStream setBinaryStream(long pos) throws SQLException {
if (buf == null)
throw new SQLException("This Blob object has been
freed", "M1M20");
@@ -229,6 +237,7 @@ public class MonetBlob implements Blob {
* @throws SQLException if there is an error accessing the
* BLOB value
*/
+ @Override
public int setBytes(long pos, byte[] bytes) throws SQLException {
return setBytes(pos, bytes, 1, bytes.length);
}
@@ -251,6 +260,7 @@ public class MonetBlob implements Blob {
* @throws SQLException if there is an error accessing the
* BLOB value
*/
+ @Override
public int setBytes(long pos, byte[] bytes, int offset, int len)
throws SQLException
{
@@ -275,6 +285,7 @@ public class MonetBlob implements Blob {
* @throws SQLException if there is an error accessing the
* BLOB value
*/
+ @Override
public void truncate(long len) throws SQLException {
if (buf == null)
throw new SQLException("This Blob object has been
freed", "M1M20");
diff --git a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java
b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java
--- a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java
+++ b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java
@@ -42,6 +42,7 @@ public class MonetClob implements Clob {
* called multiple times, the subsequent calls to free are treated
* as a no-op.
*/
+ @Override
public void free() {
buf = null;
}
@@ -54,6 +55,7 @@ public class MonetClob implements Clob {
* @throws SQLFeatureNotSupportedException this JDBC driver does
* not support this method
*/
+ @Override
public InputStream getAsciiStream() throws SQLException {
throw new SQLFeatureNotSupportedException("Operation
getAsciiStream() currently not supported", "0A000");
}
@@ -66,6 +68,7 @@ public class MonetClob implements Clob {
* @throws SQLFeatureNotSupportedException this JDBC driver does
* not support this method
*/
+ @Override
public Reader getCharacterStream() throws SQLException {
throw new SQLFeatureNotSupportedException("Operation
getCharacterStream() currently not supported", "0A000");
}
@@ -84,6 +87,7 @@ public class MonetClob implements Clob {
* @throws SQLFeatureNotSupportedException this JDBC driver does
* not support this method
*/
+ @Override
public Reader getCharacterStream(long pos, long length) throws
SQLException {
throw new SQLFeatureNotSupportedException("Operation
getCharacterStream(long, long) currently not supported", "0A000");
}
@@ -101,6 +105,7 @@ public class MonetClob implements Clob {
* @throws SQLException if there is an error accessing the
* CLOB value
*/
+ @Override
public String getSubString(long pos, int length) throws SQLException {
if (buf == null)
throw new SQLException("This Clob has been freed",
"M1M20");
@@ -119,6 +124,7 @@ public class MonetClob implements Clob {
* @throws SQLException if there is an error accessing the length
* of the CLOB value
*/
+ @Override
public long length() throws SQLException {
if (buf == null)
throw new SQLException("This Clob has been freed",
"M1M20");
@@ -138,6 +144,7 @@ public class MonetClob implements Clob {
* @throws SQLException if there is an error accessing the
* CLOB value
*/
+ @Override
public long position(Clob searchstr, long start) throws SQLException {
return position(searchstr.getSubString(1L,
(int)(searchstr.length())), start);
}
@@ -155,18 +162,21 @@ public class MonetClob implements Clob {
* @throws SQLException if there is an error accessing the
* CLOB value
*/
+ @Override
public long position(String searchstr, long start) throws SQLException {
if (buf == null)
throw new SQLException("This Clob has been freed",
"M1M20");
return (long)(buf.indexOf(searchstr, (int)(start - 1)));
}
+ @Override
public OutputStream setAsciiStream(long pos) throws SQLException {
if (buf == null)
throw new SQLException("This Clob has been freed",
"M1M20");
throw new SQLException("Operation setAsciiStream(long pos)
currently not supported", "0A000");
}
+ @Override
public Writer setCharacterStream(long pos) throws SQLException {
if (buf == null)
throw new SQLException("This Clob has been freed",
"M1M20");
@@ -185,6 +195,7 @@ public class MonetClob implements Clob {
* @throws SQLException if there is an error accessing the
* CLOB value
*/
+ @Override
public int setString(long pos, String str) throws SQLException {
return setString(pos, str, 1, str.length());
}
@@ -204,6 +215,7 @@ public class MonetClob implements Clob {
* @throws SQLException if there is an error accessing the
* CLOB value
*/
+ @Override
public int setString(long pos, String str, int offset, int len)
throws SQLException
{
@@ -230,6 +242,7 @@ public class MonetClob implements Clob {
* @throws SQLException if there is an error accessing the
* CLOB value
*/
+ @Override
public void truncate(long len) throws SQLException {
if (buf == null)
throw new SQLException("This Clob has been freed",
"M1M20");
@@ -243,6 +256,7 @@ public class MonetClob implements Clob {
*
* @return the String this Clob wraps.
*/
+ @Override
public String toString() {
if (buf == null)
return "<a freed MonetClob instance>";
diff --git a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java
b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java
--- a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java
+++ b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java
@@ -107,7 +107,12 @@ public class MonetConnection extends Mon
private SQLWarning warnings = null;
/** The Connection specific mapping of user defined types to Java
* types */
- private Map<String,Class<?>> typeMap = new HashMap<String,Class<?>>() {{
+ private Map<String,Class<?>> typeMap = new HashMap<String,Class<?>>()
{/**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ {
put("inet", INET.class);
put("url", URL.class);
}};
@@ -304,6 +309,7 @@ public class MonetConnection extends Mon
* call to this method, the method getWarnings returns null until a
* new warning is reported for this Connection object.
*/
+ @Override
public void clearWarnings() {
warnings = null;
}
@@ -317,6 +323,7 @@ public class MonetConnection extends Mon
* Calling the method close on a Connection object that is already
* closed is a no-op.
*/
+ @Override
public void close() {
synchronized (server) {
for (Statement st : statements.keySet()) {
@@ -348,6 +355,7 @@ public class MonetConnection extends Mon
* Connection object is in auto-commit mode
* @see #setAutoCommit(boolean)
*/
+ @Override
public void commit() throws SQLException {
// note: can't use sendIndependentCommand here because we need
// to process the auto_commit state the server gives
@@ -398,6 +406,7 @@ public class MonetConnection extends Mon
* @throws SQLFeatureNotSupportedException the JDBC driver does
* not support this data type
*/
+ @Override
public Array createArrayOf(String typeName, Object[] elements)
throws SQLException
{
@@ -418,6 +427,7 @@ public class MonetConnection extends Mon
* @return a new default Statement object
* @throws SQLException if a database access error occurs
*/
+ @Override
public Statement createStatement() throws SQLException {
return createStatement(
ResultSet.TYPE_FORWARD_ONLY,
@@ -440,6 +450,7 @@ public class MonetConnection extends Mon
* the given type and concurrency
* @throws SQLException if a database access error occurs
*/
+ @Override
public Statement createStatement(
int resultSetType,
int resultSetConcurrency)
@@ -474,6 +485,7 @@ public class MonetConnection extends Mon
* given parameters are not ResultSet constants indicating type,
* concurrency, and holdability
*/
+ @Override
public Statement createStatement(
int resultSetType,
int resultSetConcurrency,
@@ -508,6 +520,7 @@ public class MonetConnection extends Mon
* @throws SQLFeatureNotSupportedException the JDBC driver does
* not support MonetClob objects that can be filled in
*/
+ @Override
public Clob createClob() throws SQLException {
throw new SQLFeatureNotSupportedException("createClob() not
supported", "0A000");
}
@@ -522,6 +535,7 @@ public class MonetConnection extends Mon
* @throws SQLFeatureNotSupportedException the JDBC driver does
* not support MonetBlob objects that can be filled in
*/
+ @Override
public Blob createBlob() throws SQLException {
throw new SQLFeatureNotSupportedException("createBlob() not
supported", "0A000");
}
@@ -536,6 +550,7 @@ public class MonetConnection extends Mon
* @throws SQLFeatureNotSupportedException the JDBC driver does
* not support MonetClob objects that can be filled in
*/
+ @Override
public NClob createNClob() throws SQLException {
throw new SQLFeatureNotSupportedException("createNClob() not
supported", "0A000");
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list