From: Roland Haeder Date: Tue, 29 Sep 2015 07:37:08 +0000 (+0200) Subject: minor cleanups X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b942051a83e547a70d20944fc9d1d8afa85f904f;p=jproduct-core.git minor cleanups Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java b/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java index e4dce08..606f633 100644 --- a/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java +++ b/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java @@ -52,7 +52,7 @@ public class ShopCustomer implements Customer { * Id number from "contacts" table */ @JoinColumn (name = "contact_id", nullable = false, updatable = false, unique = true) - @OneToOne (optional = false, targetEntity = UserContact.class) + @OneToOne (targetEntity = UserContact.class, optional = false) private Contact contact; /** diff --git a/src/org/mxchange/jshopcore/model/product/GenericProduct.java b/src/org/mxchange/jshopcore/model/product/GenericProduct.java index e9ac607..36406ac 100644 --- a/src/org/mxchange/jshopcore/model/product/GenericProduct.java +++ b/src/org/mxchange/jshopcore/model/product/GenericProduct.java @@ -110,7 +110,7 @@ public class GenericProduct implements Product, Comparable { if (null == product) { throw new NullPointerException("product is null"); //NOI18N } - + // Is the productId the same? if (Objects.equals(this.getProductId(), product.getProductId())) { // Same productId, means same productCategory @@ -119,7 +119,7 @@ public class GenericProduct implements Product, Comparable { // This productId is larger than compared to return 1; } - + // The other productId is larger return -1; }