title: How to know if a row exists or not in parse data
body: <p>I pushed an object to parse database.Now I want to push one more data object to the row but I want that if the same set of values already exists than it should not push the object but refresh the object with new values.
  Lets I have 3 colums rollnum,name and city.If the same roll num is pushed,the particular row with available roll number in the parse data will upload the new values.
  I tried this:</p>
  
  <pre><code>        save.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              ParseQuery&lt;ParseObject&gt; query = ParseQuery
                      .getQuery("StudentInfo");
              query.whereEqualTo("rollnum", rollnum.getText()
                      .toString());
              query.whereEqualTo("name", name.getText()
                      .toString());
              query.whereEqualTo("city", city.getText().toString());
              query.getFirstInBackground(new GetCallback&lt;ParseObject&gt;() {
  
                  @Override
                  public void done(ParseObject obj, ParseException e) {
                      if (e == null) {
  
                  Toast.makeText(getApplicationContext(), "This Information already exists..",Toast.LENGTH_LONG).show();
  
                          }
  
                      else{
  
                          obj = new ParseObject(
                                  "StudentInfo");
                          obj.put("rollnum", rollnum.getText()
                                  .toString());
                          obj.put("name",name.getText()
                                  .toString());
                          obj.put("city", city.getText().toString());
                          obj.saveInBackground();
  
  
  
                      }
  
                  }
  
              });
  </code></pre>