package com.google.sps.data;
import java.io.*;
import com.google.appengine.api.datastore.Entity;

public class Form {

    private String editURL;
    private String URL;
    private String id;
    private boolean isPublished;

    public Form(String editURL, String URL, String id) {
        this.editURL = editURL;
        this.URL = URL;
        this.id = id;
        this.isPublished = false;
    }

    public Form(Entity entity){
        this.editURL = (String) entity.getProperty("editURL");
        this.URL = (String) entity.getProperty("URL");
        this.id = (String) entity.getProperty("id");
        this.isPublished = Boolean.parseBoolean((String) entity.getProperty("isPublished"));
    }

    // Getters
    public String getEditURL() {
        return this.editURL;
    }

    public String getURL() {
        return this.URL;
    }

    public String getID() {
        return this.id;
    }

    public boolean isPublished() {
        return this.isPublished;
    }

    // Setters
    public void publish(){
        this.isPublished = true;
    }

    public void unpublish(){
        this.isPublished = false;
    }
    
    public Entity toDatastoreEntity(){
        Entity formEntity = new Entity("Form");
        formEntity.setProperty("editURL", this.editURL);
        formEntity.setProperty("URL", this.URL);
        formEntity.setProperty("id", this.id);
<<<<<<< HEAD
        formEntity.setProperty("isPublished", this.isPublished);
=======
>>>>>>> MVP-K
        return formEntity;
    }
}
@@ -1379,21 +1379,8 @@
 d);%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
     
@@ -1444,30 +1444,8 @@
 d);%0A
-=======%0A%3E%3E%3E%3E%3E%3E%3E MVP-K%0A
     

Remove Head/Tail conflict in form.java