changeset 554:9fa67487f38a onclient

Doc comment fixes
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Thu, 16 Sep 2021 10:30:14 +0200 (2021-09-16)
parents 50b15ee1cb5e
children 90c346571eb4
files src/main/java/org/monetdb/jdbc/MonetCallableStatement.java src/main/java/org/monetdb/jdbc/MonetConnection.java src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java src/main/java/org/monetdb/jdbc/MonetResultSet.java src/main/java/org/monetdb/mcl/net/MapiSocket.java src/main/java/org/monetdb/util/SQLExporter.java
diffstat 6 files changed, 9 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/monetdb/jdbc/MonetCallableStatement.java
+++ b/src/main/java/org/monetdb/jdbc/MonetCallableStatement.java
@@ -77,7 +77,7 @@ public class MonetCallableStatement
 	 * which deals with most of the required stuff of this class.
 	 *
 	 * @param connection the connection that created this Statement
-	 * @param resultSetType type of {@link ResultSet} to produce
+	 * @param resultSetType type of {@link java.sql.ResultSet} to produce
 	 * @param resultSetConcurrency concurrency of ResultSet to produce
 	 * @param callQuery - an SQL CALL statement that may contain one or more '?' parameter placeholders.
 	 *	Typically this statement is specified using JDBC call escape syntax:
--- a/src/main/java/org/monetdb/jdbc/MonetConnection.java
+++ b/src/main/java/org/monetdb/jdbc/MonetConnection.java
@@ -3333,8 +3333,7 @@ public class MonetConnection
 		 * This method can only be sent if no data has been sent to the server
 		 * yet. After data has been sent, you can still throw an
 		 * {@link IOException} but this will terminate the connection.
