Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.Text


    if (delegation == null) return null;
    return delegation.getValue();
  }

  public void setDelegation(String delegation) {
    this.delegation = new Text(delegation);
  }
View Full Code Here


  public void setNotes(Text notes) {
    this.notes = notes;
  }
 
  public void setNotesString(String notes) {
    this.notes = new Text(notes);
  }
View Full Code Here

      points = Integer.parseInt(req.getParameter(STUDENT_POINTS + x));
      justification = req.getParameter(STUDENT_JUSTIFICATION + x);
      commentsToStudent = req.getParameter(STUDENT_COMMENTSTOSTUDENT + x);

      submissionList.add(new Submission(fromStudent, toStudent, courseID,
          evaluationName, teamName, points, new Text(justification),
          new Text(commentsToStudent)));
    }

    Evaluations evaluations = Evaluations.inst();

    evaluations.editSubmissions(submissionList);
View Full Code Here

        .getParameter(STUDENT_NUMBEROFSUBMISSIONS));

    String fromStudent = "";
    String toStudent = "";
    int points = 0;
    Text justification = new Text("");
    Text commentsToStudent = new Text("");

    String courseID = req.getParameter(COURSE_ID);
    String evaluationName = req.getParameter(EVALUATION_NAME);
    String teamName = req.getParameter(STUDENT_TEAMNAME);

    // Make sure the deadline is not up yet, including grace period
    Evaluations evaluations = Evaluations.inst();

    Calendar now = Calendar.getInstance();
    Calendar deadline = Calendar.getInstance();

    Evaluation evaluation = evaluations.getEvaluation(courseID,
        evaluationName);
    deadline.setTime(evaluation.getDeadline());
    deadline.set(Calendar.MINUTE, deadline.get(Calendar.MINUTE)
        + evaluation.getGracePeriod());

    now.add(Calendar.MILLISECOND,
        (int) (60 * 60 * 1000 * evaluation.getTimeZone()));

    if (now.after(deadline)) {
      resp.getWriter().write(
          MSG_STATUS_OPENING + MSG_EVALUATION_DEADLINEPASSED
              + MSG_STATUS_CLOSING);
    }

    else {

      for (int x = 0; x < numberOfSubmissions; x++) {
        fromStudent = req.getParameter(STUDENT_FROMSTUDENT + x);
        toStudent = req.getParameter(STUDENT_TOSTUDENT + x);
        points = Integer.parseInt(req.getParameter(STUDENT_POINTS + x));
        justification = new Text(req.getParameter(STUDENT_JUSTIFICATION
            + x));
        commentsToStudent = new Text(
            req.getParameter(STUDENT_COMMENTSTOSTUDENT + x));

        submissionList.add(new Submission(fromStudent, toStudent,
            courseID, evaluationName, teamName, points,
            justification, commentsToStudent));
View Full Code Here

    this.setToStudent(toStudent);
    this.setCourseID(courseID);
    this.setEvaluationName(evaluationName);
    this.setTeamName(teamName);

    this.setJustification(new Text(""));
    this.setCommentsToStudent(new Text(""));
    this.points = -999;
  }
View Full Code Here

    List<Submission> submissions = (List<Submission>) query.execute(
        course_id, evaluation_name, student_email);

    for (Submission submission : submissions) {
      submission.setPoints(100);
      submission.setCommentsToStudent(new Text(String.format(
          "This is a public comment from %s to %s.", student_email,
          submission.getToStudent())));
      submission.setJustification(new Text(String.format(
          "This is a justification from %s to %s", student_email,
          submission.getToStudent())));
    }

    // Store back to datastore
View Full Code Here

        if (submission.getToStudent().equalsIgnoreCase(
            students.get(i).getEmail()))
          position = i;
        int point = Integer.valueOf(pointsArray[position]);
        submission.setPoints(point);
        submission.setCommentsToStudent(new Text(String.format(
            "This is a public comment from %s to %s.",
            student_email, submission.getToStudent())));
        submission.setJustification(new Text(String.format(
            "This is a justification from %s to %s", student_email,
            submission.getToStudent())));
      }
    }
