]> git.mxchange.org Git - jfinancials-mailer-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 15 Aug 2016 12:23:13 +0000 (14:23 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 16 Aug 2016 19:42:57 +0000 (21:42 +0200)
- sorted members

src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java

index 687cc28be4230553b71abebaf5054dc9a553fe49..05a219b84cbb2fdfe2755f67e3e02e997794312b 100644 (file)
@@ -49,45 +49,6 @@ public class AddressbookPhoneSessionBean extends BaseDatabaseBean implements Pho
        public AddressbookPhoneSessionBean () {
        }
 
-       @Override
-       public DialableCellphoneNumber findCellphoneById (final Long cellphoneId) throws PhoneEntityNotFoundException {
-               // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findCellphoneById: cellphoneId={1} - CALLED!", this.getClass().getSimpleName(), cellphoneId)); //NOI18N
-
-               // The id number should be valid
-               if (null == cellphoneId) {
-                       // Throw NPE
-                       throw new NullPointerException("cellphoneId is null"); //NOI18N
-               } else if (cellphoneId < 1) {
-                       // Not valid
-                       throw new IllegalArgumentException(MessageFormat.format("cellphoneId={0} is not valid.", cellphoneId)); //NOI18N
-               }
-
-               // Now find it
-               Query query = this.getEntityManager().createNamedQuery("SearchCellphoneId", CellphoneNumber.class); //NOI18N
-
-               // Set parameter
-               query.setParameter("cellphoneId", cellphoneId); //NOI18N
-
-               // Init instance
-               DialableCellphoneNumber cellphone = null;
-
-               // Try to get a result
-               try {
-                       // Get a single result
-                       cellphone = (DialableCellphoneNumber) query.getSingleResult();
-               } catch (NoResultException ex) {
-                       // The entry was not found, so throw it again
-                       throw new PhoneEntityNotFoundException(cellphoneId, ex);
-               }
-
-               // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findCellphoneById: cellphone={1} - EXIT!", this.getClass().getSimpleName(), cellphone)); //NOI18N
-
-               // Return found instance
-               return cellphone;
-       }
-
        @SuppressWarnings ("unchecked")
        @Override
        public List<DialableCellphoneNumber> allCellphoneNumbers () {
@@ -145,4 +106,43 @@ public class AddressbookPhoneSessionBean extends BaseDatabaseBean implements Pho
                return list;
        }
 
+       @Override
+       public DialableCellphoneNumber findCellphoneById (final Long cellphoneId) throws PhoneEntityNotFoundException {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findCellphoneById: cellphoneId={1} - CALLED!", this.getClass().getSimpleName(), cellphoneId)); //NOI18N
+
+               // The id number should be valid
+               if (null == cellphoneId) {
+                       // Throw NPE
+                       throw new NullPointerException("cellphoneId is null"); //NOI18N
+               } else if (cellphoneId < 1) {
+                       // Not valid
+                       throw new IllegalArgumentException(MessageFormat.format("cellphoneId={0} is not valid.", cellphoneId)); //NOI18N
+               }
+
+               // Now find it
+               Query query = this.getEntityManager().createNamedQuery("SearchCellphoneId", CellphoneNumber.class); //NOI18N
+
+               // Set parameter
+               query.setParameter("cellphoneId", cellphoneId); //NOI18N
+
+               // Init instance
+               DialableCellphoneNumber cellphone = null;
+
+               // Try to get a result
+               try {
+                       // Get a single result
+                       cellphone = (DialableCellphoneNumber) query.getSingleResult();
+               } catch (NoResultException ex) {
+                       // The entry was not found, so throw it again
+                       throw new PhoneEntityNotFoundException(cellphoneId, ex);
+               }
+
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findCellphoneById: cellphone={1} - EXIT!", this.getClass().getSimpleName(), cellphone)); //NOI18N
+
+               // Return found instance
+               return cellphone;
+       }
+
 }