/*****************************************************************************
 ** Copyright (c) 2010 - 2012 Ushahidi Inc
 ** All rights reserved
 ** Contact: team@ushahidi.com
 ** Website: http://www.ushahidi.com
 **
 ** GNU Lesser General Public License Usage
 ** This file may be used under the terms of the GNU Lesser
 ** General Public License version 3 as published by the Free Software
 ** Foundation and appearing in the file LICENSE.LGPL included in the
 ** packaging of this file. Please review the following information to
 ** ensure the GNU Lesser General Public License version 3 requirements
 ** will be met: http://www.gnu.org/licenses/lgpl.html.
 **
 **
 ** If you have questions regarding the use of this file, please contact
 ** Ushahidi developers at team@ushahidi.com.
 **
 *****************************************************************************/
package com.crowdmap.java.sdk.model;

import java.util.Date;

import com.google.gson.annotations.SerializedName;

/**
 * Map Model
 */
public class Map {

	/**
	 * The ID of the map.
	 */
	@SerializedName("map_id")
	private int id;

	@SerializedName("user_id")
	private int userId;

	@SerializedName("media_id_hero")
	private int mediaIdHero;

	private String subdomain;

	private String name;

	@SerializedName("public")
	private int pub;

	private double lat;

	private double lon;

	private int zoom;

	@SerializedName("date_created")
	private Date dateCreated;

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

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public void setMediaIdHero(int mediaIdHero) {
		this.mediaIdHero = mediaIdHero;
	}

	public void setSubdomain(String subdomain) {
		this.subdomain = subdomain;
	}

	public void setPub(int pub) {
		this.pub = pub;
	}

	public void setLat(double lat) {
		this.lat = lat;
	}

	public void setLon(double lon) {
		this.lon = lon;
	}

	public void setZoom(int zoom) {
		this.zoom = zoom;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	
	public void setName(String name) {
		this.name = name;
	}

	public int getId() {
		return id;
	}

	public int getUserId() {
		return userId;
	}

	public int mediaIdHero() {
		return mediaIdHero;
	}

	public String getSubdomain() {
		return subdomain;
	}

	public int getPub() {
		return pub;
	}

	public double getLat() {
		return lat;
	}

	public double getLon() {
		return lon;
	}

	public int getZoom() {
		return zoom;
	}

	public Date getDateCreated() {
		return dateCreated;
	}
	
	public String getName() {
		return name;
	}
	
	//TODO override toString()
}

@@ -1095,24 +1095,57 @@
 te int id;%0A%0A
+%09/**%0A%09 * The ID of the user%0A%09 */%0A
 %09@Serialized
@@ -1248,34 +1248,108 @@
 ;%0A%0A%09
-private String subdomain;%0A
+/**%0A%09 * The subdomain of crowdmap%0A%09 */%0A%09private String subdomain;%0A%0A%09/**%0A%09 * The name of the map%0A%09 */
 %0A%09pr
@@ -1368,16 +1368,18 @@
  name;%0A%0A
+%09%0A
 %09@Serial
@@ -1421,70 +1421,197 @@
 ;%0A%0A%09
-private double lat;%0A%0A%09private double lon;%0A%0A%09private int zoom;%0A
+/**%0A%09 * The latitude%0A%09 */%0A%09private double lat;%0A%0A%09/**%0A%09 * The longitude%0A%09 */%0A%09private double lon;%0A%0A%09/**%0A%09 * The zoom level%0A%09 */%0A%09private int zoom;%0A%0A%09/**%0A%09 * The date the map was created%0A%09 */
 %0A%09@S
@@ -2246,33 +2246,32 @@
 dateCreated;%0A%09%7D%0A
-%09
 %0A%09public void se
@@ -2740,17 +2740,16 @@
 ted;%0A%09%7D%0A
-%09
 %0A%09public
@@ -2790,36 +2790,303 @@
 %0A%09%7D%0A
-%09
 %0A%09
-//TODO override toString()
+@Override%0A%09public String toString() %7B%0A%09%09return %22Map%5Bid:%22 + id + %22, user_id:%22 + userId + %22, media_id_hero:%22%0A%09%09%09%09+ mediaIdHero + %22, subdomain:%22 + subdomain + %22, name:%22 + name%0A%09%09%09%09+ %22, pub:%22 + pub + %22, lat:%22 + lat + %22, lon:%22 + lon + %22, zoom:%22%0A%09%09%09%09+ zoom + %22, date_created:%22 + dateCreated + %22%5D%22;%0A%09%7D
 %0A%7D%0A

Add comments