]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Ids must be parsed as Long, not Integer ...
authorRoland Haeder <roland@mxchange.org>
Fri, 14 Aug 2015 20:27:24 +0000 (22:27 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 14 Aug 2015 20:27:24 +0000 (22:27 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java
src/java/org/mxchange/pizzaapplication/category/BaseCategory.java
src/java/org/mxchange/pizzaapplication/category/Category.java
src/java/org/mxchange/pizzaapplication/category/product/ProductCategory.java
src/java/org/mxchange/pizzaapplication/database/frontend/category/PizzaCategoryDatabaseFrontend.java

index c59185fe6d0cbc8c14518bafa00f61dfdef1075e..a9a89d2e5f720790d2fddf83c2ee1dc7716844f9 100644 (file)
@@ -1390,7 +1390,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
 
                // Get parent id
-               Integer parent = category.getParent();
+               Long parent = category.getParent();
 
                // Is the id set?
                if (parent > 0) {
index 54892128154a29cccdd4d354ee53a73a87c21305..8f40185a85595a14eb8b269efbc6d95e41c93cae 100644 (file)
@@ -31,12 +31,12 @@ public class BaseCategory extends BaseFrameworkSystem implements Category {
        /**
         * Id number of category
         */
-       private Integer id;
+       private Long id;
 
        /**
         * Parent category id
         */
-       private Integer parent;
+       private Long parent;
 
        /**
         * Title of category
@@ -49,7 +49,7 @@ public class BaseCategory extends BaseFrameworkSystem implements Category {
         * @param title Category title
         * @param parent Parent id
         */
-       protected BaseCategory (final Integer id, final String title, final Integer parent) {
+       protected BaseCategory (final Long id, final String title, final Long parent) {
                // Set all here
                this.setId(id);
                this.setTitle(title);
@@ -113,7 +113,7 @@ public class BaseCategory extends BaseFrameworkSystem implements Category {
         * @return the id
         */
        @Override
-       public final Integer getId () {
+       public final Long getId () {
                return this.id;
        }
 
@@ -122,7 +122,7 @@ public class BaseCategory extends BaseFrameworkSystem implements Category {
         * @param id the id to set
         */
        @Override
-       public final void setId (final Integer id) {
+       public final void setId (final Long id) {
                this.id = id;
        }
 
@@ -131,7 +131,7 @@ public class BaseCategory extends BaseFrameworkSystem implements Category {
         * @return the parent
         */
        @Override
-       public final Integer getParent () {
+       public final Long getParent () {
                return this.parent;
        }
 
@@ -140,7 +140,7 @@ public class BaseCategory extends BaseFrameworkSystem implements Category {
         * @param parent the parent to set
         */
        @Override
-       public final void setParent (final Integer parent) {
+       public final void setParent (final Long parent) {
                this.parent = parent;
        }
 
index 2ef808350214c8590e9ce1f061b45d3d8dd03c67..16b38a6472cf853d001dc46386b6558ccb1b9aae 100644 (file)
@@ -30,25 +30,25 @@ public interface Category extends Storeable, Comparable<Category> {
         * Id number of category
         * @return the id
         */
-       public Integer getId ();
+       public Long getId ();
 
        /**
         * Id number of category
         * @param id the id to set
         */
-       public void setId (final Integer id);
+       public void setId (final Long id);
 
        /**
         * Parent category id
         * @return the parent
         */
-       public Integer getParent ();
+       public Long getParent ();
 
        /**
         * Parent category id
         * @param parent the parent to set
         */
-       public void setParent (final Integer parent);
+       public void setParent (final Long parent);
 
        /**
         * Title of category
index d4c2e249c82b9c837f26f71a341125fc8190d391..8cf78445cfbbbd24dc377d12c645a6367635ada9 100644 (file)
@@ -29,7 +29,7 @@ public class ProductCategory extends BaseCategory {
         * @param title Category title
         * @param parent Parent id
         */
-       public ProductCategory (final Integer id, final String title, final Integer parent) {
+       public ProductCategory (final Long id, final String title, final Long parent) {
                // Call parent constructor
                super(id, title, parent);
        }
index 30acafcd2d8039e26a755f590b4bd20d6d99393b..b49ec8aa9fd65d64c12cd23218c5bf5c32e2132e 100644 (file)
@@ -187,9 +187,9 @@ public class PizzaCategoryDatabaseFrontend extends BaseDatabaseFrontend implemen
                // "Walk" through all entries
                while (resultSet.next()) {
                        // Get id, title and parent id
-                       Integer id = resultSet.getInt(PizzaCategoryDatabaseConstants.COLUMN_ID);
+                       Long id = resultSet.getLong(PizzaCategoryDatabaseConstants.COLUMN_ID);
                        String title = resultSet.getString(PizzaCategoryDatabaseConstants.COLUMN_TITLE);
-                       Integer parent = resultSet.getInt(PizzaCategoryDatabaseConstants.COLUMN_PARENT);
+                       Long parent = resultSet.getLong(PizzaCategoryDatabaseConstants.COLUMN_PARENT);
 
                        // Debug message
                        this.getLogger().debug(MessageFormat.format("id={0},title={1},parent={2}", id, title, parent));