From 0d420f05908b5273d6334a0d136af98387216046 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 4 Sep 2015 12:00:55 +0200 Subject: [PATCH] =?utf8?q?Updated=20jshop=20and=20added=20first=20EJB(-lit?= =?utf8?q?e=3F)=20bean=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- PizzaService-ejb/lib/jshop.jar | Bin 97509 -> 99138 bytes PizzaService-ejb/nbproject/project.properties | 11 +-- .../beans/data/ShopDataBean.java | 72 ++++++++++++++++++ 3 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/data/ShopDataBean.java diff --git a/PizzaService-ejb/lib/jshop.jar b/PizzaService-ejb/lib/jshop.jar index f1d74f0903e483a6ef0f3a20492b3791f05058fb..0ba207f13c26a94ceedbe943f8ed3350cacd5521 100644 GIT binary patch delta 3109 zcmZ`*du)?c6u;-|i*{Yt?g^}HgAKNBgMuLJ!3JA|q0Bv4f~bHiqp)t>vmGl8#Kpi+ zATn;kP1J}O9~e=27-yD%15FeX38)aGF!)1_i42*DL43q>?$;H*!J3?&?>oQqy62vI z?)TGQhEv;()~cmCy@j!Hj2UZttuDn-+dEGv_2aqc0b_%H}&?pG{??9xk_W34CXao-y?f&}VYTD8aw-BkWuk69b( zsIrj!Atna=5M{ZWKg#k5s@Ihedr!B7*e%^-#7gv!65FLOAXWiWg?&1hG_Lm=iV0h2 zSVXMHFo)Q2Lm{y{hIzzh8y6ru7Bv2%5MOQf0P&NS{PD#9nKIo-JjXR(N8FdY%}V@6 z-U<1Bc>W7|dM_-gOC5^usn}o z@k+g(=4IZdmY{b=o!=7(ocXW+1Y>MAi!m{)iA9^34VWX~^?U1ro;7}NnYVeZw>9Z*$5Mo##jjN?MdLztjw%50t2QX>2O7$ z2c~BRd^6&k!c0imr}%GX*s>@E7RA`Ty_8Y5Y~S}oPbrKM<&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QtqDpSE%# z%b`UkPPEX*oj)H|Ul6Ne!@4##Z95S`*A|E%^tP!o4~QuHS|tX?Aam2{0&FWAmSKPtbm1}W(Cxj^%9<9S&Hhx)e z`3f5$))PZ)6#m-*8$|9O4G(pzbc~T{bI-?9Xo-kA^LOb#Q)b4JjZ>yTv@8SAnahmX7vKPV)81)+ej(oxQ z&^W&F@Ro*(7TKfwz$WTVn`!uD3)dlA`V`W8Ik;V|*SiCrTK+NY*vIA4%T>9~t-avd0JiEaFE+mZ2&1ScSURE3d#~Rebhw`@w8>FbC@oWh|$Pe. + */ +package org.mxchange.pizzaapplication.beans.data; + +import java.text.MessageFormat; +import java.util.LinkedList; +import java.util.List; +import javax.ejb.Stateful; +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Named; +import org.mxchange.jcore.contact.Gender; +import org.mxchange.jshop.beans.BaseFrameworkBean; +import org.mxchange.jshop.beans.data.ShopDataBeanRemote; + +/** + * A bean for static data + * + * @author Roland Haeder + */ +@Named("data") +@Stateful +@ApplicationScoped +public class ShopDataBean extends BaseFrameworkBean implements ShopDataBeanRemote { + /** + * Serial number + */ + private static final long serialVersionUID = 54163294941857L; + + @Override + public List selectableGenders () { + // Trace message + this.getLogger().trace("CALLED!"); //NOI18N + + // Init list + List list = new LinkedList<>(); + + // Walk through all genders + for (final Gender gender : Gender.values()) { + // Debug log + this.getLogger().debug(MessageFormat.format("gender={0}", gender)); //NOI18N + + // Is it not UNKNOWN + if (!gender.equals(Gender.UNKNOWN)) { + // Add it + boolean added = list.add(gender); + + // Has it been added? + assert(added) : MessageFormat.format("gender {0} not added.", gender); //NOI18N + } + } + + // Trace message + this.getLogger().trace(MessageFormat.format("list={0} - EXIT!", list)); //NOI18N + + // Return it + return list; + } +} -- 2.39.5