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 LUInfoQueryEx 
{
   /**
    *  노드 이름에 해당하는 LU 정보 SELECT QUERY
    */
    public static final String GET_ALL_LU_INFO  = "SELECT ADPTRGSTATSEVRNAME, ADPTRGROUPNAME, LUGROUPNAME, PUNAME, LUNAME, SNDRCVDSTCD " +
                                                  "FROM " + TableInfoEx.T_LU_INFO + " where ADPTRGSTATSEVRNAME=? " + 
                                                  " ORDER BY ADPTRGSTATSEVRNAME, ADPTRGROUPNAME, LUGROUPNAME ";   
    
    // 20080827 추가 
    /**
     *  노드 이름에 상관없이 모든 LU 정보 SELECT QUERY
     */
     public static final String GET_ALL_NODE_LU_INFO  = "SELECT ADPTRGSTATSEVRNAME, ADPTRGROUPNAME, LUGROUPNAME, PUNAME, LUNAME, SNDRCVDSTCD " +
                                                   		"FROM " + TableInfoEx.T_LU_INFO + 
                                                   		" ORDER BY LUGROUPNAME, ADPTRGSTATSEVRNAME, ADPTRGROUPNAME ";
     // 20080827 Start
    // 20080527 Start
   /**
    *  LU 정보 INSERT QUERY
    */
    /*
    public static final String INSERT_LU_INFO  =  "INSERT INTO "+ TableInfo.T_LU_INFO + 
                                                        " (AdptrGstatSevrName, AdptrGroupName, LUGroupName, PUName, LUName, SndrcvDstcd, UapplIDName, BkupLUYn, " + 
                                                        "  LogUseYn, LogLvelName, MaxLogFileVal, LUInfoRegiHMS, LUAmndHMS )" + 
                                                        "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
    */
     /*
    public static final String INSERT_LU_INFO  =  "INSERT INTO "+ TableInfoEx.T_LU_INFO + 
													    " (AdptrGstatSevrName, AdptrGroupName, LUGroupName, PUName, LUName, SndrcvDstcd, UapplIDName, BkupLUYn, " + 
													    "  LogUseYn, LogLvelName, MaxLogFileVal, LUInfoRegiHMS, LUAmndHMS, RmtLUYn )" + 
													    "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
	*/
    // 20080527 End
     public static final String INSERT_LU_INFO  =  "INSERT INTO "+ TableInfoEx.T_LU_INFO + 
	     												" (ADPTRGSTATSEVRNAME, ADPTRGROUPNAME, LUGROUPNAME, PUNAME, LUNAME, SNDRCVDSTCD, UAPPLIDNAME, BKUPLUYN, " + 
	     												"  LOGUSEYN, LOGLVELNAME, MAXLOGFILEVAL, LUINFOREGIHMS, LUAMNDHMS )" + 
	     												"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";    
    // 20080827 End
    
   /**
    *  LU 정보 DELETE QUERY
    */
    public static final String DELETE_LU_INFO  =  "DELETE FROM "+ TableInfoEx.T_LU_INFO + 
                                                        " WHERE ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=? AND LUGROUPNAME=? " + 
                                                        "  AND PUNAME=? AND LUNAME=?";
    
    /**
    *  LU 정보 UPDATE QUERY
    */
    // 20080827 Start    
    // 20080527 Start
    /*
    public static final String UPDATE_LU_INFO  =  "UPDATE  "+ TableInfo.T_LU_INFO + 
                                                        " SET SndrcvDstcd=?, UapplIDName=?, BkupLUYn =?, " + 
                                                        " LogUseYn=?, LogLvelName=?, MaxLogFileVal=?, LUAmndHMS=? " + 
                                                        "WHERE AdptrGstatSevrName=? AND AdptrGroupName=? AND LUGroupName=? " + 
                                                        "  AND PUName=? AND LUName=?";
    */
    /*
    public static final String UPDATE_LU_INFO  =  "UPDATE  "+ TableInfoEx.T_LU_INFO + 
													    " SET SndrcvDstcd=?, UapplIDName=?, BkupLUYn =?, " + 
													    " LogUseYn=?, LogLvelName=?, MaxLogFileVal=?, LUAmndHMS=?, RmtLUYn=? " + 
													    "WHERE AdptrGstatSevrName=? AND AdptrGroupName=? AND LUGroupName=? " + 
													    "  AND PUName=? AND LUName=?";
    */
    // 20080527 End
    public static final String UPDATE_LU_INFO  =  "UPDATE  "+ TableInfoEx.T_LU_INFO + 
    													" SET SNDRCVDSTCD=?, UAPPLIDNAME=?, BKUPLUYN =?, " + 
    													" LOGUSEYN=?, LOGLVELNAME=?, MAXLOGFILEVAL=?, LUAMNDHMS=? " + 
    													"WHERE ADPTRGSTATSEVRNAME=? AND ADPTRGROUPNAME=? AND LUGROUPNAME=? " + 
    													"  AND PUNAME=? AND LUNAME=?";    
    // 20080827 End    
} 
