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.fukurou.util.StringUtil;
020
021 /**
022 * カレンãƒ?¼¤?¢(GE13)の検索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 4.0
032 * @author Kazuhiko Hasegawa
033 * @since JDK5.0,
034 */
035 public final class CalendarQuery_GE13 implements CalendarQuery {
036 //* こã?プログラãƒ??VERSIONæ–?—å?を設定しますã? {@value} */
037 private static final String VERSION = "4.0.0.0 (2005/08/31)" ;
038
039 /** カレンãƒ?¼¤?¢の読み込みのクエリー(GE13) {@value} */
040 public static final String QUERY =
041 "select YYYYMM,DY1,DY2,DY3,DY4,DY5,DY6,DY7,DY8,DY9,DY10,"
042 + "DY11,DY12,DY13,DY14,DY15,DY16,DY17,DY18,DY19,DY20,"
043 + "DY21,DY22,DY23,DY24,DY25,DY26,DY27,DY28,DY29,DY30,DY31"
044 + " from GE13 where CDJGS=? and FGJ='1'"
045 + " order by YYYYMM" ;
046
047 /** CDJGS:事業æ‰?‚³ーãƒ?の初期値:{@value} */
048 public static final String DEFAULT_CDJGS = "SYS";
049
050 /**
051 * ?”つの引数を受け取りã?整合æ?チェãƒ?‚¯を行いますã?
052 * 引数は、各クラスによって使用するカラãƒ?��(意味)が異なりますã?
053 * またã?すべての引数をチェãƒ?‚¯するのではなくã?クラス毎に、チェãƒ?‚¯する
054 * カラãƒ??数は、異なりますã?
055 *
056 * @param arg1 ãƒ??タベã?ス検索時ã?第?‘引数(CDJGS:事業æ‰?‚³ーãƒ?
057 * @param arg2 ãƒ??タベã?ス検索時ã?第?’引数(未使用)
058 * @param arg3 ãƒ??タベã?ス検索時ã?第?“引数(未使用)
059 * @param arg4 ãƒ??タベã?ス検索時ã?第?”引数(未使用)
060 *
061 * @return 入力パラメータに応じたé?列文字å?(cdjgs)
062 */
063 public String[] checkArgment( final String arg1,final String arg2,final String arg3,final String arg4 ) {
064 String cdjgs = StringUtil.nval( arg1,DEFAULT_CDJGS );
065 return new String[] { cdjgs } ;
066 }
067
068 /**
069 * ãƒ??タベã?ス検索の為の Select æ–?‚’返しますã?
070 * 引数リストとともに、使用しますã?
071 *
072 * @return ãƒ??タベã?ス検索の為の Select æ–?
073 *
074 */
075 public String getQuery() {
076 return QUERY;
077 }
078
079 /**
080 * ãƒ??タベã?スの持ち方を指定しますã?
081 * 持ち方がフラãƒ?ƒˆ(横持ち=1??1の日付をカラãƒ?�§持つ)の場合ã?trueを返しますã?
082 * 縦持ち(日付単位で、行情報として持つ)場合ã?、false ですã?
083 *
084 * @return DBの持ち方がフラãƒ?ƒˆ(横持ち=1??1の日付をカラãƒ?�§持つ)の場合ã?true
085 *
086 */
087 public boolean isFlatTable() {
088 return true;
089 }
090 }