Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Created April 2, 2017 01:44
Show Gist options
  • Save cosbor11/93afddfebd489117052c57944efc556e to your computer and use it in GitHub Desktop.
Save cosbor11/93afddfebd489117052c57944efc556e to your computer and use it in GitHub Desktop.
Define a Query and Criteria for setting up a Query Change Listener
// Define critiera to match position = QB & isHallOfFame = true
QueryCriteria hallOfFameQuarterbackCriteria = new QueryCriteria("position", QueryCriteriaOperator.EQUAL, "QB")
.and(new QueryCriteria("isHallOfFame", QueryCriteriaOperator.EQUAL, true));
final Query hallOfFameQuarterBackQuery = new Query(Player.class, hallOfFameQuarterbackCriteria);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment