package com.vci.common.portal.utils;
|
|
import com.vci.common.utility.ObjectUtility;
|
import com.vci.corba.portal.data.PLCommandParameter;
|
import com.vci.corba.portal.data.PLTabButton;
|
|
|
public class PortalUtil {
|
private static Object lock = new Object();
|
private static PortalUtil instance = null;
|
private PortalUtil(){};
|
public static PortalUtil getInstance(){
|
if(instance == null){
|
synchronized(lock){
|
if(instance == null){
|
instance = new PortalUtil();
|
}
|
}
|
}
|
return instance;
|
}
|
|
/**
|
* 返回克隆的PLTabButton对象
|
* @param tabBtn 源PLTabButton对象
|
* @return 新克隆的PLTabButton对象
|
*/
|
public PLTabButton clonePLTabButton(PLTabButton tabBtn){
|
PLTabButton btn = new PLTabButton();
|
btn.plOId = ObjectUtility.getNewObjectID36();
|
btn.plTableOId = tabBtn.plTableOId;
|
btn.plPageOId = tabBtn.plPageOId;
|
btn.plActionOId = tabBtn.plActionOId;
|
btn.plLabel = tabBtn.plLabel;
|
btn.plAreaType = tabBtn.plAreaType;
|
btn.plDesc = tabBtn.plDesc;
|
btn.plSeq = tabBtn.plSeq;
|
btn.plCreateTime = tabBtn.plCreateTime;
|
btn.plCreateUser = tabBtn.plCreateUser;
|
btn.plModifyTime = tabBtn.plModifyTime;
|
btn.plModifyUser = tabBtn.plModifyUser;
|
btn.plLicensOrs = tabBtn.plLicensOrs;
|
btn.plParentOid = tabBtn.plParentOid;
|
btn.displayMode = tabBtn.displayMode;
|
btn.iconPath = tabBtn.iconPath;
|
btn.authorization = tabBtn.authorization;
|
btn.show = tabBtn.show;
|
return btn;
|
}
|
|
/**
|
* 返回克隆的PLCommandParameter对象
|
* @param cmdPar 源PLCommandParameter对象
|
* @return 新PLCommandParameter对象
|
*/
|
public PLCommandParameter clonePLCommandParameter(PLCommandParameter cmdPar){
|
PLCommandParameter cmd = new PLCommandParameter();
|
cmd.plOId = ObjectUtility.getNewObjectID36();
|
cmd.plCommandOId = cmdPar.plCommandOId;
|
cmd.plKey = cmdPar.plKey;
|
cmd.plValue = cmdPar.plValue;
|
cmd.plCreateTime = cmdPar.plCreateTime;
|
cmd.plCreateUser = cmdPar.plCreateUser;
|
cmd.plModifyTime = cmdPar.plModifyTime;
|
cmd.plModifyUser = cmdPar.plModifyUser;
|
cmd.plLicensOrs = cmdPar.plLicensOrs;
|
return cmd;
|
}
|
}
|