From 7d1b087889a3b802fa68a07b8a353f57b26f9276 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 28 Apr 2016 10:29:34 +0200 Subject: [PATCH] added named query for finding customers by id numbers. Normally this is used when a converter calls the findSomethingById() method of an EJB. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../pizzaaplication/model/customer/PizzaCustomer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java b/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java index 1969920..35b9b6e 100644 --- a/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java +++ b/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java @@ -54,7 +54,9 @@ import org.mxchange.jcustomercore.model.customer.status.CustomerAccountStatus; ) @NamedQueries ( { - @NamedQuery (name = "AllCustomers", query = "SELECT c FROM customer AS c ORDER BY c.customerId ASC") + @NamedQuery (name = "AllCustomers", query = "SELECT c FROM customer AS c ORDER BY c.customerId ASC"), + @NamedQuery (name = "SearchCustomerByNumber", query = "SELECT c FROM customer AS c WHERE c.customerNumber = :customerNumber"), + @NamedQuery (name = "SearchCustomerById", query = "SELECT c FROM customer AS c WHERE c.customerId = :customerId") } ) @SuppressWarnings ("PersistenceUnitPresent") -- 2.39.5