/**
 * 
 */
package org.imirsel.nema.webapp.json;

import java.util.HashMap;
import java.util.Map;

import org.imirsel.nema.model.Job;

/**
 * Converter for a  {@link Job} to (key, value) pairs for Json rendering. 
 * @author gzhu1
 * 
 */
public class ConverterToMapJob implements ConverterToMap<Job> {

	@Override
	public Map<String, String> convertToMap(Job job) {
		Map<String, String> map = new HashMap<String, String>();

		JsonHelper helper = new JsonHelper(map);

		helper.addCheckNull(job.getId(), "id");

		helper.addCheckNull(job.getSubmitTimestamp(), "submitTimestamp");
		helper.addCheckNull(job.getScheduleTimestamp(), "scheduleTimestamp");
		helper.addCheckNull(job.getEndTimestamp(), "endTimestamp");
		helper.addCheckNull(job.getUpdateTimestamp(), "updateTimestamp");
		helper.addCheckNull(job.getHost(), "host");
		helper.addCheckNull(job.getName(), "name");
		helper.addCheckNull(job.getPort(), "port");
		helper.addCheckNull(job.getJobStatus().toString(), "status");
		return map;
	}

}

@@ -912,24 +912,77 @@
 ), %22port%22);%0A
+%09%09//now I am free to put any bean. Even not a bean. %0A
 %09%09helper.add
@@ -1013,19 +1013,8 @@
 us()
-.toString()
 , %22s

add some new comments in code