import javax.persistence.Query;
import org.mxchange.jcustomercore.model.customer.Customer;
import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
+import org.mxchange.jcustomercore.utils.CustomerUtils;
/**
* A stateless administrative customer session bean (EJB)
return customers;
}
+ @Override
+ public String createCustomerNumber () {
+ // Init named query
+ Query query = this.getEntityManager().createNamedQuery("SearchCustomerByNumber", RateCalcCustomer.class);
+
+ // Default is not found
+ String customerNumber = null;
+
+ // Search until a free number was found
+ while (null == customerNumber) {
+ // Create new number
+ String cn = CustomerUtils.generateCustomerNumber(RateCalcAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_LENGTH);
+ }
+ }
+
}