Hi,
I'm using SmartGWTPower 3.1p.
I'm using a JPADatasource with a bean with a ManyToOne field named 'group'.
My goal is to add an additional Criterion checking if the value of the field 'group' is in a given Set retrieved from the Session. This should apply to all operations (fetch, add, update, delete).
The current approach I'm planning is to extend JPADatasource to override execute(DSRequest) and access HttpSession to get the Set and modify the request's AdvancedCriteria from there. What I can't figure out is how to create the new Criterion and pass the entities to the Criterion. It seems Criterion constructors only take primitive arrays.
Is there a simpler or correct way to achieve my goal?
Thanks,
Ech
I'm using SmartGWTPower 3.1p.
I'm using a JPADatasource with a bean with a ManyToOne field named 'group'.
My goal is to add an additional Criterion checking if the value of the field 'group' is in a given Set retrieved from the Session. This should apply to all operations (fetch, add, update, delete).
The current approach I'm planning is to extend JPADatasource to override execute(DSRequest) and access HttpSession to get the Set and modify the request's AdvancedCriteria from there. What I can't figure out is how to create the new Criterion and pass the entities to the Criterion. It seems Criterion constructors only take primitive arrays.
Is there a simpler or correct way to achieve my goal?
Thanks,
Ech
Comment