Mercurial > hg > monetdb-java
changeset 37:5588b030cc09 embedded
Fixed compilation issues
author | Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> |
---|---|
date | Wed, 02 Nov 2016 18:11:59 +0100 (2016-11-02) |
parents | 18432f31d1e3 |
children | 38292b17cc8c |
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 |
diffstat | 4 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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); }
--- 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();
--- 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;
--- 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()); } /**