From: Roland Haeder Date: Sat, 23 Apr 2016 10:37:54 +0000 (+0200) Subject: Continued rewriting: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b9a55f76d2fbd970f0b9460f07213703a2dcc5d2;p=jjobs-ejb.git Continued rewriting: - added missing dependency jaddressbook-core - this project doesn't have sharing addressbooks, so methods are not implemented --- diff --git a/lib/jaddressbook-core.jar b/lib/jaddressbook-core.jar new file mode 100644 index 0000000..ddd1e07 Binary files /dev/null and b/lib/jaddressbook-core.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 42539e6..889194b 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -879,11 +879,11 @@ exists or setup the property manually. For example like this: - - - - - + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index f58b6c4..f784d58 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=1e826b2b +build.xml.data.CRC32=09f25a4d build.xml.script.CRC32=9c0f08a9 build.xml.stylesheet.CRC32=5910fda3@1.55.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=1e826b2b -nbproject/build-impl.xml.script.CRC32=4ae2c537 +nbproject/build-impl.xml.data.CRC32=09f25a4d +nbproject/build-impl.xml.script.CRC32=1d0ab521 nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.55.1 diff --git a/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java b/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java index f71bdd1..22c4a13 100644 --- a/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java +++ b/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java @@ -22,10 +22,13 @@ import java.util.List; import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.Query; +import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote; +import org.mxchange.jaddressbookcore.exceptions.AddressbookNameAlreadyUsedException; +import org.mxchange.jaddressbookcore.exceptions.AddressbookNotFoundException; +import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; +import org.mxchange.jaddressbookcore.model.addressbook.UserAddressbook; +import org.mxchange.jaddressbookcore.model.addressbook.entry.AddressbookEntry; import org.mxchange.jcoreee.database.BaseDatabaseBean; -import org.mxchange.jjobs.exceptions.AddressbookNameAlreadyUsedException; -import org.mxchange.jjobs.exceptions.AddressbookNotFoundException; -import org.mxchange.jjobs.model.addressbook.entry.AddressbookEntry; import org.mxchange.jusercore.model.user.User; /** @@ -34,7 +37,7 @@ import org.mxchange.jusercore.model.user.User; * @author Roland Haeder */ @Stateless (name = "addressbook", mappedName = "ejb/stateless-jjobs-adr", description = "A stateless bean for handling JJobs addressbooks") -public class JobsAddressbookSessionBean extends BaseDatabaseBean implements JobsAddressbookSessionBeanRemote { +public class JobsAddressbookSessionBean extends BaseDatabaseBean implements AddressbookSessionBeanRemote { /** * Serial number @@ -50,22 +53,22 @@ public class JobsAddressbookSessionBean extends BaseDatabaseBean implements Jobs // Validate parameter if (null == addressbook) { // Throw NPE - throw new NullPointerException("addressbook is null"); + throw new NullPointerException("addressbook is null"); //NOI18N } else if (addressbook.getAddressbookId() == null) { // Throw NPE again - throw new NullPointerException("addressbook.addressbookId is null"); + throw new NullPointerException("addressbook.addressbookId is null"); //NOI18N } else if (addressbook.getAddressbookId() < 1) { // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookId={0} is invalid.", addressbook.getAddressbookId())); + throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookId={0} is invalid.", addressbook.getAddressbookId())); //NOI18N } else if (addressbook.getAddressbookUser() == null) { // Throw again NPE - throw new NullPointerException("addressbook.addressbookUser is null"); + throw new NullPointerException("addressbook.addressbookUser is null"); //NOI18N } else if (addressbook.getAddressbookUser().getUserId() == null) { // Throw again NPE - throw new NullPointerException("addressbook.addressbookUser.userId is null"); + throw new NullPointerException("addressbook.addressbookUser.userId is null"); //NOI18N } else if (addressbook.getAddressbookUser().getUserId() < 1) { // Invalid id number again - throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookUser.userId={0} is invalid", addressbook.getAddressbookUser().getUserId())); + throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookUser.userId={0} is invalid", addressbook.getAddressbookUser().getUserId())); //NOI18N } // Generate query @@ -79,6 +82,16 @@ public class JobsAddressbookSessionBean extends BaseDatabaseBean implements Jobs return query.getResultList(); } + @Override + public List allUsersNotSharing (final User user, final Addressbook addressbook) { + throw new UnsupportedOperationException("JJobs don't have addressbok sharing (maybe yet?)"); //NOI18N + } + + @Override + public Integer countAllUserSharedAddressbooks (final User user) { + throw new UnsupportedOperationException("JJobs don't have addressbok sharing (maybe yet?)"); //NOI18N + } + @Override public Addressbook createAddressbook (final Addressbook addressbook) throws AddressbookNameAlreadyUsedException { // Is it not null?