Iterator uiScreenSectionEntityI = uiWebScreenSection.getUiScreenSectionEntityList()
.iterator();
uiScreenSectionEntityI.next(); // Pass up the primary entity.
while (uiScreenSectionEntityI.hasNext()) {
UIScreenSectionEntity uiScreenSectionEntity = (UIScreenSectionEntity) uiScreenSectionEntityI.next();
relatedSearchClauses.add(uiScreenSectionEntity);
}
uiScreenSectionEntityI = null; // Reset the iterator.
switch (retrieveMethod) {
case GenericEventProcessor.RETRIEVE_METHOD_ALL:
// Find all entities of this type.
// Don't need to populate the fields map.
break;
case GenericEventProcessor.RETRIEVE_METHOD_AND:
// Find the main entity(ies) by building a WHERE clause using "=" and AND.
throw new GenericEntityException(
"RETRIEVE_METHOD_AND not implemented yet.");
case GenericEventProcessor.RETRIEVE_METHOD_CLAUSE:
if (TIMER) {
timer.timerString(1,
"[GenericWebEventProcessor.processRetrieve] Start RETRIEVE_METHOD_CLAUSE");
}
HashMap joinedEntities = new HashMap();
joinedEntities.put(primaryEntityName, "Y");
// Find the main entity(ies) by building a WHERE clause using LIKE and AND, with one or more tables in the FROM clause.
// First join all secondary screen section entities in the WHERE and FROM clauses in case
// we are going to use query values from them.
Iterator relatedClauseI = relatedSearchClauses.iterator();
while (relatedClauseI.hasNext()) {
UIScreenSectionEntity uiScreenSectionEntity = (UIScreenSectionEntity) relatedClauseI.next();
String relationTitle = uiScreenSectionEntity.getRelationTitle();
String relatedEntityName = uiScreenSectionEntity.getUiEntity().getEntityName();
boolean isOuterJoin = uiScreenSectionEntity.getIsOuterJoined();
String relatedAndFields = uiScreenSectionEntity.getRelationByAndFields();
Debug.logVerbose("Adding relation clauses for " +
relationTitle + "/" + relatedEntityName, module);
eventProcessor.addOneRelationClause(delegator, relationTitle, relatedAndFields,