📄 contactopportunitylistwep.java
字号:
/*
*
* Copyright (c) 2004 SourceTap - www.sourcetap.com
*
* The contents of this file are subject to the SourceTap Public License
* ("License"); You may not use this file except in compliance with the
* License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
*/
package com.sourcetap.sfa.contact;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.ofbiz.entity.condition.EntityOperator;
import com.sourcetap.sfa.event.GenericWebEventProcessor;
import com.sourcetap.sfa.ui.UIWebScreenSection;
import com.sourcetap.sfa.util.QueryInfo;
/**
* DOCUMENT ME!
*
*/
public class ContactOpportunityListWEP extends GenericWebEventProcessor {
public static final String module = ContactOpportunityListWEP.class.getName();
// overide the default. Link Contact and Deal via the OpportunityContact entity
protected void addUseQueryParameterClauses(
UIWebScreenSection uiWebScreenSection, QueryInfo queryInfo,
List relatedSearchClauses, String primaryEntityName,
HttpServletRequest request) {
HashMap paramMap = uiWebScreenSection.getUseQueryParameterValueMap();
Iterator params = paramMap.entrySet().iterator();
while (params.hasNext()) {
Map.Entry param = (Map.Entry) params.next();
String searchAttribName = (String) param.getKey();
String searchAttribValue = (String) param.getValue();
if (searchAttribName.equals("contactId")) {
queryInfo.addJoin("OpportunityContact", "Deal", Boolean.FALSE, "dealId", "dealId");
queryInfo.addCondition("OpportunityContact", "contactId", EntityOperator.EQUALS, searchAttribValue);
} else {
queryInfo.addCondition( primaryEntityName, searchAttribName, EntityOperator.EQUALS, searchAttribValue);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -