Package javax.jdo

Examples of javax.jdo.PersistenceManager.retrieve()


    query.declareParameters("Long fId, Integer sNo");
    List<GAEFileContent> gaeContents = (List<GAEFileContent>) query.execute(fileId, segmentNo);
    GAEFileContent gaeContent = null;
    if (gaeContents.size() > 0) {
      gaeContent = gaeContents.get(0);
      pm.retrieve(gaeContent);
    }
    pm.close();
    return gaeContent;
  }
View Full Code Here


      query.setUnique(true);
      MSentryRole sentryRole = (MSentryRole) query.execute(roleName);
      if (sentryRole == null) {
        throw new SentryNoSuchObjectException("Role " + roleName);
      } else {
        pm.retrieve(sentryRole);
        sentryRole.removePrivileges();

        pm.deletePersistent(sentryRole);
      }
      CommitContext commit = commitUpdateTransaction(pm);
View Full Code Here

      query.setUnique(true);
      MSentryRole sentryRole = (MSentryRole) query.execute(roleName);
      if (sentryRole == null) {
        throw new SentryNoSuchObjectException("Role " + roleName);
      } else {
        pm.retrieve(sentryRole);
      }
      rollbackTransaction = false;
      commitTransaction(pm);
      return sentryRole;
    } finally {
View Full Code Here

        query.setUnique(true);
        sentryGroup = (MSentryGroup) query.execute(groupName);
        if (sentryGroup == null) {
          throw new SentryNoSuchObjectException("Group " + groupName);
        } else {
          pm.retrieve(sentryGroup);
        }
        roles = sentryGroup.getRoles();
      }
      for ( MSentryRole role: roles) {
        pm.retrieve(role);
View Full Code Here

          pm.retrieve(sentryGroup);
        }
        roles = sentryGroup.getRoles();
      }
      for ( MSentryRole role: roles) {
        pm.retrieve(role);
      }
      commitTransaction(pm);
      rollbackTransaction = false;
      return roles;
    } finally {
View Full Code Here

    List<GAELuceneUser> users = (List<GAELuceneUser>) query.execute(uId);
    GAELuceneUser user = null;

    if (users.size() > 0) {
      user = users.get(0);
      pm.retrieve(user);
    }

    pm.close();

    return user;
View Full Code Here

  private UserEntity retrieveUserEntity(String userEmail) {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      UserEntity userInfo = pm.getObjectById(UserEntity.class, createKey(userEmail));
      // This step is needed to fetch the data for the child objects
      pm.retrieve(userInfo);
      return userInfo;
    } catch (JDOObjectNotFoundException e) {
      return null;
    } finally {
      pm.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.