package com.palmnest.application.dto;

import java.io.Serializable;

public class CommonDto implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2297598905447289743L;
	
	private Long id;
	private String name;
	
	public CommonDto() {
	}

	
	public CommonDto(Long id, String name) {
		super();
		this.id = id;
		this.name = name;
	}


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof CommonDto) {
			CommonDto d = (CommonDto) obj;
			if(d.getId().equals(id)) {
				return true;
			}
		}
		return super.equals(obj);
	}
	@Override
	public String toString() {
		return "id:" + id +";" + "name :"+name;
	}
}
