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    
021    /**
022     * カレンãƒ?¼¤?¢(WI008)ã®æ¤œç´¢QUERYを定義ã—ãŸã‚¯ãƒ©ã‚¹ã§ã™ã?
023     *
024     * QUERY ã¯ã€ã“ã®ã‚ªãƒ–ジェクトをã€toString() ã—ã¦æ±‚ã‚ã‚‹ã“ã¨ã¨ã—ã¾ã™ã?
025     * 本æ¥ã¯ã€ã“れらã®ã‚¯ãƒ©ã‚¹ã®å…±é€šã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを作æ?ã—ã¦ã€getQuery() ãªã©ã®ãƒ¡ã‚½ãƒ?ƒ‰ã‚?
026     * 介ã—ã¦å–å¾—ã™ã¹ãã§ã™ãŒã€Object ã®å…±é€šã‚¯ãƒ©ã‚¹ã‚’利用ã™ã‚‹ã“ã¨ã¨ã—ã¾ã™ã?
027     *
028     * @og.rev 3.6.0.0 (2004/09/17) æ–°è¦ä½œæ?
029     * @og.group リソース管ç?
030     *
031     * @version  0.9.0  2000/10/17
032     * @author   Kazuhiko Hasegawa
033     * @since    JDK5.0,
034     */
035    public final class CalendarQuery_WI008 implements CalendarQuery {
036            //* ã“ã?プログラãƒ??VERSIONæ–?­—å?を設定ã—ã¾ã™ã?       {@value} */
037            private static final String VERSION = "4.0.0.0 (2005/08/31)" ;
038    
039            /** カレンãƒ?¼¤?¢ã®èª­ã¿è¾¼ã¿ã®ã‚¯ã‚¨ãƒªãƒ¼(WI008) {@value} */
040            public static final String QUERY =
041                                    "select YMD,HOL"
042                                    + " from WI008 where CDKT=?"
043                                    + " order by YMD" ;
044    
045            /**
046             * ?”ã¤ã®å¼•æ•°ã‚’å—ã‘å–りã?æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
047             * 引数ã¯ã€å„クラスã«ã‚ˆã£ã¦ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ?(æ„味)ãŒç•°ãªã‚Šã¾ã™ã?
048             * ã¾ãŸã?ã™ã¹ã¦ã®å¼•æ•°ã‚’ãƒã‚§ãƒ?‚¯ã™ã‚‹ã®ã§ã¯ãªãã?クラス毎ã«ã€ãƒã‚§ãƒ?‚¯ã™ã‚‹
049             * カラãƒ??æ•°ã¯ã€ç•°ãªã‚Šã¾ã™ã?
050             * å¼•æ•°ãŒæ­£ã—ããªã??åˆã?ã€HybsSystemException を発行ã—ã¾ã™ã?
051             *
052             * @param       arg1    ãƒ??タベã?ス検索時ã?第?‘引数(CDKT:å·¥ç¨?
053             * @param       arg2    ãƒ??タベã?ス検索時ã?第?’引数(未使用)
054             * @param       arg3    ãƒ??タベã?ス検索時ã?第?“引数(未使用)
055             * @param       arg4    ãƒ??タベã?ス検索時ã?第?”引数(未使用)
056             *
057             * @return      入力パラメータã«å¿œã˜ãŸé?列文字å?(cdkt)
058             * @throws HybsSystemException CDKT(å·¥ç¨? ãŒè¨­å®šã•れã¦ã?ªã??åˆã?
059             */
060            public String[] checkArgment( final String arg1,final String arg2,final String arg3,final String arg4 ) {
061                    String cdkt = arg1;
062    
063                    if( cdkt == null || cdkt.length() == 0 ) {
064                            String errMsg = "CalendarQuery_WI008 クラスã¯ã€å”¯ä¸??引数 "
065                                                    + "CDKT(å·¥ç¨?を指定ã—ã¦ã€å?期化下ã•ã??" ;
066                            throw new HybsSystemException( errMsg );
067                    }
068                    return new String[] { cdkt } ;
069            }
070    
071            /**
072             * ãƒ??タベã?ス検索ã®ç‚ºã® Select æ–?‚’è¿”ã—ã¾ã™ã?
073             * 引数リストã¨ã¨ã‚‚ã«ã€ä½¿ç”¨ã—ã¾ã™ã?
074             *
075             * @return ãƒ??タベã?ス検索ã®ç‚ºã® Select æ–?
076             *
077             */
078            public String getQuery() {
079                    return QUERY;
080            }
081    
082            /**
083             * ãƒ??タベã?ã‚¹ã®æŒã¡æ–¹ã‚’指定ã—ã¾ã™ã?
084             * æŒã¡æ–¹ãŒãƒ•ラãƒ?ƒˆ(横æŒã¡=1??1ã®æ—¥ä»˜ã‚’カラãƒ?§æŒã¤)ã®å ´åˆã?trueã‚’è¿”ã—ã¾ã™ã?
085             * 縦æŒã¡(日付å˜ä½ã§ã€è¡Œæƒ…å ±ã¨ã—ã¦æŒã¤)å ´åˆã?ã€false ã§ã™ã?
086             *
087             * @return DBã®æŒã¡æ–¹ãŒãƒ•ラãƒ?ƒˆ(横æŒã¡=1??1ã®æ—¥ä»˜ã‚’カラãƒ?§æŒã¤)ã®å ´åˆã?true
088             *
089             */
090            public boolean isFlatTable() {
091                    return false;
092            }
093    }