package kr.co.swh.lecture.opensource.gson;

import java.util.ArrayList;
import java.util.List;

import lombok.Data;

/**
 * <pre>
 * kr.co.swh.lecture.opensource.gson
 * Company.java
 *
 * 설명 :GSON 예제
 * 	ref. http://1004lucifer.blogspot.kr/2015/04/javagson-gson-java-json.html
 * </pre>
 * 
 * @since : 2018. 1. 29.
 * @author : tobby48
 * @version : v1.0
 */
@Data
public class Company {
	private String name;
	private List<Person> employees;
	
	public static Company getCompanyDummy() {
		Company company = new Company();
		company.setName("1004lucifer's Company");

		List<Person> personList = new ArrayList<Person>();
		Person person = new Person();
		person.setName("1004lucifer");
		person.setAge("30");
		person.setSex("M");
		personList.add(person);

		person = new Person();
		person.setName("vvoei");
		person.setAge("29");
		person.setSex("M");
		personList.add(person);

		person = new Person();
		person.setName("John");
		person.setSex("M");
		personList.add(person);

		person = new Person();
		person.setName("Jane");
		person.setAge("20");
		personList.add(person);

		person = new Person();
		personList.add(person);

		company.setEmployees(personList);

		return company;
	}
}