package com.wasu.cs.model;

import org.json.JSONObject;

/**
 * contain search recommend url & search url
 */
public class SearchConfigModel extends Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1300834365421207609L;

	private String recommendUrl;
	private String searchUrl;

	@Override
	public boolean from(JSONObject json) {
		if (super.from(json)) {
			JSONObject dataObj = json.optJSONObject("data");
			if (null != dataObj) {
				recommendUrl = dataObj.optString("recommendUrl");
				searchUrl = dataObj.optString("searchUrl");
				return true;
			}
		}
		return false;
	}

	public String getRecommendUrl() {
		return recommendUrl;
	}

	public String getSearchUrl() {
		return searchUrl;
	}

}
