/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 */
package jp.co.sint.basic;

import java.util.HashMap;

import jp.co.sint.config.SIConfig;
import jp.co.sint.tools.SIUtil;

import org.apache.log4j.Category;

/**
 * @version $Id: SISrchKey.java,v 1.0 2003/10/23 Exp $
 * @author  Jinwang Chen
* <br>Description:
 * <p>History</p>
 * <p>Author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reason</p>
 *  ============&nbsp;&nbsp;&nbsp;==========&nbsp;&nbsp;===========================<br>
 * Jinwang Chen   2003/10/23 10:27:45  Original
 */
public class SISrchKey extends SIBasic{
  //ログ用のインスタンスの生成
  private static Category log=Category.getInstance(SIConfig.SILOG4J_WEBSHOP_CATEGORY_NAME);
  
  //ショップコード
  private String srchShopCodeSel="";
  
  //ワード
  private String srchWordTxt="";
  
  //ラジオボタン
  private String radioButton ="";
  
  //オプション条件
  private HashMap srchKeyNameMap=new HashMap();
  
  //ブランド
  private String makerTxt="";
  
  public SISrchKey(){}
  
  //setter of ショップコード
  public void setSrchShopCodeSel(String lSrchShopCodeSel){
    if (SIUtil.isNull(lSrchShopCodeSel)) lSrchShopCodeSel="";
    this.srchShopCodeSel=SIUtil.changeTo(lSrchShopCodeSel.trim(),this.encode);
  }
  
  //setter of ワード
  public void setSrchWordTxt(String lSrchWordTxt){
    if (SIUtil.isNull(lSrchWordTxt)) lSrchWordTxt="";
    this.srchWordTxt=SIUtil.changeTo(lSrchWordTxt.trim(),this.encode);
  }
  
  //setter of オプション条件
  public void setSrchKeyNameData(String lSrchKeyName,String lSrchKeyData){
    if (SIUtil.isNull(lSrchKeyData)) lSrchKeyData="";
    srchKeyNameMap.put(lSrchKeyName,SIUtil.changeTo(lSrchKeyData.trim(),this.encode));
  }
  
  //getter of ショップコード
  public String getSrchShopCodeSel(){
    return this.srchShopCodeSel;
  }
  
  //getter of ワード
  public String getSrchWordTxt(){
    return this.srchWordTxt;
  }
  
  //getter of オプション条件
  public String getSrchKeyNameData(String lSrchKeyName){
    if (srchKeyNameMap.get(lSrchKeyName)==null) return "";
    else return (String)srchKeyNameMap.get(lSrchKeyName);
  }
  
  /*
   * getter of makerTxt.
   */
  public String getMakerTxt() {
    return makerTxt;
  }
  
  /*
   * setter of makerTxt
   */
  public void setMakerTxt(String makerTxt) {
    this.makerTxt = makerTxt;
  }
  
  /**
   * @return radioButton を戻します。
   */
  public String getRadioButton() {
    return radioButton;
  }
  /**
   * @param radioButton radioButton を設定。
   */
  public void setRadioButton(String radioButton) {
    if (SIUtil.isNull(radioButton)) radioButton="";
    this.radioButton = radioButton;
  }
}