From 17c19b7d783484ef67774576b026df06ccbdd8b7 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 27 Apr 2016 22:43:15 +0200 Subject: [PATCH] In addressbook, there is no customer ... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- lib/jcustomer-core.jar | Bin 11426 -> 0 bytes nbproject/project.properties | 5 +- .../BaseAddressbookDatabaseBean.java} | 8 +- .../model/customer/PizzaCustomer.java | 262 ------------------ 4 files changed, 5 insertions(+), 270 deletions(-) delete mode 100644 lib/jcustomer-core.jar rename src/org/mxchange/{pizzaaplication/database/BasePizzaDatabaseBean.java => addressbook/database/BaseAddressbookDatabaseBean.java} (99%) delete mode 100644 src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java diff --git a/lib/jcustomer-core.jar b/lib/jcustomer-core.jar deleted file mode 100644 index be243816ab42d8b0767fdf7411273e724b38f5c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11426 zcmc&)TWlNIdHzPCIMj%;CEAi~O5UZt-nArKH{WgfMpKeaOOzB*va8)~v}0;4ahDe@ zN$sw)SOh_uZh#iS0^8;#y#Q^HAP);K zT*%>=9LtV_3_;HD%zys>T>kU@mva_pTLT&p0_HyX&ULu1b_9@`UXG6>=V!*g_&Kmx zC7mT{{4YNF!!44_cQ3zH(o}ptIWwJJ9!<@p^g{NIQLc>KG)m=cv2Z>%F*@F<#S5;I z_?Dj8G-52{%X6crJGDf~&@0CJ$kn?-e|B_y?ac9!Y@uS53VLqj_V}sT;6h2y<=b}3`b zWOIgsfo5%aQ-4QSaLz}9e`nZcVKJ8D8W>x+{iczrDA;QjWs75Jqmq`nXJFocK_e6R6xEv8*QiSwVpN_?cdX&VMN7f2xA(> zj(1=J$3r-w;UrF}I32^nH#rpvE@K6|=duN3emj5LC@ssBDTvG!GkWf(&S~U-yD(7M%$5~Q`bo33 zrpcsGJv-ACJ@Zyd-!hq+LwN1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P`x906D!8Tf8g5e$Yq(uEU&1}3f=122oiIV+ zL>L>`l%H&vIo-F+t&=cv$g3!XQN)&tw}oj*MLEoj@3ycw&6J8Mp=@NfOWDd@?)dV- zuoRm>_jGHR!ECL)NuJ=?FsO+&kFa+z>DCgPg7f-2$t!WcwAR|ROtBc*dOem>wlBbj z(;;-3?36AGu&u=Kd0pO54atJhx3-vMP%zTKxVn2@H<#o;FxUVjYD+UzDOxqWUVv3f z2CZAgciEi5si`3b9#%B!f+$WxfqO+9aH}sw5?93P@b0Ofo+|Uhq6NBnZim}9`MexB z5%1!}m_=ePI*P~{cPfiIyFb{V`^g49oTRrfVA@?t?O9tk0YY|d%jS%o`uivv`YZH5 zg0dQE;Vww)YHRc%0(LI%^ZuaoQng<8KSaoR`3UW+(Ff4xqy2&P+=qM7vGEX{nsFx3 zdOFw>{6=qp+dI7@tg`Dqb`RV~*R4MYD&PP0e?-60A9#bWv&Na=NN@0)A6pc+M((3q zthKe*a-9AM7_7E&Kji@TQx0)Ia zWj{qM`A77FteusQX!!?e>ZDBePg=++MZe@2B`%Zu2>p)$d3Do~7-ijYQtn3Jz`z$6 zP%#lu{+Di=CYV4b2l+D1#z~H|{~jWHu_yZBL-c&>K6)>(&wbIZ@rT%Fc^`*JWTivb zm}t0dw$n<7_M2^@t4E*dB-<$`K?onV01+hZZR5t;e#_OWvD#!~vnDIY6Jlgf;t&VS zVQ|E3AJFj#(bWg&{}d6+6{)cqV#{PN={&2pU~+L*Y1!M_{3IKxcy-~w;&QJZRu)f*@F&Cb6S7t z&(liZxY>EfPENL2myBI+i*J`b*&si@6AoLmnO}Y?zII&f$G(0PKJjO7c~M?=-ji@n zgTMQ=|MX{PPkfUD6P5?>73Mt%RulFrmx_. */ -package org.mxchange.pizzaaplication.database; +package org.mxchange.addressbook.database; import java.text.MessageFormat; import java.util.GregorianCalendar; @@ -31,7 +31,7 @@ import org.mxchange.jphone.utils.PhoneUtils; *

