@@ -0,0 +1,1952 @@
+package com.growthpush.model;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport com.growthpush.GrowthPush;%0A%0Apublic class Tag extends Model %7B%0A%0A%09private int tagId;%0A%09private String name;%0A%09private long clientId;%0A%09private String value;%0A%0A%09public Tag() %7B%0A%09%09super();%0A%09%7D%0A%0A%09public Tag(String name, String value) %7B%0A%09%09this();%0A%09%09setName(name);%0A%09%09setValue(value);%0A%09%7D%0A%0A%09public Tag save(GrowthPush growthPush) %7B%0A%0A%09%09Map%3CString, Object%3E params = new HashMap%3CString, Object%3E();%0A%09%09params.put(%22clientId%22, growthPush.getClient().getId());%0A%09%09params.put(%22code%22, growthPush.getClient().getCode());%0A%09%09params.put(%22name%22, name);%0A%09%09params.put(%22value%22, value);%0A%0A%09%09JSONObject jsonObject = post(%22tags%22, params);%0A%09%09if (jsonObject != null)%0A%09%09%09setJsonObject(jsonObject);%0A%0A%09%09return this;%0A%0A%09%7D%0A%0A%09public int getTagId() %7B%0A%09%09return tagId;%0A%09%7D%0A%0A%09public void setTagId(int tagId) %7B%0A%09%09this.tagId = tagId;%0A%09%7D%0A%0A%09public String getName() %7B%0A%09%09return name;%0A%09%7D%0A%0A%09public void setName(String name) %7B%0A%09%09this.name = name;%0A%09%7D%0A%0A%09public long getClientId() %7B%0A%09%09return clientId;%0A%09%7D%0A%0A%09public void setClientId(long clientId) %7B%0A%09%09this.clientId = clientId;%0A%09%7D%0A%0A%09public String getValue() %7B%0A%09%09return value;%0A%09%7D%0A%0A%09public void setValue(String value) %7B%0A%09%09this.value = value;%0A%09%7D%0A%0A%09public JSONObject getJsonObject() %7B%0A%0A%09%09JSONObject jsonObject = new JSONObject();%0A%09%09try %7B%0A%09%09%09jsonObject.put(%22tagId%22, getTagId());%0A%09%09%09jsonObject.put(%22clientId%22, getClientId());%0A%09%09%09jsonObject.put(%22value%22, getValue());%0A%09%09%7D catch (JSONException e) %7B%0A%09%09%7D%0A%0A%09%09return jsonObject;%0A%0A%09%7D%0A%0A%09public void setJsonObject(JSONObject jsonObject) %7B%0A%0A%09%09try %7B%0A%09%09%09if (jsonObject.has(%22tagId%22))%0A%09%09%09%09setTagId(jsonObject.getInt(%22tagId%22));%0A%09%09%09if (jsonObject.has(%22clientId%22))%0A%09%09%09%09setClientId(jsonObject.getLong(%22clientId%22));%0A%09%09%09if (jsonObject.has(%22value%22))%0A%09%09%09%09setValue(jsonObject.getString(%22value%22));%0A%09%09%7D catch (JSONException e) %7B%0A%09%09%09throw new IllegalArgumentException(%22Failed to parse JSON.%22);%0A%09%09%7D%0A%0A%09%7D%0A%0A%7D%0A

Revert "Deleted Tag class."