2 * Copyright (C) 2017 Roland Häder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jcontactsbusiness.basicdata;
19 import java.text.MessageFormat;
20 import java.util.List;
21 import javax.ejb.Stateless;
22 import javax.persistence.Query;
23 import org.mxchange.jjobs.database.BaseJobsDatabaseBean;
26 * An administrative stateless session bean for business data
28 * @author Roland Häder<roland@mxchange.org>
30 @Stateless (name = "adminBusinessData", description = "An administrative statless bean for handling business data (all)")
31 public class JobsAdminBusinessDataSessionBean extends BaseJobsDatabaseBean implements BusinessDataAdminSessionBeanRemote {
36 private static final long serialVersionUID = 56_389_504_892_184_572L;
41 public JobsAdminBusinessDataSessionBean () {
42 // Call super constructor
47 @SuppressWarnings ("unchecked")
48 public List<BusinessBasicData> allBusinessContacts () {
50 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allBusinessContacts: CALLED!", this.getClass().getSimpleName())); //NOI18N
53 Query query = this.getEntityManager().createNamedQuery("AllBusinessData"); //NOI18N
56 List<BusinessBasicData> list = query.getResultList();
59 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allBusinessContacts: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N