/*
- * Copyright (C) 2016 Roland Haeder
+ * Copyright (C) 2016, 2017 Roland Häder
*
* 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
import java.io.Serializable;
import javax.ejb.Remote;
import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;
+import org.mxchange.jcustomercore.exceptions.CustomerNotFoundException;
/**
* An interface for customer beans
* <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
*/
@Remote
public interface CustomerSessionBeanRemote extends Serializable {
*/
Customer fillCustomerData (final Customer customer);
+ /**
+ * Tries to find a customer with given id number (not customer number). If
+ * not found, an exception is thrown.
+ * <p>
+ * @param customerId Customer id
+ * <p>
+ * @return Valid customer instance
+ * <p>
+ * @throws CustomerNotFoundException If a customer cannot be found
+ */
+ Customer findCustomerById (final Long customerId) throws CustomerNotFoundException;
+
/**
* Checks if the the given customer instance is already registered
* <p>
* <p>
* @return Whether the customer is already registered
*/
- boolean isReqistered (final Customer customer);
+ boolean isRegistered (final Customer customer);
/**
* Registers the customer and creates a customer number after succesful
* <p>
* @return Prepared Customer instance
* <p>
- * @throws
- * org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException If
- * the customer is already registered.
+ * @throws CustomerAlreadyRegisteredException If the customer is already
+ * registered.
*/
Customer registerCustomer (final Customer customer) throws CustomerAlreadyRegisteredException;
+
}