⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 companyutil.java

📁 j2ee源码
💻 JAVA
字号:
package com.leeman.wkexs.master.company.web;

import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;

import com.leeman.common.util.EjbGetter;
import com.leeman.common.web.ui.ScreenOption;

import com.leeman.wkexs.web.base.*;
import com.leeman.wkexs.web.base.BaseAction; 
import com.leeman.wkexs.master.company.entity.*;
import com.leeman.wkexs.master.company.handler.*;


public class CompanyUtil{
		
	public static ArrayList getCompanyList(CompanySO companySO) throws Exception
	{
		return getCompanyList(companySO, false);
	}
	
	public static ArrayList getCompanyListWithBlank(CompanySO companySO) throws Exception
	{
		return getCompanyList(companySO, true);
	}

	public static ArrayList getCompanyList(CompanySO companySO, boolean withblank) throws Exception
	{				
		CompanyHandler handler = getCompanyHandler();
		ArrayList list = handler.getList(companySO, 0, 0);
		
		ArrayList resultList = new ArrayList();
		if(withblank)
		{
			resultList.add(new ScreenOption("",""));
		}
		for(int i=0; i<list.size(); i++)
		{
			CompanyVO tempVO = (CompanyVO)list.get(i);
			resultList.add(new ScreenOption(tempVO.getCompany_id(),tempVO.getCompany_id()));			
		}
		handler.remove();
		return resultList;
	}	
		
	public static CompanyHandler getCompanyHandler() throws Exception
	{
		CompanyHandlerHome home = (CompanyHandlerHome)EjbGetter.getEJBHome(CompanyHandler.JNDINAME, CompanyHandlerHome.class);
		CompanyHandler usersHandler = home.create();
		return usersHandler;
	}	
	
	public static ArrayList getActiveCompanyList() throws Exception
	{				
		CompanyHandler handler = getCompanyHandler();
		ArrayList list = handler.getList();
		
		ArrayList resultList = new ArrayList();
		for(int i=0; i<list.size(); i++)
		{
			CompanyVO tempVO = (CompanyVO)list.get(i);
			resultList.add(new ScreenOption(tempVO.getCompany_id(),tempVO.getCompany_id()));			
		}
		handler.remove();
		return resultList;
	}	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -