public Branch getBranchById(int id)
	{
		Branch brh=null;
		Connection con=null;
		Statement stmt=null;
		
		
		
		try {
			DBconnection dbCon=new DBconnection();
			Class.forName(dbCon.getJDBC_DRIVER());
						
		    con = DriverManager.getConnection(dbCon.getDATABASE_URL(),
				        dbCon.getDB_USERNAME(), dbCon.getDB_PASSWORD());
			
            stmt = con.createStatement();
            ResultSet rs = stmt.executeQuery("Select brh_id, brh_name, brh_address, brh_email, brh_phone, brh_fax, brh_mobile, brh_isactive, brh_activesince, brh_deactivatedsince,city_id  "
                    + "From branch where brh_id="+id);
            
            if (rs.next()) {
                brh = new Branch();
                brh.setId(rs.getInt(1));
                brh.setName(rs.getString(2));
                brh.setAddress(rs.getString(3));
                brh.setEmail(rs.getString(4));
                brh.setPhone(rs.getString(5));
                brh.setFax(rs.getString(6));
                brh.setMobile(rs.getString(7));
                brh.setIsActive(rs.getBoolean(8));
                brh.setActiveSince(rs.getDate(9));
                brh.setDeactivatedSince(rs.getDate(10));
                brh.setCity(rs.getInt(11));
            }
			
			
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return brh;
		
	}