Last active
September 4, 2015 04:00
-
-
Save cosbor11/8f3268b973accf3524d7 to your computer and use it in GitHub Desktop.
onyx query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Execute a query to see your entity in the collection | |
QueryCriteria criteria = new QueryCriteria("firstName", QueryCriteriaOperator.EQUAL, "Michael"); | |
Query query = new Query(Person.class, criteria); | |
query.setMaxResults(20); | |
List<Person> people = manager.executeQuery(query); | |
//There should be 1 person in the list named "Michael" | |
System.out.println("records returned: " + people.size()); | |
System.out.println("first person in the list: " + people.get(0).getFirstName() + " " + people.get(0).getLastName()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment