package com.google.sps.data;

import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;

public final class Folder {

	private String folderName;
	private String folderDefaultLanguage;
	private String folderKey;
	private String parentKey;

	public Folder(
		String folderName,
		String folderDefaultLanguage) {
		
		this.folderName = folderName;
		this.folderDefaultLanguage = folderDefaultLanguage;
		this.folderKey = "null";
	}

	public Folder(Entity entity, String key) {
		this.folderName = (String) entity.getProperty("folderName");
		this.folderDefaultLanguage = (String) entity.getProperty("folderDefaultLanguage");
		this.folderKey = key;
	}

	public String getFolderName() {
		return this.folderName;
	}

	public String getFolderDefaultLanguage() {
		return this.folderDefaultLanguage;
	}

	public String getFolderKey() {
		return this.folderKey;
	}

	public void setFolderName(String newFolderName) {
		this.folderName = newFolderName;
	}

	public void setFolderKey(String folderKey) {
		this.folderKey = folderKey;
	}

	public void setParentKey(String key) {
		this.parentKey = key;
	}

	public Entity createEntity() { 
		Entity folder = new Entity("Folder", KeyFactory.stringToKey(this.parentKey));
		folder.setProperty("folderName", this.folderName);
		folder.setProperty("folderDefaultLanguage", this.folderDefaultLanguage);

		return folder;
	}
}
@@ -331,17 +331,18 @@
 lder %7B%0A%0A
-%09
+  
 private 
@@ -360,17 +360,18 @@
 erName;%0A
-%09
+  
 private 
@@ -400,17 +400,18 @@
 nguage;%0A
-%09
+  
 private 
@@ -428,17 +428,18 @@
 derKey;%0A
-%09
+  
 private 
@@ -457,17 +457,18 @@
 ntKey;%0A%0A
-%09
+  
 public F
@@ -474,17 +474,16 @@
 Folder(%0A
-%09
 %09String 
@@ -494,17 +494,16 @@
 erName,%0A
-%09
 %09String 
@@ -530,17 +530,16 @@
 e) %7B%0A%09%09%0A
-%09
 %09this.fo
@@ -561,17 +561,16 @@
 erName;%0A
-%09
 %09this.fo
@@ -614,17 +614,16 @@
 nguage;%0A
-%09
 %09this.fo
@@ -640,21 +640,23 @@
 %22null%22;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 public F
@@ -686,25 +686,24 @@
 ring key) %7B%0A
-%09
 %09this.folder
@@ -748,25 +748,24 @@
 lderName%22);%0A
-%09
 %09this.folder
@@ -836,17 +836,16 @@
 uage%22);%0A
-%09
 %09this.fo
@@ -855,29 +855,31 @@
 rKey = key;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 public Strin
@@ -894,25 +894,24 @@
 derName() %7B%0A
-%09
 %09return this
@@ -919,29 +919,31 @@
 folderName;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 public Strin
@@ -969,25 +969,24 @@
 anguage() %7B%0A
-%09
 %09return this
@@ -1009,21 +1009,23 @@
 nguage;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 public S
@@ -1047,17 +1047,16 @@
 Key() %7B%0A
-%09
 %09return 
@@ -1063,37 +1063,39 @@
 this.folderKey;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 public void setF
@@ -1124,25 +1124,24 @@
 lderName) %7B%0A
-%09
 %09this.folder
@@ -1162,21 +1162,23 @@
 erName;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 public v
@@ -1210,25 +1210,24 @@
 olderKey) %7B%0A
-%09
 %09this.folder
@@ -1239,29 +1239,31 @@
  folderKey;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 public void 
@@ -1289,17 +1289,16 @@
  key) %7B%0A
-%09
 %09this.pa
@@ -1316,13 +1316,15 @@
 ey;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 publ
@@ -1351,17 +1351,16 @@
 ty() %7B %0A
-%09
 %09Entity 
@@ -1430,17 +1430,16 @@
 tKey));%0A
-%09
 %09folder.
@@ -1482,17 +1482,16 @@
 rName);%0A
-%09
 %09folder.
@@ -1557,17 +1557,16 @@
 uage);%0A%0A
-%09
 %09return 
@@ -1573,12 +1573,13 @@
 folder;%0A
-%09
+  
 %7D%0A%7D

Fix spacing