@Override
	public Boolean atualizar(EmpresaBean bean) {
		PreparedStatement ps = null;
		try{
			int updateQuery = 0;
			conn.setAutoCommit(false);
			
			 ps = conn.prepareStatement("UPDATE dig_empresa set razao_Social = ?, cnpj = ?, telefone = ?,"+
						"email = ?, endereco = ?, cidade = ?, estado = ?"+
						"WHERE id_Empresa = ?");
			
			ps.setString(1, bean.getRazaoSocial());
			ps.setString(2, bean.getCnpj());
			ps.setString(3, bean.getTelefone());
			ps.setString(4, bean.geteMail());
			ps.setString(5, bean.getEndereco());
			ps.setString(5, bean.getEndereco());
			ps.setString(6, bean.getCidade());
			ps.setString(7, bean.getEstado());
			ps.setLong(8, bean.getIdEmpresa());
			
			updateQuery = ps.executeUpdate();
			//conn.commit();
			
			if(updateQuery == 1){
				ps = conn.prepareStatement("UPDATE dig_horario_funcionamento set deSegSexta = ?, ateSegSexta = ?, deSabado = ?,"+
							" ateSabado = ?, deDomingo = ?, ateDomingo = ?"+
							" WHERE id_empresa = ?");
				
				ps.setString(1, bean.getHorarioDeSegSexta());
				ps.setString(2, bean.getHorarioAteSegSexta());
				ps.setString(3, bean.getHorarioDeSabado());
				ps.setString(4, bean.getHorarioAteSabado());
				ps.setString(5, bean.getHorarioDeDomingo());
				ps.setString(6, bean.getHorarioAteDomingo());
				ps.setLong(7, bean.getIdEmpresa());
				
				updateQuery = ps.executeUpdate();
				
				conn.commit();
				
			}else{
				throw new Exception();
			}
			
			//System.out.println(updateQuery);
			
		}catch(SQLException sql){
			sql.printStackTrace();
			return false;
		}catch(Exception e){
			e.printStackTrace();
			return false;
		}finally{
			try {
				ps.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
			this.fecharConexao();
		}		
		
		return true;
	}