/*
 * Xin Liu
 * created on Mar 1, 2016
 * record user profile
 * stored both in memcache and datastore to make the authentication easier
 */

package cs263w16.grade;

import javax.xml.bind.annotation.XmlRootElement;
import java.util.*;
import java.io.*;

public class UserProfile implements Serializable {


  private String userId; 
  private String lastName;
  private String firstName;
  private String instructorID;
  private String studentID;
  private List<String> enrolledInCourseList;
  private List<String> instructCourseList;

  public UserProfile(String userId) {
	this.userId = userId;
	enrolledInCourseList = new ArrayList<String>();
	instructCourseList = new ArrayList<String>();
  }

  public String setName (String lastName, String firstName) {
	return gradeKeyStr;
  }

  public void setGradeKeyStr(String gradeKeyStr) {
	this.gradeKeyStr = gradeKeyStr;
  }

  public String getStudentID() {
	return studentID;
  }

  public void setStudentID(String studentID) {
	this.studentID = studentID;
  }

  public String getName() {
	return name;
  }

  public void setName(String name) {
	this.name = name;
  }

  public int getScore() {
	return score;
  }

  public void setScore(int attribute) {
	this.score = score;
  }

  public String getGrader() {
	return grader;
  }

  public void setGrader(String grader) {
	this.grader = grader;
  }

  public Date getDate() {
	return date;
  }

  public void setDate(Date date) {
	this.date = date;
  }

  public String getAttribute() {
	return attribute;
  }

  public void setAttribute(String attribute) {
	this.attribute = attribute;
  }

  public boolean getHasNewComment() {
	return hasNewComment;
  }

  public void setHasNewComment(boolean hasNewComment) {
	this.hasNewComment = hasNewComment;
  }



  public String toString() {
	StringBuilder sb = new StringBuilder();
	sb.append("\tstudentID:\t").append(studentID);
	sb.append("\n\tname:\t").append(name);
	sb.append("\n\tscore:\t").append(score);
	sb.append("\n\tgrader:\t").append(grader);
	sb.append("\n\tdate:\t").append(grader);
	sb.append("\n\tattribute:\t").append(attribute);

	return sb.toString();
  }
} 

@@ -165,57 +165,8 @@
 e;%0A%0A
-import javax.xml.bind.annotation.XmlRootElement;%0A
 impo
@@ -660,17 +660,17 @@
  String 
-s
+g
 etName (
@@ -718,1364 +718,50 @@
 urn 
-gradeKeyStr;%0A  %7D%0A%0A  public void setGradeKeyStr(String gradeKeyStr) %7B%0A%09this.gradeKeyStr = gradeKeyStr;%0A  %7D%0A%0A  public String getStudentID() %7B%0A%09return studentID;%0A  %7D%0A%0A  public void setStudentID(String studentID) %7B%0A%09this.studentID = studentID;%0A  %7D%0A%0A  public String getName() %7B%0A%09return name;%0A  %7D%0A%0A  public void setName(String name) %7B%0A%09this.name = name;%0A  %7D%0A%0A  public int getScore() %7B%0A%09return score;%0A  %7D%0A%0A  public void setScore(int attribute) %7B%0A%09this.score = score;%0A  %7D%0A%0A  public String getGrader() %7B%0A%09return grader;%0A  %7D%0A%0A  public void setGrader(String grader) %7B%0A%09this.grader = grader;%0A  %7D%0A%0A  public Date getDate() %7B%0A%09return date;%0A  %7D%0A%0A  public void setDate(Date date) %7B%0A%09this.date = date;%0A  %7D%0A%0A  public String getAttribute() %7B%0A%09return attribute;%0A  %7D%0A%0A  public void setAttribute(String attribute) %7B%0A%09this.attribute = attribute;%0A  %7D%0A%0A  public boolean getHasNewComment() %7B%0A%09return hasNewComment;%0A  %7D%0A%0A  public void setHasNewComment(boolean hasNewComment) %7B%0A%09this.hasNewComment = hasNewComment;%0A  %7D%0A%0A%0A%0A  public String toString() %7B%0A%09StringBuilder sb = new StringBuilder();%0A%09sb.append(%22%5CtstudentID:%5Ct%22).append(studentID);%0A%09sb.append(%22%5Cn%5Ctname:%5Ct%22).append(name);%0A%09sb.append(%22%5Cn%5Ctscore:%5Ct%22).append(score);%0A%09sb.append(%22%5Cn%5Ctgrader:%5Ct%22).append(grader);%0A%09sb.append(%22%5Cn%5Ctdate:%5Ct%22).append(grader);%0A%09sb.append(%22%5Cn%5Ctattribute:%5Ct%22).append(attribute);%0A%0A%09return sb.toString();%0A  %7D
+this.firstName + %22 %22 + this.lastName;%0A  %7D%0A
 %0A%7D %0A

update a grade