Changeset: 5588b030cc09 for monetdb-java URL: http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=5588b030cc09 Modified Files: src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedConnection.java src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedDatabase.java src/main/java/nl/cwi/monetdb/embedded/QueryResultSet.java src/main/java/nl/cwi/monetdb/embedded/QueryResultSetColumn.java Branch: embedded Log Message:
Fixed compilation issues diffs (97 lines): diff --git a/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedConnection.java b/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedConnection.java --- a/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedConnection.java +++ b/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedConnection.java @@ -223,19 +223,19 @@ public class MonetDBEmbeddedConnection { /** * Shuts down this connection. Any pending queries connections will be immediately closed as well. */ - public void shutdownConnection() { + public void closeConnection() { for(AbstractStatementResult res : this.results) { res.close(); } - this.shutdownConnectionInternal(this.connectionPointer); + this.closeConnectionInternal(this.connectionPointer); this.database.removeConnection(this); } /** * Shuts down this connection asynchronously. Any pending queries connections will be immediately closed as well. */ - public void shutdownConnectionAsync() { - /* CompletableFuture.supplyAsync(() -> this.shutdownConnection()); */ + public void closeConnectionAsync() { + /* CompletableFuture.supplyAsync(() -> this.closeConnection()); */ throw new UnsupportedOperationException("Must wait for Java 8 :("); } @@ -258,5 +258,5 @@ public class MonetDBEmbeddedConnection { /*private native MonetDBTable getMonetDBTableInternal(long connectionPointer, String schemaName, String tableName) throws MonetDBEmbeddedException;*/ - private native void shutdownConnectionInternal(long connectionPointer); + private native void closeConnectionInternal(long connectionPointer); } diff --git a/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedDatabase.java b/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedDatabase.java --- a/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedDatabase.java +++ b/src/main/java/nl/cwi/monetdb/embedded/MonetDBEmbeddedDatabase.java @@ -112,7 +112,7 @@ public class MonetDBEmbeddedDatabase { public void stopDatabase() throws MonetDBEmbeddedException { if(this.isRunning) { for(MonetDBEmbeddedConnection mdbec : connections) { - mdbec.shutdownConnection(); + mdbec.closeConnection(); } this.connections.clear(); this.stopDatabaseInternal(); diff --git a/src/main/java/nl/cwi/monetdb/embedded/QueryResultSet.java b/src/main/java/nl/cwi/monetdb/embedded/QueryResultSet.java --- a/src/main/java/nl/cwi/monetdb/embedded/QueryResultSet.java +++ b/src/main/java/nl/cwi/monetdb/embedded/QueryResultSet.java @@ -24,7 +24,7 @@ public class QueryResultSet extends Abst /** * Pointer to the native result set. * We need to keep it around for getting columns. - * The native result set is kept until the {@link super.close()} is called. + * The native result set is kept until the the close method is called. */ protected long resultPointer; diff --git a/src/main/java/nl/cwi/monetdb/embedded/QueryResultSetColumn.java b/src/main/java/nl/cwi/monetdb/embedded/QueryResultSetColumn.java --- a/src/main/java/nl/cwi/monetdb/embedded/QueryResultSetColumn.java +++ b/src/main/java/nl/cwi/monetdb/embedded/QueryResultSetColumn.java @@ -81,7 +81,7 @@ public class QueryResultSetColumn<T> ext } if(startIndex < this.firstRetrievedIndex) { T[] new_start_batch = this.fetchValuesInternal(this.resultSetPointer, this.resultSetIndex, - this.mapping.getJavaClass(), this.mapping.ordinal(), startIndex, this.firstRetrievedIndex); + (Class<T>) this.mapping.getJavaClass(), this.mapping.ordinal(), startIndex, this.firstRetrievedIndex); System.arraycopy(new_start_batch, 0, this.values, startIndex, new_start_batch.length); this.firstRetrievedIndex = startIndex; } @@ -92,7 +92,7 @@ public class QueryResultSetColumn<T> ext } if(endIndex > this.lastRetrievedIndex) { T[] new_end_batch = this.fetchValuesInternal(this.resultSetPointer, this.resultSetIndex, - this.mapping.getJavaClass(), this.mapping.ordinal(), this.lastRetrievedIndex, endIndex); + (Class<T>) this.mapping.getJavaClass(), this.mapping.ordinal(), this.lastRetrievedIndex, endIndex); System.arraycopy(new_end_batch, 0, this.values, this.lastRetrievedIndex, new_end_batch.length); this.lastRetrievedIndex = endIndex; } @@ -172,7 +172,7 @@ public class QueryResultSetColumn<T> ext */ @SuppressWarnings("unchecked") public T[] fetchColumnValues(int startIndex, int endIndex) throws MonetDBEmbeddedException { - return this.fetchColumnValues(startIndex, endIndex, this.mapping.getJavaClass()); + return this.fetchColumnValues(startIndex, endIndex, (Class<T>) this.mapping.getJavaClass()); } /** @@ -185,7 +185,7 @@ public class QueryResultSetColumn<T> ext */ @SuppressWarnings("unchecked") public T[] fetchColumnValuesAsync(int startIndex, int endIndex) throws MonetDBEmbeddedException { - return this.fetchColumnValuesAsync(startIndex, endIndex, this.mapping.getJavaClass()); + return this.fetchColumnValuesAsync(startIndex, endIndex, (Class<T>) this.mapping.getJavaClass()); } /** _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list