package com.vci.client.framework.delegate;
|
|
import com.vci.client.common.objects.UserEntityObject;
|
import com.vci.corba.common.data.UserEntityInfo;
|
|
|
|
/**
|
* <p>Title:UserEntityClientDelegate</p>
|
* <p>Description:用户登录客户端对象</p>
|
* @author wangxl
|
* @time 2011-6-1
|
*
|
*/
|
public class UserEntityClientDelegate {
|
public static UserEntityObject changeUserEntityInfoToEntity(UserEntityInfo info){
|
UserEntityObject obj = new UserEntityObject();
|
obj.setUserName(info.userName);
|
obj.setModules(info.modules);
|
obj.setIp(info.ip);
|
return obj;
|
}
|
public static UserEntityInfo changeUserEntityToInfo(UserEntityObject obj){
|
UserEntityInfo info = new UserEntityInfo();
|
if (obj != null){
|
info.userName = obj.getUserName() == null ? "" : obj.getUserName();
|
info.modules = obj.getModules() == null ? "" : obj.getModules();
|
info.ip = obj.getIp() == null ? "" : obj.getIp();
|
}
|
return info;
|
}
|
}
|