View Full Code Here

        entity.getProperty(EXCEPTION_HANDLER_SPECIFIED_PROPERTY);
    if (null != exceptionHandlerSpecifiedProperty) {
      exceptionHandlerSpecified = (Boolean) exceptionHandlerSpecifiedProperty;
    }
    exceptionHandlerJobKey = (Key) entity.getProperty(EXCEPTION_HANDLER_JOB_KEY_PROPERTY);
    Text exceptionHandlerGraphGuidText =
        (Text) entity.getProperty(EXCEPTION_HANDLER_JOB_GRAPH_GUID_PROPERTY);
    if (null != exceptionHandlerGraphGuidText) {
      exceptionHandlerJobGraphGuid = exceptionHandlerGraphGuidText.getValue();
    }
    Object callExceptionHandlerProperty = entity.getProperty(CALL_EXCEPTION_HANDLER_PROPERTY);
    if (null != callExceptionHandlerProperty) {
      callExceptionHandler = (Boolean) callExceptionHandlerProperty;
    }
    Object ignoreExceptionProperty = entity.getProperty(IGNORE_EXCEPTION_PROPERTY);
    if (null != ignoreExceptionProperty) {
      ignoreException = (Boolean) ignoreExceptionProperty;
    }
    Text childGraphGuidText = (Text) entity.getProperty(CHILD_GRAPH_GUID_PROPERTY);
    if (null != childGraphGuidText) {
      childGraphGuid = childGraphGuidText.getValue();
    }
    exceptionKey = (Key) entity.getProperty(EXCEPTION_KEY_PROPERTY);
    startTime = (Date) entity.getProperty(START_TIME_PROPERTY);
    endTime = (Date) entity.getProperty(END_TIME_PROPERTY);
    childKeys = (List<Key>) entity.getProperty(CHILD_KEYS_PROPERTY);
View Full Code Here

    if (null != exceptionKey) {
      entity.setProperty(EXCEPTION_KEY_PROPERTY, exceptionKey);
    }
    if (null != exceptionHandlerJobGraphGuid) {
      entity.setUnindexedProperty(
          EXCEPTION_HANDLER_JOB_GRAPH_GUID_PROPERTY, new Text(exceptionHandlerJobGraphGuid));
    }
    entity.setUnindexedProperty(CALL_EXCEPTION_HANDLER_PROPERTY, callExceptionHandler);
    entity.setUnindexedProperty(IGNORE_EXCEPTION_PROPERTY, ignoreException);
    if (childGraphGuid != null) {
      entity.setUnindexedProperty(CHILD_GRAPH_GUID_PROPERTY, new Text(childGraphGuid));
    }
    entity.setProperty(START_TIME_PROPERTY, startTime);
    entity.setUnindexedProperty(END_TIME_PROPERTY, endTime);
    entity.setProperty(CHILD_KEYS_PROPERTY, childKeys);
    entity.setUnindexedProperty(ATTEMPT_NUM_PROPERTY, attemptNumber);
View Full Code Here

      entity.setProperty("Byte", new Byte(
        RandomStringUtils.randomAlphanumeric(10).getBytes()[0]));
      entity.setProperty("Blob", new Blob(RandomStringUtils
        .randomAlphanumeric(1000)
        .getBytes()));
      entity.setProperty("Text", new Text(RandomStringUtils.randomAlphanumeric(1000)));
      entity.setProperty("ShortBlob", new ShortBlob(RandomStringUtils
        .randomAlphanumeric(500)
        .getBytes()));
      entity.setProperty("BlobKey", new BlobKey(RandomStringUtils.randomAlphanumeric(10)));
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.Text

Copyright © 2018 www.massapicom. 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.