}
// Get named query for a user list without given user
- Query allUsersExceptQuery = this.getEntityManager().createNamedQuery("SearchAllUsersExcept", List.class);
+ Query allUsersExceptQuery = this.getEntityManager().createNamedQuery("SearchAllUsersExcept", List.class); //NOI18N
// Set parameter
- allUsersExceptQuery.setParameter("user", user);
+ allUsersExceptQuery.setParameter("user", user); //NOI18N
// Get full list
List<User> allUsersExcept = allUsersExceptQuery.getResultList();
// Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: allUsersExcept.size()={0}", allUsersExcept.size()));
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: allUsersExcept.size()={0}", allUsersExcept.size())); //NOI18N
// Now get all users this user is sharing with, first a new query
- Query allShareesQuery = this.getEntityManager().createNamedQuery("SearchUserSharedAddressbooks", List.class);
+ Query allShareesQuery = this.getEntityManager().createNamedQuery("SearchUserSharedAddressbooks", List.class); //NOI18N
// Set parameter
- allShareesQuery.setParameter("user", user);
+ allShareesQuery.setParameter("user", user); //NOI18N
// Get full list again
List<User> allSharees = allShareesQuery.getResultList();
// Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: allSharees.size()={0}", allSharees.size()));
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: allSharees.size()={0}", allSharees.size())); //NOI18N
// Init final user list
List<User> userList = new ArrayList<>(0);
// Walk through all users
for (final User u : allUsersExcept) {
// Log message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: u={0}", u));
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: u={0}", u)); //NOI18N
// Is this user not included?
if (!allSharees.contains(u)) {
// Found one to add!
// Log message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: u={0} - ADDING!", u));
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: u={0} - ADDING!", u)); //NOI18N
// Add it
userList.add(u);
}
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("allUsersNotSharing: userList.size()={0} - EXIT!", userList.size()));
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("allUsersNotSharing: userList.size()={0} - EXIT!", userList.size())); //NOI18N
// Return it
return userList;