useraccountmgrimp.java

来自「《精通SOA:基于服务总线的Struts+EJB+Web Service整合应用」· Java 代码 · 共 48 行

JAVA
48
字号
package com.sample.model.service.imp;

import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.List;
import org.apache.axis.AxisFault;

import javax.xml.rpc.ServiceException;

import com.sample.ejb.sessionbean.ArrayOf_tns2_UserAccountDTO;
import com.sample.ejb.sessionbean.UserAccountMgr;
import com.sample.ejb.sessionbean.UserAccountMgrServiceLocator;
import com.sample.model.service.dto.UserAccountDTO;
import com.sample.model.service.ifc.UserAccountMgrIfc;

public class UserAccountMgrImp implements  UserAccountMgrIfc {
	
	private UserAccountMgr getUserAccountMgr() throws ServiceException
	{
		UserAccountMgrServiceLocator userAccountMgrLocator = new UserAccountMgrServiceLocator();
		UserAccountMgr userAccountMgr = userAccountMgrLocator.getUserAccountMgr();
		return userAccountMgr;
	}
	
	public boolean checkUserLogin(String loginName, String password) throws ServiceException, RemoteException {

		return getUserAccountMgr().checkUserLogin(loginName,password);

	}
	
	public void saveUserInfo(UserAccountDTO userAccountDTO) throws ServiceException, RemoteException {
		getUserAccountMgr().saveUserInfo(userAccountDTO);
	}
	
    public List getUserList() throws ServiceException, RemoteException {
    	
    	ArrayList list = new ArrayList();
		ArrayOf_tns2_UserAccountDTO userAccountArrays = getUserAccountMgr().getUserList();
		UserAccountDTO[] userAccountDTOs = userAccountArrays.getUserAccountDTO();
		
		for (int i=0; i<userAccountDTOs.length; i++) {
			list.add(userAccountDTOs[i]);
			
		}
		return list;
    }
}

⌨️ 快捷键说明

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