Hello in this video, I will show you another way to set the bind variable. Last video, I'll show you how you can create a Java class and you can add a method and using groovy expression you can set some wind variable like this, this video let us do the same, but in another way since the point variable was another way, so let us remove this okay. So, there is no separation and I need to set it by another way. So, this way is override method. So, let us go to the Java and in the Java class I will generate a view object and Bill key and from the view object embel here, you will find here your parameter as you can see here So, I will override one method here and this method you can set the wind variable. So, to override missile in his view image or any image class in the module you can go to the source and you will find override method or from here straight away you will find override methods.
So, what you can search for the method which which you want to override, so, it is free beer roll set for query beriberi row set for query in this method if you override it Here you can set the bind variable here in this space displace. So, let us now try to set the bind variable here So, I will set it using this object which is over right miss it will receive dot ensure variable manager dot sit in variable value. Okay. And you should see it's a bind variable name, which is the ID bomb This is the variable name and the value or need to get it from the model util we should import model util dot get user data. So I now I will point to this method. Not using graphic submission no but I will override very bad rules.
Sit for query and I will get the bind variable and I will set it here. Both way is okay. I almost use both of both ways. But most of them I override this previous row set for query. This should do the same like what we did here when we point to zap method in the Java class using groovy expression. So let's now try to run this and see if we will receive the same result like we did or not.
So let us run looking. Okay, so let us now to set the department to be 50. And the press login you'll find the department is filtered to 50 If we sit so divorced when to 100. So, in will we will we be filtered by department 100. So this is another way, you can set the bind variable if the bind variable in the view object live in the main query limit, you can set it by any of these two ways, both of ways Okay, you can use any resists both ways. So, in the next video we'll try to go for the view criteria and I will show you how you can set bind variable in their view criteria.
So see you next video.