]> git.mxchange.org Git - jcore.git/commitdiff
Use int, not Long to make it compatible with TableModel's method
authorRoland Haeder <roland@mxchange.org>
Mon, 24 Aug 2015 11:23:22 +0000 (13:23 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 24 Aug 2015 11:23:22 +0000 (13:23 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcore/database/backend/DatabaseBackend.java
src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java
src/org/mxchange/jcore/database/backend/datasource/DataSourceDatabaseBackend.java
src/org/mxchange/jcore/database/backend/mysql/MySqlDatabaseBackend.java

index 80d4c9cd33f347b4458b85eb9cdf1e5cec1711bb..a787304317422d9453fccfb8bb84c22f9decd783 100644 (file)
@@ -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;
 }
index d47904a89786195449fdeb7199dbe368773b8fde..09587ae3afd8d181493c93f499f204999f33c7e3 100644 (file)
@@ -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();
index 1182795a1868c63aeaa1217d322b7713a370a89b..6843d194b293da2ad57fa200e75fd23d562768bf 100644 (file)
@@ -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
index 2be82ddd6777628c1ff2f1bbddc8a53246a2de3d..25091e427a4c04a4b0ee22c3dd3d4a5d887f6644 100644 (file)
@@ -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