daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private List<UserGroup> getUserGroups() throws RIACheckedException {
  2.  
  3.         DomainManager domainManager = ComptelObjectStorageEngine.getRealm(Constant.USER_MANAGEMENT_COSE_REALM).getDomainManager();
  4.  
  5.         List<UserGroup> userGroups = new ArrayList<UserGroup>();
  6.         try {
  7.              QueryResult r = domainManager.query(UserGroup.class, 0, -1, null);
  8.              List<UserGroup> tmpUserGroup = (List<UserGroup>) r.getList();
  9.              userGroups = domainManager.detachAll(tmpUserGroup, null);
  10.  
  11.         } catch (Exception e) {
  12.             logger.log(Level.WARNING, "Failed to get user groups", e);
  13.             throw new RIACheckedException("Failed to get user groups", e, null, null, null);
  14.  
  15.         } finally {
  16.             domainManager.close();
  17.         }
  18.  
  19.         return userGroups;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top