I have a few questions regarding view criteria's
- After removing few applied view criteria's do I need to executeQuery before applying the same or new view criteria's?
- Also after applying each view criteria, do I need to executeQuery?
- If the first view criteria I want to apply is applied using
testVO.applyViewCriteria(vc);
Do I need to unwanted remove view criteria's before or willapplyViewCriteria(vc)
remove all existing view criteria's?
What I'm trying to do in the below code is to remove any applied view criteria's and then apply new view criteria's that I want to apply.
testVO.getViewCriteriaManager().removeApplyViewCriteriaName("findByvc1");
testVO.getViewCriteriaManager().removeApplyViewCriteriaName("findByvc2");
testVO.getViewCriteriaManager().removeApplyViewCriteriaName("findByvc3");
//testVO.executeQuery();
ViewCriteria vc = testVO.getViewCriteriaManager().getViewCriteria("findByvc1");
VariableValueManager vm = testVO.ensureVariableManager();
vm.setVariableValue("vc1Var", 123);
testVO.applyViewCriteria(vc);
//testVO.executeQuery();
ViewCriteria vc1 = testVO.getViewCriteriaManager().getViewCriteria("findByvc3");
vm.setVariableValue("vc3Var", "test");
testVO.applyViewCriteria(vc1, true);
testVO.executeQuery();