public int inserir(Funcionario f){
        Connection conn = null;
        PreparedStatement pstm = null;
        int retorno = -1;
        try{
            conn = ConnectionFactory.getConnection();
            pstm = conn.prepareStatement(INSERT, Statement.RETURN_GENERATED_KEYS);
            pstm.setString(1, f.getNome());
            pstm.setString(2, f.getTelefone());
            pstm.setString(3, f.getBairro());
            pstm.setString(4, f.getRg());
            pstm.setString(5, f.getCidade());
            pstm.setString(6, f.getEndereco());
            pstm.setString(7, f.getCpf());
            pstm.setDouble(8, f.getSalario());
            pstm.setString(9, f.getFuncao());
            pstm.setString(10, f.getCtps());
            pstm.setInt(11, f.getLOJA_id_loja());
            pstm.setInt(12, f.getUSUARIO_id_usuario());
            pstm.execute();
            try(ResultSet rs = pstm.getGeneratedKeys()){
                if(rs.next()){
                    retorno = rs.getInt(1);
                }
            }
        }catch(Exception e){
            JOptionPane.showMessageDialog(null,"Erro ao adicionar um cadastro "+ e);
        }finally{
            try{
                ConnectionFactory.closeConnection(conn, pstm);
            }catch (Exception e){
               JOptionPane.showMessageDialog(null,"Erro ao desconectar com o banco " + e);
            }
        }
        return retorno;
    }