dve.addViewLink("UiScreenSection", "UiScreen", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("screenId", "screenId")));
dve.addAlias("UiScreen", "screenName", null, null, null, null, null);
dve.addAlias("UiScreenSection", "sectionName", null, null, null, null, null);
EntityCondition condition = new EntityConditionList(UtilMisc.toList(
new EntityExpr("partyId", EntityOperator.EQUALS, "-1"),
new EntityExpr("screenName", EntityOperator.EQUALS, screenName),
new EntityExpr("sectionName", EntityOperator.EQUALS, sectionName)),
EntityOperator.AND);
uiQueryGVL.addAll(EntityHelper.findByCondition( delegator, dve, condition, uiQueryFindOrder ));
// Add all queries tied to the current party ID and screen section.
// select X from ui_query q, ui_screen_section ss, ui_screen s where q.section_id = ss.section_id and q.party_id = <partyId> and ss.section_name = <section_name>
// and s.screen_name = <screenName> and s.screen_id = ss.screen_id order by query_name
condition = new EntityConditionList(UtilMisc.toList(
new EntityExpr("partyId", EntityOperator.EQUALS, partyId),
new EntityExpr("screenName", EntityOperator.EQUALS, screenName),
new EntityExpr("sectionName", EntityOperator.EQUALS, sectionName)),
EntityOperator.AND);
uiQueryGVL.addAll(EntityHelper.findByCondition( delegator, dve, condition, uiQueryFindOrder ));
return uiQueryGVL;