package com.qiyou.mb.android.beans.basic;

import java.util.concurrent.ConcurrentHashMap;

import com.qiyou.mb.android.QiYouConstant;

public class GEOs {

	public GEOs() {
		// TODO Auto-generated constructor stub
	}
	 public ConcurrentHashMap<String,GEO_bean> GEOprovinces = new ConcurrentHashMap<String,GEO_bean>();
	 public ConcurrentHashMap<String,GEO_bean> GEOcities= new ConcurrentHashMap<String,GEO_bean>();
	 public ConcurrentHashMap<String,GEO_bean> GEOdistricts = new ConcurrentHashMap<String,GEO_bean>();
	 public ConcurrentHashMap<String,GEO_bean> GEOstreets = new ConcurrentHashMap<String,GEO_bean>();
	 public ConcurrentHashMap<String,GEO_bean> GEOstreetNos = new ConcurrentHashMap<String,GEO_bean>();
	 
	 public ConcurrentHashMap<String,Integer> provinces = new ConcurrentHashMap<String,Integer>();
	 public ConcurrentHashMap<String,Integer> cities= new ConcurrentHashMap<String,Integer>();
	 public ConcurrentHashMap<String,Integer> districts = new ConcurrentHashMap<String,Integer>();
	 public ConcurrentHashMap<String,Integer> streets = new ConcurrentHashMap<String,Integer>();
	 public ConcurrentHashMap<String,Integer> streetNos = new ConcurrentHashMap<String,Integer>();
	 
	 public void putValues(GEO_bean gb){
		 
		 int id = gb.getId();
		 String name =gb.getName();
	 	  switch (gb.getGeoType()){
	     	  case  QiYouConstant.GEO_PROVINCE: { 
	     		 GEOprovinces.put(name,gb);
	     		 provinces.put(name,id);
	     		  break;
	     	  }
	     	 case  QiYouConstant.GEO_CITY: { 
	     		GEOcities.put(name, gb);
	     	    cities.put(name,id);
	     		  break;
	     	  }
	     	 case  QiYouConstant.GEO_DISTRICT: { 
	     		GEOdistricts.put(name, gb);
	     		 districts.put(name,id);
		     		  break;
		     	  }
	     	case  QiYouConstant.GEO_STREET: { 
	     		GEOstreets.put(name, gb);
	     		 streets.put(name,id);
		     		  break;
		     	  }
	     	case  QiYouConstant.GEO_STREETNO: { 
	     		GEOstreetNos.put(name, gb);
	     		 streetNos.put(name,id);
		     		  break;
		     	  }
	     	  }
	 }
}

