comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 296:c5efd6e661e5

Add "final" keyword to classes, method arguments and local variables where possible.` Improved error messages in MonetSavepoint. Removed two not needed updateNCharacterStream() methods from MonetResultSet.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Wed, 07 Aug 2019 21:12:22 +0200 (2019-08-07)
parents 003ae6d881db
children 8cc3b51d1984
comparison
equal deleted inserted replaced
295:003ae6d881db 296:c5efd6e661e5
1890 * </pre> 1890 * </pre>
1891 * there the first line consists out of<br /> 1891 * there the first line consists out of<br />
1892 * <tt>&amp;"qt" "id" "tc" "cc" "rc"</tt>. 1892 * <tt>&amp;"qt" "id" "tc" "cc" "rc"</tt>.
1893 */ 1893 */
1894 // {{{ ResultSetResponse class implementation 1894 // {{{ ResultSetResponse class implementation
1895 class ResultSetResponse implements Response { 1895 final class ResultSetResponse implements Response {
1896 /** The number of columns in this result */ 1896 /** The number of columns in this result */
1897 public final int columncount; 1897 public final int columncount;
1898 /** The total number of rows this result set has */ 1898 /** The total number of rows this result set has */
1899 public final int tuplecount; 1899 public final int tuplecount;
1900 /** The numbers of rows to retrieve per DataBlockResponse */ 1900 /** The numbers of rows to retrieve per DataBlockResponse */
2317 * synchronously. It is designed to work for one thread retrieving 2317 * synchronously. It is designed to work for one thread retrieving
2318 * rows from it. When multiple threads will retrieve rows from this 2318 * rows from it. When multiple threads will retrieve rows from this
2319 * object, it is possible for threads to get the same data. 2319 * object, it is possible for threads to get the same data.
2320 */ 2320 */
2321 // {{{ DataBlockResponse class implementation 2321 // {{{ DataBlockResponse class implementation
2322 static class DataBlockResponse implements Response { 2322 private final static class DataBlockResponse implements Response {
2323 /** The String array to keep the data in */ 2323 /** The String array to keep the data in */
2324 private final String[] data; 2324 private final String[] data;
2325 2325
2326 /** The counter which keeps the current position in the data array */ 2326 /** The counter which keeps the current position in the data array */
2327 private int pos; 2327 private int pos;
2427 * and a field that contains the last inserted auto-generated ID, or 2427 * and a field that contains the last inserted auto-generated ID, or
2428 * -1 if not applicable.<br /> 2428 * -1 if not applicable.<br />
2429 * <tt>&amp;2 0 -1</tt> 2429 * <tt>&amp;2 0 -1</tt>
2430 */ 2430 */
2431 // {{{ UpdateResponse class implementation 2431 // {{{ UpdateResponse class implementation
2432 static class UpdateResponse implements Response { 2432 final static class UpdateResponse implements Response {
2433 public final int count; 2433 public final int count;
2434 public final String lastid; 2434 public final String lastid;
2435 2435
2436 public UpdateResponse(final int cnt, final String id) { 2436 public UpdateResponse(final int cnt, final String id) {
2437 // fill the blank finals 2437 // fill the blank finals
2500 * The AutoCommitResponse represents a transaction message. It 2500 * The AutoCommitResponse represents a transaction message. It
2501 * stores (a change in) the server side auto commit mode.<br /> 2501 * stores (a change in) the server side auto commit mode.<br />
2502 * <tt>&amp;4 (t|f)</tt> 2502 * <tt>&amp;4 (t|f)</tt>
2503 */ 2503 */
2504 // {{{ AutoCommitResponse class implementation 2504 // {{{ AutoCommitResponse class implementation
2505 class AutoCommitResponse extends SchemaResponse { 2505 private final class AutoCommitResponse extends SchemaResponse {
2506 public final boolean autocommit; 2506 public final boolean autocommit;
2507 2507
2508 public AutoCommitResponse(final boolean ac) { 2508 public AutoCommitResponse(final boolean ac) {
2509 // fill the blank final 2509 // fill the blank final
2510 this.autocommit = ac; 2510 this.autocommit = ac;
2516 * A list of Response objects. Responses are added to this list. 2516 * A list of Response objects. Responses are added to this list.
2517 * Methods of this class are not synchronized. This is left as 2517 * Methods of this class are not synchronized. This is left as
2518 * responsibility to the caller to prevent concurrent access. 2518 * responsibility to the caller to prevent concurrent access.
2519 */ 2519 */
2520 // {{{ ResponseList class implementation 2520 // {{{ ResponseList class implementation
2521 class ResponseList { 2521 final class ResponseList {
2522 /** The cache size (number of rows in a DataBlockResponse object) */ 2522 /** The cache size (number of rows in a DataBlockResponse object) */
2523 private final int cachesize; 2523 private final int cachesize;
2524 /** The maximum number of results for this query */ 2524 /** The maximum number of results for this query */
2525 private final int maxrows; 2525 private final int maxrows;
2526 /** The ResultSet type to produce */ 2526 /** The ResultSet type to produce */