From f111494dea038507da09d7c9cb4b6b1ee5cd2502 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 24 Aug 2015 13:23:22 +0200 Subject: [PATCH] =?utf8?q?Use=20int,=20not=20Long=20to=20make=20it=20compa?= =?utf8?q?tible=20with=20TableModel's=20method=20Signed-off-by:Roland=20H?= =?utf8?q?=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/org/mxchange/jcore/database/backend/DatabaseBackend.java | 2 +- .../database/backend/base64/Base64CsvDatabaseBackend.java | 4 ++-- .../backend/datasource/DataSourceDatabaseBackend.java | 4 ++-- .../jcore/database/backend/mysql/MySqlDatabaseBackend.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/org/mxchange/jcore/database/backend/DatabaseBackend.java b/src/org/mxchange/jcore/database/backend/DatabaseBackend.java index 80d4c9c..a787304 100644 --- a/src/org/mxchange/jcore/database/backend/DatabaseBackend.java +++ b/src/org/mxchange/jcore/database/backend/DatabaseBackend.java @@ -88,5 +88,5 @@ public interface DatabaseBackend extends FrameworkInterface { * @throws java.io.IOException If an IO error occurs * @throws java.sql.SQLException If any SQL error occurs */ - public Long getTotalRows () throws IOException, SQLException; + public int getTotalRows () throws IOException, SQLException; } diff --git a/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java b/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java index d47904a..09587ae 100644 --- a/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java +++ b/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java @@ -227,12 +227,12 @@ public class Base64CsvDatabaseBackend extends BaseDatabaseBackend implements Dat } @Override - public final Long getTotalRows () throws IOException { + public final int getTotalRows () throws IOException { // Trace message this.getLogger().trace("CALLED!"); //NOI18N // Init count - Long count = 0L; + int count = 0; // First rewind this.rewind(); diff --git a/src/org/mxchange/jcore/database/backend/datasource/DataSourceDatabaseBackend.java b/src/org/mxchange/jcore/database/backend/datasource/DataSourceDatabaseBackend.java index 1182795..6843d19 100644 --- a/src/org/mxchange/jcore/database/backend/datasource/DataSourceDatabaseBackend.java +++ b/src/org/mxchange/jcore/database/backend/datasource/DataSourceDatabaseBackend.java @@ -125,12 +125,12 @@ public class DataSourceDatabaseBackend extends BaseDatabaseBackend implements Da } @Override - public Long getTotalRows () throws IOException, SQLException { + public int getTotalRows () throws IOException, SQLException { // Trace message this.getLogger().trace("CALLED!"); //NOI18N // Get long - Long count = null; + int count = 0; // Trace message this.getLogger().trace(MessageFormat.format("count={0} - EXIT!", count)); //NOI18N diff --git a/src/org/mxchange/jcore/database/backend/mysql/MySqlDatabaseBackend.java b/src/org/mxchange/jcore/database/backend/mysql/MySqlDatabaseBackend.java index 2be82dd..25091e4 100644 --- a/src/org/mxchange/jcore/database/backend/mysql/MySqlDatabaseBackend.java +++ b/src/org/mxchange/jcore/database/backend/mysql/MySqlDatabaseBackend.java @@ -331,7 +331,7 @@ public class MySqlDatabaseBackend extends BaseDatabaseBackend implements Databas } @Override - public Long getTotalRows () throws IOException, SQLException { + public int getTotalRows () throws IOException, SQLException { // Trace message this.getLogger().trace("CALLED!"); //NOI18N @@ -342,7 +342,7 @@ public class MySqlDatabaseBackend extends BaseDatabaseBackend implements Databas set.beforeFirst(); // Get long - Long count = set.getLong("cnt"); //NOI18N + int count = set.getInt("cnt"); //NOI18N // Trace message this.getLogger().trace(MessageFormat.format("count={0} - EXIT!", count)); //NOI18N -- 2.39.5