package com.eactive.eai.adapter.wca.cfg;

import com.eactive.eai.adapter.wca.servlet.TableInfoEx;

/** 
* 1. 기능 : LU 그룹 정보 관리 SQL Query문을 정의한 인터페이스
* 2. 처리 개요 : 
* 3. 주의사항 
*
* @author  : 
* @version : v 1.0.0
* @see     : 관련 기능을 참조
* @since   :  
*/
public interface SessionGroupQueryEx 
{  
    /**
     *  노드 이름에 해당하는 모든 LU 그룹 정보 SELECT QUERY
     */
	/*
    public static final String GET_ALL_ADAPTER  = "SELECT AdptrGstatSevrName, AdptrGroupName, LUGroupName, SoftLinkPortNo, WCASessCnt, " + 
                                                  " BkupAutoCnvsnYn, BkupAdptrGstatSevrName, BkupSoftLinkPortNo, BkupCnvsnBaseObstclRt, " + 
                                                   " LogUseYn, LogLvelName, MaxLogFileVal, SvcToutVal " +
                                                  "FROM " + TableInfoEx.T_LU_GROUP + " where AdptrGstatSevrName=? ";
    */
	
	// 20080827 Start
    /**
     * 노드 이름, 어댑터 그룹 이름에 해당하는 모든 LU 그룹 정보 SELECT QUERY
     */
	/*
    public static final String GET_ADAPTER  = "SELECT AdptrGstatSevrName, AdptrGroupName, LUGroupName, SoftLinkPortNo, WCASessCnt, " + 
                                                  " BkupAutoCnvsnYn, BkupAdptrGstatSevrName, BkupSoftLinkPortNo, BkupCnvsnBaseObstclRt, " + 
                                                  " LogUseYn, LogLvelName, MaxLogFileVal, SvcToutVal, SoftLinkSevrName " +
                                                  "FROM " + TableInfoEx.T_LU_GROUP + " where AdptrGstatSevrName=? AND AdptrGroupName=?";
    */
    public static final String GET_ADAPTER  = "SELECT ADPTRGSTATSEVRNAME, ADPTRGROUPNAME, LUGROUPNAME, SOFTLINKPORTNO, WCASESSCNT, " + 
    											" BKUPAUTOCNVSNYN, BKUPADPTRGSTATSEVRNAME, BKUPSOFTLINKPORTNO, BKUPCNVSNBASEOBSTCLRT, " + 
    											" LOGUSEYN, LOGLVELNAME, MAXLOGFILEVAL, SVCTOUTVAL " +
    											"FROM " + TableInfoEx.T_LU_GROUP + " where ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=?";    
    // 20080827 End
   
    // 20080827 Start
    /**
     * 노드 이름, 어댑터 그룹 이름에 해당하는 모든 LU 그룹 정보 SELECT QUERY
     */   
    public static final String GET_SOFTLINK_NODE_NAME  = "SELECT SNAADPTRSEVRNAME FROM " + TableInfoEx.T_LU_HOST + " where SNAADPTRSEVRIPNAME=?";

    public static final String GET_SOFTLINK_IP_ADDR  = "SELECT SNAADPTRSEVRIPNAME FROM " + TableInfoEx.T_LU_HOST + " where SNAADPTRSEVRNAME=?";    
    // 20080827 End    
    
    // 20080827 Start
    // 20080527 Start 
   /**
    * LU 그룹 정보 INSERT QUERY
    */
    /*
    public static final String INSERT_SESSION_GROUP  =  "INSERT INTO " + TableInfoEx.T_LU_GROUP + 
                                                         " (AdptrGstatSevrName, AdptrGroupName, LUGroupName, SoftLinkPortNo, WCASessCnt, " + 
                                                         " SvcToutVal, DmyMsgSituVal, HostSndmsgRUVal, HostDpstRUVal, UapplIDName, " + 
                                                         " BkupAutoCnvsnYn, BkupCnvsnBaseObstclRt, BkupAdptrGstatSevrName, BkupSoftLinkPortNo,  " + 
                                                         " LogUseYn, LogLvelName, MaxLogFileVal,  "+
                                                         " LUGroupRegiHMS, LUGroupAmndHMS, SoftLinkSevrName )" + 
                                                         "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
    */
    public static final String INSERT_SESSION_GROUP  =  "INSERT INTO " + TableInfoEx.T_LU_GROUP + 
    													" (ADPTRGSTATSEVRNAME, ADPTRGROUPNAME, LUGROUPNAME, SOFTLINKPORTNO, WCASESSCNT, " + 
    													" SVCTOUTVAL, DMYMSGSITUVAL, HOSTSNDMSGRUVAL, HOSTDPSTRUVAL, UAPPLIDNAME, " + 
    													" BKUPAUTOCNVSNYN, BKUPCNVSNBASEOBSTCLRT, BKUPADPTRGSTATSEVRNAME, BKUPSOFTLINKPORTNO,  " + 
    													" LOGUSEYN, LOGLVELNAME, MAXLOGFILEVAL,  "+
    													" LUGROUPREGIHMS, LUGROUPAMNDHMS )" + 
    													"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";    
     // 20080527 End
    // 20080827 End
     
