Hi guys, in this lesson, we will create our requester class for cruise and transaction. To do it first of all, let's create a new package under our main package. Our package name V equals three. On the requester package, we will create the poster interface. Course repository will extend GPA the poster GPA repository is an abstract class implemented by sibling GPA repository. With GP repository sibling will handle basic database operations Automatically like save, update find by ID delete etc.
GP repository has two generic parameters first parameter is for the model class. second parameter is for the ID class off model class. So our model class will be course and our ID class will be long. Our secondary poster class will be transaction repository. Transaction repository will extend GP repository GPT poster has two generic parameters. first parameter is for the model class.
Second parameter is for the ID class of model class. So our model class will be transaction and Id class me luck. Okay, now we can create queries in transaction repository. Our first query will be finding transactions according to user ID. We know that user ID is a field of transaction table. So in GP repository, we can find it with using find by plus, give me so in our case, we can find it like pint all by us in it.
And our parameter will be user ID Our second query we'll be finding transactions according to course ID. Okay, that's all about transaction repository implementations. Thank you.