]> git.mxchange.org Git - jproduct-core.git/blobdiff - src/org/mxchange/jshopcore/model/customer/ShopCustomer.java
Added dummy compareTo() (unimplemented, will follow) and Comparable<SomeInterface...
[jproduct-core.git] / src / org / mxchange / jshopcore / model / customer / ShopCustomer.java
index 5d72ed056f662786324030edd1d9beb5ce216421..02610b346c9d69b847013c256571d55326910724 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016 Roland Haeder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ import org.mxchange.jshopcore.model.customer.status.CustomerAccountStatus;
  */
 @Entity (name = "customer")
 @Table (name = "customer")
-public class ShopCustomer implements Customer {
+public class ShopCustomer implements Customer, Comparable<Customer> {
 
        /**
         * Serial number
@@ -56,6 +56,14 @@ public class ShopCustomer implements Customer {
        @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.ALL, optional = false)
        private Contact contact;
 
+       /**
+        * Account status
+        */
+       @Basic (optional = false)
+       @Column (name = "customer_account_status", nullable = false)
+       @Enumerated (EnumType.STRING)
+       private CustomerAccountStatus customerAccountStatus;
+
        /**
         * Confirmation key
         */
@@ -97,20 +105,17 @@ public class ShopCustomer implements Customer {
        @Column (name = "customer_password_hash")
        private String customerPasswordHash;
 
-       /**
-        * Account status
-        */
-       @Basic (optional = false)
-       @Column (name = "customer_account_status", nullable = false)
-       @Enumerated (EnumType.STRING)
-       private CustomerAccountStatus customerAccountStatus;
-
        /**
         * Default constructor
         */
        public ShopCustomer () {
        }
 
+       @Override
+       public int compareTo (Customer customer) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
        @Override
        public void copyAll (final Customer customer) {
                // Copy also contact data
@@ -135,6 +140,16 @@ public class ShopCustomer implements Customer {
                this.contact = contact;
        }
 
+       @Override
+       public CustomerAccountStatus getCustomerAccountStatus () {
+               return this.customerAccountStatus;
+       }
+
+       @Override
+       public void setCustomerAccountStatus (final CustomerAccountStatus customerAccountStatus) {
+               this.customerAccountStatus = customerAccountStatus;
+       }
+
        @Override
        public String getCustomerConfirmKey () {
                return this.customerConfirmKey;
@@ -195,13 +210,4 @@ public class ShopCustomer implements Customer {
                this.customerPasswordHash = customerPasswordHash;
        }
 
-       @Override
-       public CustomerAccountStatus getCustomerAccountStatus () {
-               return this.customerAccountStatus;
-       }
-
-       @Override
-       public void setCustomerAccountStatus (final CustomerAccountStatus customerAccountStatus) {
-               this.customerAccountStatus = customerAccountStatus;
-       }
 }