Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Fernando Sproviero

+ Follow
since Mar 10, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Fernando Sproviero

Hi, I ended creating a class that implements IDataProvider.
Inside this class I have some properties:
-Service (could also be a DAO)
-filter properties.

And GenericDetachableModel:

When the GenericDataProvider class is constructed, I pass the service (or dao) and the filter params.
Hope this helps.


I'm listing some objects in a page using Dataview, DataProvider and LoadableDetachableModel.
I'm planning to add a form filter with some input boxes and a Filter button.
I was thinking on modifying somehow the DataProvider, and also the dao.
However, I'm not sure what is the best approach to pass the parameters to the DataProvider. Should I use a model?
Please can you advice?


I have a DataProvider that implements IDataProvider, and for example in the size method I need to call the service as follows:

public int size() {
return service.countAllByDomainObjectY(domainObjectY);

DomainObjectX contains a manytoone relationship with DomainObjectY.
So, this countAllByDomainObjectY internally searches by the domainObjectY's id and returns the count of DomainObjectX associated with that specific domainObjectY.

Now, in order to do this I would need to have domainObjectY as a property of the DataProvider which I think it is not good because it would be serialized.

Should I change the service to receive just the domainObjectY's id and only "save" this id as a property of the DataProvider?