/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package beans;

/**
 *
 * @author Ivan
 */
public class GradDrzava {
//vracamo u json notaciji {"property": "value"}
    public static String uzmiIzBaze(int zip) {
        switch (zip) {
            case 11000:
                return "{\"city\":\"Beograd\",\"state\":\"Srbija\" }";
            case 21000:
                return "{\"city\":\"Novi Sad\",\"state\":\"Srbija\" }";
            default:
                return "{\"city\":\"Nema podataka\",\"state\":\"Nema podataka\" }";
        }
    }

    public static String uzimiIzBaze2(String zip) {
        if ("11000".equals(zip)) {
            return "{\"city\":\"Beograd\",\"state\":\"Srbija\" }";
        } else {
            return "{\"city\":\"Nema podataka\",\"state\":\"Nema podataka\" }";
        }
    }
}
