SelectListInputクラスサンプルプログラム


package jp.co.ulsystems.xmldb.input

import javax.servlet.http.HttpServletRequest;

public class SelectListInput {
   private String customer;
   private String title;
   private String location;
   private String charge;

   public void evaluateParams(HttpServletRequest request) throws Exception {
      customer = (String)request.getParameter("customer");
      title = (String)request.getParameter("title");
      location = (String)request.getParameter("location");
      charge = (String)request.getParameter("charge");
   }

   public String createWhere() {
      String where = "";
      //入力された条件からwhrere句の文字列取得
      // 検索条件:お客様名
      if(!customer.equals("")){
         where = " where " + "contains($customer/text(),'" + customer + "')";
      }
      // 検索条件:提案タイトル
      if(!title.equals("")){
         if(where.equals("")){
            where += " where " + "contains($title/text(),'" + title + "')";
         }else{
            where += " and " + "contains($title/text(),'" + title + "')";
         }
      }
      // 検索条件:営業拠点
      if(!location.equals("")){
         if(where.equals("")){
            where += " where " + "contains($location/text(),'" + location + "')";
         }else{
            where += " and " + "contains($location/text(),'" + location + "')";
         }
      }
      // 検索条件:担当営業者
      if(!charge.equals("")){
         if(where.equals("")){
            where += " where " + "contains($charge/text(),'" + charge + "')";
         }else{
            where += " and " + "contains($charge/text(),'" + charge + "')";
         }
      }
      return where;
   }
}

人気記事トップ10

人気記事ランキングをもっと見る

企画広告も役立つ情報バッチリ! Sponsored

現場に即応するオンプレミスの「推論基盤」が、AIモデルを業務の成果につなげる 11月26日 6:30 サーバやOSの保守期限、VMware環境の見直しといった節目に考える、Oracle AI Databaseの次期基盤。オンプレ継続・AWS・OCIそれぞれの特性と留意点を整理するWebセミナー 11月19日 16:00 AIエージェントの“見えないリスク”に備えてアイデンティティを「関係」で統制する 11月17日 6:25 AI生成コードをどう安全に使うか――決定論的検証とAutoFixで築く品質保証ワークフロー 11月16日 6:30 デジタル主権時代、データとモデルの持ち方は企業が主体的に定める 11月13日 6:25 ClickHouse Cloudが実現した広告運用SaaS「ATOM」のデータ基盤革新、パフォーマンスを向上しながら、運用負荷とコストを削減 11月11日 6:20 AIで開発が加速する時代、品質保証はどう変わる? Tricentisが示すAIエージェント活用の実像 11月9日 6:45 悪用までの猶予が「1分」に迫るフロンティアAI時代に開発と本番を貫く脆弱性管理が必要 10月29日 8:30 欧州CRA対応とSBOM運用。AI生成コードのOSS混入問題の対策とは ――スニペット単位で検出する「FossID」「Insignary Clarity」によるSBOM運用 9月16日 6:40 PostgreSQLからTiDBへ、稼働中SaaSで進める段階的DB移行の実践と再設計への展望 9月7日 6:30