comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 194:1296dbcc4958

Resolved javadoc many errors and warnings, such as: [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java:17: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java:17: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/StartOfHeaderParser.java:23: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/StartOfHeaderParser.java:23: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java:37: error: reference not found [javadoc] * @throws ParseException if an error occurs during parsing [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java:16: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java:16: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLReader.java:40: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLReader.java:40: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLReader.java:84: warning: no @throws for java.io.UnsupportedEncodingException [javadoc] public BufferedMCLReader(InputStream in, String enc) [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLWriter.java:35: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLWriter.java:35: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLWriter.java:59: warning: no @throws for java.io.UnsupportedEncodingException [javadoc] public BufferedMCLWriter(OutputStream in, String enc) [javadoc] ^
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 26 Oct 2017 17:40:05 +0200 (2017-10-26)
parents 4767b005a531
children 89c285fc0a49 e87d89d371f1
comparison
equal deleted inserted replaced
193:982534c83436 194:1296dbcc4958
15 import java.sql.CallableStatement; 15 import java.sql.CallableStatement;
16 import java.sql.Connection; 16 import java.sql.Connection;
17 import java.sql.DatabaseMetaData; 17 import java.sql.DatabaseMetaData;
18 import java.sql.PreparedStatement; 18 import java.sql.PreparedStatement;
19 import java.sql.ResultSet; 19 import java.sql.ResultSet;
20 import java.sql.SQLClientInfoException;
20 import java.sql.SQLException; 21 import java.sql.SQLException;
21 import java.sql.SQLFeatureNotSupportedException; 22 import java.sql.SQLFeatureNotSupportedException;
22 import java.sql.SQLNonTransientConnectionException; 23 import java.sql.SQLNonTransientConnectionException;
23 import java.sql.SQLWarning; 24 import java.sql.SQLWarning;
24 import java.sql.Savepoint; 25 import java.sql.Savepoint;
519 * using this Connection object. 520 * using this Connection object.
520 * 521 *
521 * @return the holdability, one of 522 * @return the holdability, one of
522 * ResultSet.HOLD_CURSORS_OVER_COMMIT or 523 * ResultSet.HOLD_CURSORS_OVER_COMMIT or
523 * ResultSet.CLOSE_CURSORS_AT_COMMIT 524 * ResultSet.CLOSE_CURSORS_AT_COMMIT
524 * @see #setHoldability() 525 * @see #setHoldability(int)
525 */ 526 */
526 @Override 527 @Override
527 public int getHoldability() { 528 public int getHoldability() {
528 // TODO: perhaps it is better to have the server implement 529 // TODO: perhaps it is better to have the server implement
529 // CLOSE_CURSORS_AT_COMMIT 530 // CLOSE_CURSORS_AT_COMMIT
1427 * while setting the clientInfo values on the database server 1428 * while setting the clientInfo values on the database server
1428 * or this method is called on a closed connection 1429 * or this method is called on a closed connection
1429 * @since 1.6 1430 * @since 1.6
1430 */ 1431 */
1431 @Override 1432 @Override
1432 public void setClientInfo(String name, String value) throws java.sql.SQLClientInfoException { 1433 public void setClientInfo(String name, String value) throws SQLClientInfoException {
1433 if (name == null || name.isEmpty()) { 1434 if (name == null || name.isEmpty()) {
1434 addWarning("setClientInfo: missing property name", "01M07"); 1435 addWarning("setClientInfo: missing property name", "01M07");
1435 return; 1436 return;
1436 } 1437 }
1437 // If the value is null, the current value of the specified property is cleared. 1438 // If the value is null, the current value of the specified property is cleared.
1482 * while setting the clientInfo values on the database server 1483 * while setting the clientInfo values on the database server
1483 * or this method is called on a closed connection 1484 * or this method is called on a closed connection
1484 * @since 1.6 1485 * @since 1.6
1485 */ 1486 */
1486 @Override 1487 @Override
1487 public void setClientInfo(Properties props) throws java.sql.SQLClientInfoException { 1488 public void setClientInfo(Properties props) throws SQLClientInfoException {
1488 if (props != null) { 1489 if (props != null) {
1489 for (Entry<Object, Object> entry : props.entrySet()) { 1490 for (Entry<Object, Object> entry : props.entrySet()) {
1490 setClientInfo(entry.getKey().toString(), 1491 setClientInfo(entry.getKey().toString(),
1491 entry.getValue().toString()); 1492 entry.getValue().toString());
1492 } 1493 }
1639 1640
1640 //== end methods of interface java.sql.Connection 1641 //== end methods of interface java.sql.Connection
1641 1642
1642 1643
1643 /** 1644 /**
1644 * Returns the MonetDB JDBC Connection URL (without user name and password). 1645 * @return the MonetDB JDBC Connection URL (without user name and password).
1645 * Defined as public because it is called from: MonetDatabaseMetaData.java getURL() 1646 * Defined as public because it is called from: MonetDatabaseMetaData.java getURL()
1646 */ 1647 */
1647 public String getJDBCURL() { 1648 public String getJDBCURL() {
1648 String language = ""; 1649 String language = "";
1649 if (lang == LANG_MAL) 1650 if (lang == LANG_MAL)
1650 language = "?language=mal"; 1651 language = "?language=mal";
1651 return "jdbc:monetdb://" + hostname + ":" + port + "/" + database + language; 1652 return "jdbc:monetdb://" + hostname + ":" + port + "/" + database + language;
1652 } 1653 }
1653 1654
1654 /** 1655 /**
1655 * Returns whether the JDBC BLOB type should be mapped to VARBINARY type. 1656 * @return whether the JDBC BLOB type should be mapped to VARBINARY type.
1656 * This allows generic JDBC programs to fetch Blob data via getBytes() 1657 * This allows generic JDBC programs to fetch Blob data via getBytes()
1657 * instead of getBlob() and Blob.getBinaryStream() to reduce overhead. 1658 * instead of getBlob() and Blob.getBinaryStream() to reduce overhead.
1658 */ 1659 */
1659 boolean mapBlobAsVarBinary() { 1660 public boolean mapBlobAsVarBinary() {
1660 return treatBlobAsVarBinary; 1661 return treatBlobAsVarBinary;
1661 } 1662 }
1662 1663
1663 /** 1664 /**
1664 * Returns whether the JDBC CLOB type should be mapped to VARCHAR type. 1665 * @return whether the JDBC CLOB type should be mapped to VARCHAR type.
1665 * This allows generic JDBC programs to fetch Clob data via getString() 1666 * This allows generic JDBC programs to fetch Clob data via getString()
1666 * instead of getClob() and Clob.getCharacterStream() to reduce overhead. 1667 * instead of getClob() and Clob.getCharacterStream() to reduce overhead.
1667 */ 1668 */
1668 boolean mapClobAsVarChar() { 1669 public boolean mapClobAsVarChar() {
1669 return treatClobAsVarChar; 1670 return treatClobAsVarChar;
1670 } 1671 }
1671 1672
1672 /** 1673 /**
1673 * Sends the given string to MonetDB as special transaction command. 1674 * Sends the given string to MonetDB as special transaction command.