* @author Roland Haeder */ -public abstract class BasePizzaDatabaseBean extends BaseDatabaseBean { +public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean { /** * Serial number @@ -41,7 +41,7 @@ public abstract class BasePizzaDatabaseBean extends BaseDatabaseBean { /** * Protected constructor */ - protected BasePizzaDatabaseBean () { + protected BaseAddressbookDatabaseBean () { // Call super constructor super(); } diff --git a/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java b/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java deleted file mode 100644 index 1969920..0000000 --- a/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2016 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.mxchange.pizzaapplication.model.customer; - -import java.util.Calendar; -import java.util.Objects; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Index; -import javax.persistence.JoinColumn; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontacts.contact.UserContact; -import org.mxchange.jcustomercore.model.customer.Customer; -import org.mxchange.jcustomercore.model.customer.status.CustomerAccountStatus; - -/** - * A customer entity - *

- * @author Roland Haeder - */ -@Entity (name = "customer") -@Table ( - name = "customer", - indexes = { - @Index (columnList = "customer_number", unique = true) - } -) -@NamedQueries ( - { - @NamedQuery (name = "AllCustomers", query = "SELECT c FROM customer AS c ORDER BY c.customerId ASC") - } -) -@SuppressWarnings ("PersistenceUnitPresent") -public class PizzaCustomer implements Customer { - - /** - * Serial number - */ - private static final long serialVersionUID = 14_857_923_178_504_617L; - - /** - * Account status for this customer - */ - @Basic (optional = false) - @Enumerated (EnumType.STRING) - @Column (name = "customer_status", nullable = false) - private CustomerAccountStatus customerAccountStatus; - - /** - * Contact instance (personal data) - */ - @JoinColumn (name = "customer_contact_id", nullable = false, updatable = false, unique = true) - @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.ALL, optional = false) - private Contact customerContact; - - /** - * When this customer has been created - */ - @Basic (optional = false) - @Column (name = "customer_created", nullable = false, updatable = false) - @Temporal (TemporalType.TIMESTAMP) - private Calendar customerCreated; - - /** - * Id number for this entry - */ - @Id - @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "customer_id", nullable = false, updatable = false) - private Long customerId; - - /** - * When this customer has been locked (last timestamp) - */ - @Column (name = "customer_last_locked") - @Temporal (TemporalType.TIMESTAMP) - private Calendar customerLocked; - - /** - * Customer number - */ - @Basic (optional = false) - @Column (name = "customer_number", nullable = false, updatable = false) - private String customerNumber; - - /** - * Default constructor - */ - public PizzaCustomer () { - } - - /** - * Constructor with account status, contact instance and customer number - *

- * @param customerAccountStatus Account status (Call-agents may only call - * unlocked accounts) - * @param customerContact Contact instance - * @param customerNumber Customer number - */ - public PizzaCustomer (final CustomerAccountStatus customerAccountStatus, final Contact customerContact, final String customerNumber) { - // Call other constructor - this(); - - // Set all parameter - this.customerAccountStatus = customerAccountStatus; - this.customerContact = customerContact; - this.customerNumber = customerNumber; - } - - @Override - public void copyAll (final Customer customer) { - // Copy all supported fields - this.setCustomerAccountStatus(customer.getCustomerAccountStatus()); - this.setCustomerContact(customer.getCustomerContact()); - this.setCustomerCreated(customer.getCustomerCreated()); - this.setCustomerId(customer.getCustomerId()); - this.setCustomerLocked(customer.getCustomerLocked()); - this.setCustomerNumber(customer.getCustomerNumber()); - } - - @Override - public boolean equals (final Object object) { - if (this == object) { - return true; - } else if (null == object) { - return false; - } else if (this.getClass() != object.getClass()) { - return false; - } - - final Customer other = (Customer) object; - - if (!Objects.equals(this.getCustomerNumber(), other.getCustomerNumber())) { - return false; - } else if (!Objects.equals(this.getCustomerContact(), other.getCustomerContact())) { - return false; - } else if (!Objects.equals(this.getCustomerId(), other.getCustomerId())) { - return false; - } - - return true; - } - - @Override - public int hashCode () { - int hash = 7; - - hash = 53 * hash + Objects.hashCode(this.getCustomerContact()); - hash = 53 * hash + Objects.hashCode(this.getCustomerId()); - hash = 53 * hash + Objects.hashCode(this.getCustomerNumber()); - - return hash; - } - - @Override - public CustomerAccountStatus getCustomerAccountStatus () { - return this.customerAccountStatus; - } - - @Override - public void setCustomerAccountStatus (final CustomerAccountStatus customerStatus) { - this.customerAccountStatus = customerStatus; - } - - @Override - public String getCustomerConfirmKey () { - throw new UnsupportedOperationException("Not supported yet."); //NOI18N - } - - @Override - public void setCustomerConfirmKey (final String customerConfirmKey) { - throw new UnsupportedOperationException("Not supported yet."); //NOI18N - } - - @Override - public Contact getCustomerContact () { - return this.customerContact; - } - - @Override - public void setCustomerContact (final Contact customerContact) { - this.customerContact = customerContact; - } - - @Override - public Calendar getCustomerCreated () { - return this.customerCreated; - } - - @Override - public void setCustomerCreated (final Calendar customerCreated) { - this.customerCreated = customerCreated; - } - - @Override - public Long getCustomerId () { - return this.customerId; - } - - @Override - public void setCustomerId (final Long customerId) { - this.customerId = customerId; - } - - @Override - public Calendar getCustomerLocked () { - return this.customerLocked; - } - - @Override - public void setCustomerLocked (final Calendar customerLocked) { - this.customerLocked = customerLocked; - } - - @Override - public String getCustomerNumber () { - return this.customerNumber; - } - - @Override - public void setCustomerNumber (final String customerNumber) { - this.customerNumber = customerNumber; - } - - @Override - public String getCustomerPasswordHash () { - throw new UnsupportedOperationException("Unfinished"); //NOI18N - } - - @Override - public void setCustomerPasswordHash (final String customerPasswordHash) { - throw new UnsupportedOperationException("Unfinished"); //NOI18N - } - -} -- 2.39.5