/*
- * 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
*/
package org.mxchange.jshopcore.model.customer;
-import java.sql.Timestamp;
-import org.mxchange.jcore.model.contact.Contact;
+import java.io.Serializable;
+import java.util.Calendar;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jshopcore.model.customer.status.CustomerAccountStatus;
/**
* A customer interface
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
-public interface Customer extends Contact {
+public interface Customer extends Serializable {
/**
- * Setter for id number from "contact" table
- *
- * @param contactId Contact id number
+ * Copies all attributes from other customer object to this
+ * <p>
+ * @param customer Source instance
*/
- public void setContactId (final long contactId);
+ void copyAll (final Customer customer);
/**
- * Getter for id number from "contact" table
- *
+ * Getter for contact instance
+ * <p>
* @return Contact id number
*/
- public long getContactId();
+ Contact getContact ();
+
+ /**
+ * Setter for contact instance
+ * <p>
+ * @param contact Contact instance
+ */
+ void setContact (final Contact contact);
/**
* Getter for confirmation key
- *
+ * <p>
* @return Confirmation key
*/
- public String getCustomerConfirmKey ();
+ String getCustomerConfirmKey ();
/**
* Setter for confirmation key
- *
+ * <p>
* @param customerConfirmKey Confirmation key
*/
- public void setCustomerConfirmKey (final String customerConfirmKey);
+ void setCustomerConfirmKey (final String customerConfirmKey);
/**
* Getter for "created" timestamp
- *
+ * <p>
* @return "created" timestamp
*/
- public Timestamp getCustomerCreated ();
+ Calendar getCustomerCreated ();
/**
* Setter for "created" timestamp
- *
+ * <p>
* @param customerCreated "created" timestamp
*/
- public void setCustomerCreated (final Timestamp customerCreated);
+ void setCustomerCreated (final Calendar customerCreated);
+
+ /**
+ * Getter for customer id number
+ * <p>
+ * @return Customer id number
+ */
+ Long getCustomerId ();
+
+ /**
+ * Settte for customer id number
+ * <p>
+ * @param customerId Customer id number
+ */
+ void setCustomerId (final Long customerId);
/**
* Getter for "locked" timestamp
- *
+ * <p>
* @return "locked" timestamp
*/
- public Timestamp getCustomerLocked ();
+ Calendar getCustomerLocked ();
/**
* Getter for "locked" timestamp
- *
+ * <p>
* @param customerLocked "locked" timestamp
*/
- public void setCustomerLocked (final Timestamp customerLocked);
+ void setCustomerLocked (final Calendar customerLocked);
/**
- * Setter for customer number
- *
- * @param customerNumber Customer number
+ * Getter for customer number
+ * <p>
+ * @return Customer number
*/
- public void setCustomerNumber (final String customerNumber);
+ String getCustomerNumber ();
/**
- * Getter for customer number
- *
- * @return Customer number
+ * Setter for customer number
+ * <p>
+ * @param customerNumber Customer number
*/
- public String getCustomerNumber ();
+ void setCustomerNumber (final String customerNumber);
/**
* Getter for password hash
- *
+ * <p>
* @return Password hash
*/
- public String getCustomerPasswordHash ();
+ String getCustomerPasswordHash ();
/**
* Setter for password hash
- *
+ * <p>
* @param customerPasswordHash Password hash
*/
- public void setCustomerPasswordHash (final String customerPasswordHash);
+ void setCustomerPasswordHash (final String customerPasswordHash);
/**
* Getter for account status
- *
+ * <p>
* @return Account status
*/
- public String getCustomerStatus ();
+ CustomerAccountStatus getCustomerAccountStatus ();
/**
* Setter for account status
- *
+ * <p>
* @param customerStatus Account status
*/
- public void setCustomerStatus (final String customerStatus);
+ void setCustomerAccountStatus (final CustomerAccountStatus customerStatus);
- /**
- * Getter for customer id number
- *
- * @return Customer id number
- */
- public Long getCustomerId ();
+ @Override
+ boolean equals (final Object object);
- /**
- * Settte for customer id number
- *
- * @param customerId Customer id number
- */
- public void setCustomerId (final Long customerId);
+ @Override
+ int hashCode ();
}