Question: / * * * TODO: Retrieve all pets by their species. * Replace 'FROM Pet' with the necessary query and add Param annotations. 'FROM Pet'

/**
* TODO: Retrieve all pets by their species.
* Replace 'FROM Pet' with the necessary query and add Param annotations. 'FROM Pet' is present to allow the app
* to initially compile.
* @param species
*/
@Query("FROM Pet")
List lab1(@Param("species") String species);
/**
* TODO: Retrieve all pets by either their name OR their age.
* Replace 'FROM Pet' with the necessary query and add Param annotations. 'FROM Pet' is present to allow the app
* to initially compile.
*/
@Query("FROM Pet")
List lab2(@Param("name") String name, @Param("age") int age);
/**
* TODO: Retrieve the AVERAGE age of all pets.
* Replace 'FROM Pet' with the necessary query and add Param annotations. 'FROM Pet' is present to allow the app
* to initially compile.
*/
@Query("FROM Pet")
double lab3();
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!