-		 * @param errorMessage
-		 * @throws IOException
+		 * @param errorMessage error message to send
 		 */
 		public void sendError(String errorMessage) throws IOException {
 			if (error != null) {
@@ -3346,7 +3345,6 @@ public class MonetConnection
 		/**
 		 * After every {@code chunkSize} bytes, the server gets the opportunity to
 		 * terminate the upload.
-		 * @param chunkSize
 		 */
 		public void setChunkSize(int chunkSize) {
 			this.customChunkSize = chunkSize;
@@ -3356,8 +3354,6 @@ public class MonetConnection
 		 * Get a {@link PrintStream} to write data to.
 		 *
 		 * For text mode uploads, the data MUST be validly UTF-8 encoded.
-		 * @return
-		 * @throws IOException
 		 */
 		public PrintStream getStream() throws IOException {
 			if (error != null) {
@@ -3376,16 +3372,14 @@ public class MonetConnection
 		}
 
 		/**
-		 * Returns true if data or an error has been sent.
-		 * @return
+		 * @return true if data or an error has been sent.
 		 */
 		public boolean hasBeenUsed() {
 			return print != null || error != null;
 		}
 
 		/**
-		 * Get the error that was sent, if any
-		 * @return
+		 * @return the error that was sent, if any
 		 */
 		public String getError() {
 			return error;
@@ -3395,8 +3389,6 @@ public class MonetConnection
 		 * Read from the given input stream and write it to the server.
 		 * 
 		 * For text mode uploads, the data MUST be validly UTF-8 encoded.
-		 * @param inputStream
-		 * @throws IOException
 		 */
 		public void uploadFrom(InputStream inputStream) throws IOException {
 			OutputStream s = getStream();
@@ -3415,7 +3407,6 @@ public class MonetConnection
 		 * @param reader reader to read from
 		 * @param linesToSkip start uploading at line {@code offset}. Value 0 and 1
 		 * both mean upload the whole file, value 2 means skip the first line, etc.q
-		 * @throws IOException
 		 */
 		public void uploadFrom(BufferedReader reader, long linesToSkip) throws IOException {
 			for (int i = 0; i < linesToSkip; i++) {
@@ -3432,7 +3423,6 @@ public class MonetConnection
 		/**
 		 * Read data from the given buffered reader and send it to the server
 		 * @param reader reader to read from
-		 * @throws IOException
 		 */
 		public void uploadFrom(Reader reader) throws IOException {
 			OutputStream s = getStream();
@@ -3481,8 +3471,6 @@ public class MonetConnection
 		 * 
 		 * Note: as of MonetDB version Jul2021 the server always terminates the connection
 		 * when this error is used.  This will probably change in the future.
-		 * @param errorMessage
-		 * @throws IOException
 		 */
 		public void sendError(String errorMessage) throws IOException {
 			if (error != null) {
@@ -3495,8 +3483,6 @@ public class MonetConnection
 		 * Get an {@link InputStream} to read data from.
 		 * 
 		 * Textual data is UTF-8 encoded.
-		 * @return
-		 * @throws IOException
 		 */
 		public InputStream getStream() throws IOException {
 			if (error != null) {
@@ -3511,8 +3497,6 @@ public class MonetConnection
 
 		/**
 		 * Write the data from the server to the given {@link OutputStream}.
-		 * @param stream
-		 * @throws IOException
 		 */
 		public void downloadTo(OutputStream stream) throws IOException {
 			InputStream s = getStream();
@@ -3526,8 +3510,7 @@ public class MonetConnection
 		}
 
 		/**
-		 * Returns true if data has been received or an error has been sent.
-		 * @return
+		 * @return  true if data has been received or an error has been sent.
 		 */
 
 		public boolean hasBeenUsed() {
@@ -3535,8 +3518,7 @@ public class MonetConnection
 		}
 
 		/**
-		 * Get the error that was sent, if any
-		 * @return
+		 * @return the error that was sent, if any
 		 */
 
 		public String getError() {
--- a/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java
+++ b/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java
@@ -720,7 +720,7 @@ public class MonetPreparedStatement
 			/**
 			 * Gets the designated column's name
 			 *
-			 * @param column the first column is 1, the second is 2, ...
+			 * @param colnr column number, the first column is 1, the second is 2, ...
 			 * @return the column name
 			 * @throws SQLException if there is no such column
 			 */
--- a/src/main/java/org/monetdb/jdbc/MonetResultSet.java
+++ b/src/main/java/org/monetdb/jdbc/MonetResultSet.java
@@ -1267,7 +1267,7 @@ public class MonetResultSet
 
 			/**
 			 * A private utility method to check validity of column index number
-			 * @throws an SQLDataException when invalid column index number
+			 * @throws SQLDataException when invalid column index number
 			 */
 			private final void checkColumnIndexValidity(final int column) throws SQLDataException {
 				if (column < 1 || column > columns.length)
@@ -2717,7 +2717,7 @@ public class MonetResultSet
 	 * The dates are parsed with the given Calendar.
 	 *
 	 * @param cal the Calendar to use/fill when parsing the date/time
-	 * @param col the column to parse
+	 * @param columnIndex the column to parse
 	 * @param type the corresponding java.sql.Types type of the calling function
 	 * @return the fractional seconds (nanos) or -1 if the value is NULL
 	 * @throws SQLException if a database error occurs
--- a/src/main/java/org/monetdb/mcl/net/MapiSocket.java
+++ b/src/main/java/org/monetdb/mcl/net/MapiSocket.java
@@ -1193,7 +1193,6 @@ public class MapiSocket {	/* cannot (yet
 	 * Return a DownloadStream for use with for example COPY INTO filename ON CLIENT
 	 *
 	 * Building block for {@link org.monetdb.jdbc.MonetConnection.DownloadHandler}.
-	 * @return
 	 */
 	public DownloadStream downloadStream() {
 		return new DownloadStream(fromMonet.getRaw(), toMonet);
--- a/src/main/java/org/monetdb/util/SQLExporter.java
+++ b/src/main/java/org/monetdb/util/SQLExporter.java
@@ -427,7 +427,6 @@ public final class SQLExporter extends E
 	 * format.
 	 *
 	 * @param rs the ResultSet to convert into INSERT INTO statements
-	 * @param absolute if true, dumps table name prepended with schema name
 	 * @throws SQLException if a database related error occurs
 	 */
 	private void resultSetToSQL(final ResultSet rs)