私有方法三

 /**
     * @author : lKF35745
     * @version: 1.0
     * <p>时间 : 2011-1-7</p>
     * <p>描述 : 获取子会议的上级会议ID</p>
     * <p>Copyright 1988-2005, Huawei Tech. Co., Ltd.</p>
     * @param conferenceID 子会议ID
     * @return 上级会议ID
     */
    protected String findParentConferenceID(String conferenceID,
            CascadeTopoTree cascadeTree)
    {
        if (logger.isDebugEnabled())
        {
            logger.debug("beagin to findParentConferenceID and param is "
                    + conferenceID);
        }
        
        if (null == conferenceID)
        {
            logger.warn("conferenceID is null");
        }
        //得到拓扑树对象
        CascadeTopoTree cascadeTopoTree = cascadeTree;
        
        //查询该子会议是否在
        SubConferenceNode subConferenceNode = cascadeTopoTree
                .findSubConferenceNode(conferenceID);
        
        if (null == subConferenceNode)
        {
            logger.warn("this conferenceID is not in  CascadeTopoTree.");
            return null;
        }
        //上级会议ID临时变量
        String parentConferenceID = null;
        
        //得到子会议的上级会议ID
        SubConferenceNode parentConferenceNode = subConferenceNode
                .getParentConferenceNode();
        
        //如果子会议ID为空说明是顶级会议
        if (null == parentConferenceNode)
        {
            return parentConferenceID;
        }
        
        parentConferenceID = parentConferenceNode.getConferenceID();
        if (logger.isDebugEnabled())
        {
            logger.debug("get parentConferenceNode.getConferenceID() Value is "
                    + parentConferenceID);
        }
        return parentConferenceID;
    }

 

你可能感兴趣的:(方法)