Package com.googlecode.objectify

Examples of com.googlecode.objectify.Objectify.load()


  }
 
  @Override
  public MatchInfo LoadMatchByOpponentInDropdown(String userId, String opponentId) {
          Objectify ofy = ObjectifyService.ofy();
          Iterable<MatchInfo> list = ofy.load().type(MatchInfo.class);
          Iterator<MatchInfo> itr= list.iterator();
          while(itr.hasNext()){
              MatchInfo mt = itr.next();
              if(mt.getPlayerOneEmail().equals(userId)&&mt.getPlayerTwoEmail().equals(opponentId)||mt.getPlayerOneEmail().equals(opponentId)&&mt.getPlayerTwoEmail().equals(userId))   
              // found the match!
View Full Code Here


        return;
      }

      Objectify ofy = ObjectifyService.factory().begin();
     
      BasicErrorInfo basicInfo = ofy.load().type(BasicErrorInfo.class).filter("REPORT_ID", request.getParameter("REPORT_ID")).first().now();
      if (basicInfo == null)
      {
        String PACKAGE_NAME = request.getParameter("PACKAGE_NAME");
        // get package.
        log.warning("PACKAGE = " + PACKAGE_NAME);
View Full Code Here

      {
        String PACKAGE_NAME = request.getParameter("PACKAGE_NAME");
        // get package.
        log.warning("PACKAGE = " + PACKAGE_NAME);
       
        AppPackage appPackage = ofy.load().type(AppPackage.class).filter("PACKAGE_NAME", PACKAGE_NAME).first().now();
        if (appPackage == null)
        {
        //  System.out.println("package unknown " + PACKAGE_NAME);
          log.severe("package unknown " + PACKAGE_NAME);
          response.sendError(HttpServletResponse.SC_FORBIDDEN);
View Full Code Here

          log.severe("Authentication Failed " + acraLog.PACKAGE_NAME);
          return;
        }

        // get user for package.
        AppUser appUser = ofy.load().type(AppUser.class).id(appPackage.Owner).now();

        if (appUser == null)
        {
          response.getWriter().println("FAIL USER UNKNOWN");
          log.severe("User not found " + acraLog.PACKAGE_NAME);
View Full Code Here

        basicInfo.REPORT_ID = acraLog.REPORT_ID;
        basicInfo.USER_CRASH_DATE = acraLog.USER_CRASH_DATE;
        basicInfo.Timestamp = acraLog.Timestamp;

        // find mapping.
        MappingFileInfo mapping = ofy.load().type(MappingFileInfo.class).filter("PACKAGE_NAME", acraLog.PACKAGE_NAME).filter("version", acraLog.APP_VERSION_NAME).first().now();
        if (mapping != null)
        {
          MappingFileInfo mostRecentMapping = ofy.load().type(MappingFileInfo.class).filter("PACKAGE_NAME", acraLog.PACKAGE_NAME).order("-uploadDate").limit(1).first().now();
          if (mostRecentMapping != null)
          {
View Full Code Here

        // find mapping.
        MappingFileInfo mapping = ofy.load().type(MappingFileInfo.class).filter("PACKAGE_NAME", acraLog.PACKAGE_NAME).filter("version", acraLog.APP_VERSION_NAME).first().now();
        if (mapping != null)
        {
          MappingFileInfo mostRecentMapping = ofy.load().type(MappingFileInfo.class).filter("PACKAGE_NAME", acraLog.PACKAGE_NAME).order("-uploadDate").limit(1).first().now();
          if (mostRecentMapping != null)
          {
            if (mostRecentMapping.getId() != mapping.getId())
            {
              // old version, lets write out message
View Full Code Here

                return;
              }
            }
          }

          MappingFileData mfd = ofy.load().type(MappingFileData.class).filter("mappingFileInfoId",mapping.id).first().now();

          acraLog.MAPPED_STACK_TRACE = StringReTrace.doReTrace(mfd.mapping, acraLog.STACK_TRACE);
        }else
        {
          response.getWriter().println("OLD VERSION");
View Full Code Here



        final Objectify obj = DAO.begin();

        final Worksheet worksheet = obj.load().type(Worksheet.class).id(request.worksheetId).get();
        //System.out.println("Worksheet: "+Misc.gsonpp.toJson(worksheet));
        //System.out.println("Request: "+Misc.gsonpp.toJson(request));
        if (worksheet == null) {
            resp.sendError(404);
            return;
View Full Code Here

      if (worksheetId.length() == 8) {
        // This is readonly, duplicate it and redirect to
        // a new id
        final Worksheet worksheet = new Worksheet();

        final Worksheet template = obj.load().type(Worksheet.class).filter("readOnlyId", worksheetId).first().get();

        if (template == null) {
          resp.sendError(404);
          return;
        }
View Full Code Here

        resp.sendRedirect("/" + worksheet.id);
      } else {
        final Worksheet worksheet;
        try {
          worksheet = obj.load().type(Worksheet.class).id(worksheetId).get();
        } catch (final NotFoundException e) {
          resp.sendError(404, "Worksheet not found");
          return;
        }
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.