   /**
    * LU 그룹 정보 DELETE QUERY
    */                                           
    public static final String DELETE_SESSION_GROUP  =  "DELETE FROM "+ TableInfoEx.T_LU_GROUP + 
                                                        " WHERE ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=? AND LUGROUPNAME=?";
   /**
    * LU 그룹에 해당하는 모든 LU 정보 DELETE QUERY
    */                                           
    public static final String DELETE_ALL_LU_INFO  =  "DELETE FROM  " + TableInfoEx.T_LU_INFO + 
                                                        " WHERE ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=? AND LUGROUPNAME=? ";
    // 20080827 Start
    // 20080527 Start
   /**
    * LU 그룹 정보 UPDATE QUERY
    */
    /*
    public static final String UPDATE_SESSION_GROUP  =  "UPDATE "+ TableInfoEx.T_LU_GROUP + 
													    " SET SoftLinkPortNo=?, WCASessCnt=?, " + 
													    " SvcToutVal=?, DmyMsgSituVal=?, HostSndmsgRUVal=?, HostDpstRUVal=?, UapplIDName=?, " + 
													    " BkupAutoCnvsnYn=?, BkupCnvsnBaseObstclRt=?, BkupAdptrGstatSevrName=?, BkupSoftLinkPortNo=?,  " +
													    " LogUseYn=?, LogLvelName=?, MaxLogFileVal=?, " + 
													    " LUGroupAmndHMS=?, SoftLinkSevrName=? " + 
													    "WHERE AdptrGstatSevrName=? AND AdptrGroupName=? AND LUGroupName=?";
    */    
    // 20080527 End
    public static final String UPDATE_SESSION_GROUP  =  "UPDATE "+ TableInfoEx.T_LU_GROUP + 
    													" SET SOFTLINKPORTNO=?, WCASESSCNT=?, " + 
    													" SVCTOUTVAL=?, DMYMSGSITUVAL=?, HOSTSNDMSGRUVAL=?, HOSTDPSTRUVAL=?, UAPPLIDNAME=?, " + 
    													" BKUPAUTOCNVSNYN=?, BKUPCNVSNBASEOBSTCLRT=?, BKUPADPTRGSTATSEVRNAME=?, BKUPSOFTLINKPORTNO=?,  " +
    													" LOGUSEYN=?, LOGLVELNAME=?, MAXLOGFILEVAL=?, " + 
    													" LUGROUPAMNDHMS=? " + 
    													"WHERE ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=? AND LUGROUPNAME=?";    
    // 20080827 End
    /**
    * LU 그룹에 속한 lu apply id 변경 & lu 로그 정보 
    */
    public static final String UPDATE_LU_INFO  =  "UPDATE  "+ TableInfoEx.T_LU_INFO + 
                                                  " SET UAPPLIDNAME=?, LOGUSEYN=?, LOGLVELNAME=?, MAXLOGFILEVAL=?,  LUAMNDHMS=? " + 
                                                  " WHERE ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=? AND LUGROUPNAME=?";

    // 20090227 Start
    /**
     * LU 그룹에 속한 lu 로그 정보 
     */
     public static final String UPDATE_LU_INFO_EXCEPT_APPL_ID  =  "UPDATE  "+ TableInfoEx.T_LU_INFO + 
                                                   " SET LOGUSEYN=?, LOGLVELNAME=?, MAXLOGFILEVAL=?,  LUAMNDHMS=? " + 
                                                   " WHERE ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=? AND LUGROUPNAME=?";    
    // 20090227 End
}
