001 /* 002 * Copyright (c) 2009 The openGion Project. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016 package org.opengion.plugin.calendar; 017 018 import org.opengion.hayabusa.resource.CalendarQuery; 019 import org.opengion.hayabusa.common.HybsSystemException; 020 import org.opengion.fukurou.util.StringUtil; 021 022 /** 023 * カレンãƒ?¼¤?¢(TP652)ã®æ¤œç´¢QUERYを定義ã—ãŸã‚¯ãƒ©ã‚¹ã§ã™ã? 024 * 025 * QUERY ã¯ã€ã“ã®ã‚ªãƒ–ジェクトをã€toString() ã—ã¦æ±‚ã‚ã‚‹ã“ã¨ã¨ã—ã¾ã™ã? 026 * 本æ¥ã¯ã€ã“れらã®ã‚¯ãƒ©ã‚¹ã®å…±é€šã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを作æ?ã—ã¦ã€getQuery() ãªã©ã®ãƒ¡ã‚½ãƒ?ƒ‰ã‚? 027 * 介ã—ã¦å–å¾—ã™ã¹ãã§ã™ãŒã€Object ã®å…±é€šã‚¯ãƒ©ã‚¹ã‚’利用ã™ã‚‹ã“ã¨ã¨ã—ã¾ã™ã? 028 * 029 * @og.rev 3.6.0.0 (2004/09/17) æ–°è¦ä½œæ? 030 * @og.group リソース管ç? 031 * 032 * @version 4.0 033 * @author Kazuhiko Hasegawa 034 * @since JDK5.0, 035 */ 036 public final class CalendarQuery_TP652 implements CalendarQuery { 037 //* ã“ã?プãƒã‚°ãƒ©ãƒ??VERSIONæ–?—å?ã‚’è¨å®šã—ã¾ã™ã? {@value} */ 038 private static final String VERSION = "4.0.0.0 (2005/08/31)" ; 039 040 /** カレンãƒ?¼¤?¢ã®èªã¿è¾¼ã¿ã®ã‚¯ã‚¨ãƒªãƒ¼(TP652) */ 041 public static final String QUERY = 042 "select YM,DAY1,DAY2,DAY3,DAY4,DAY5,DAY6,DAY7,DAY8,DAY9,DAY10," 043 + "DAY11,DAY12,DAY13,DAY14,DAY15,DAY16,DAY17,DAY18,DAY19,DAY20," 044 + "DAY21,DAY22,DAY23,DAY24,DAY25,DAY26,DAY27,DAY28,DAY29,DAY30,DAY31" 045 + " from TP652 where CDJGB=? and CDKTEI=? and KBCAL='0' and KBREC='1'" 046 + " order by YM" ; 047 048 /** CDJGB:事æ¥éƒ¨ã‚³ãƒ¼ãƒ?ã®åˆæœŸå€¤:{@value} */ 049 public static final String DEFAULT_CDKTEI = "STD"; 050 051 /** 052 * ?”ã¤ã®å¼•æ•°ã‚’å—ã‘å–りã?æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã? 053 * 引数ã¯ã€å„クラスã«ã‚ˆã£ã¦ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ?(æ„味)ãŒç•°ãªã‚Šã¾ã™ã? 054 * ã¾ãŸã?ã™ã¹ã¦ã®å¼•æ•°ã‚’ãƒã‚§ãƒ?‚¯ã™ã‚‹ã®ã§ã¯ãªãã?クラス毎ã«ã€ãƒã‚§ãƒ?‚¯ã™ã‚‹ 055 * カラãƒ??æ•°ã¯ã€ç•°ãªã‚Šã¾ã™ã? 056 * å¼•æ•°ãŒæ£ã—ããªã??åˆã?ã€HybsSystemException を発行ã—ã¾ã™ã? 057 * 058 * @param arg1 ãƒ??タベã?ス検索時ã?第?‘引数(CDJGB:事æ¥éƒ¨ã‚³ãƒ¼ãƒ? 059 * @param arg2 ãƒ??タベã?ス検索時ã?第?’引数(CDKTEI:物件工程コーãƒ? 060 * @param arg3 ãƒ??タベã?ス検索時ã?第?“引数(未使用) 061 * @param arg4 ãƒ??タベã?ス検索時ã?第?”引数(未使用) 062 * 063 * @return 入力パラメータã«å¿œã˜ãŸé?列文å—å?(cdjgb,cdktei) 064 * @throws HybsSystemException CDJGB(事æ¥éƒ¨ã‚³ãƒ¼ãƒ? ãŒè¨å®šã•れã¦ã?ªã??åˆã? 065 */ 066 public String[] checkArgment( final String arg1,final String arg2,final String arg3,final String arg4 ) { 067 String cdjgb = arg1; 068 String cdktei = StringUtil.nval( arg2,DEFAULT_CDKTEI ); 069 070 if( cdjgb == null || cdjgb.length() == 0 ) { 071 String errMsg = "CalendarQuery_TP652 クラスã®ç¬¬ä¸?¼•æ•° " 072 + "CDJGB(事æ¥éƒ¨ã‚³ãƒ¼ãƒ?を指定ã—ã¦ã€å?期化下ã•ã??" ; 073 throw new HybsSystemException( errMsg ); 074 } 075 076 return new String[] { cdjgb,cdktei } ; 077 } 078 079 /** 080 * ãƒ??タベã?ス検索ã®ç‚ºã® Select æ–?‚’è¿”ã—ã¾ã™ã? 081 * 引数リストã¨ã¨ã‚‚ã«ã€ä½¿ç”¨ã—ã¾ã™ã? 082 * 083 * @return ãƒ??タベã?ス検索ã®ç‚ºã® Select æ–? 084 * 085 */ 086 public String getQuery() { 087 return QUERY; 088 } 089 090 /** 091 * ãƒ??タベã?ã‚¹ã®æŒã¡æ–¹ã‚’指定ã—ã¾ã™ã? 092 * æŒã¡æ–¹ãŒãƒ•ラãƒ?ƒˆ(横æŒã¡=1??1ã®æ—¥ä»˜ã‚’カラãƒ?§æŒã¤)ã®å ´åˆã?trueã‚’è¿”ã—ã¾ã™ã? 093 * 縦æŒã¡(日付å˜ä½ã§ã€è¡Œæƒ…å ±ã¨ã—ã¦æŒã¤)å ´åˆã?ã€false ã§ã™ã? 094 * 095 * @return DBã®æŒã¡æ–¹ãŒãƒ•ラãƒ?ƒˆ(横æŒã¡=1??1ã®æ—¥ä»˜ã‚’カラãƒ?§æŒã¤)ã®å ´åˆã?true 096 * 097 */ 098 public boolean isFlatTable() { 099 return true; 100 } 101 }