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 */ 016package org.opengion.hayabusa.resource; 017 018/** 019 * カレンダDBを検索する為の クエリインターフェースです。 020 * 021 * カレンダデータは、DBまたは標準のカレンダより休日を求めることができます。 022 * 023 * @og.rev 3.6.0.0 (2004/09/17) 新規作成 024 * @og.group リソース管理 025 * 026 * @version 4.0 027 * @author Kazuhiko Hasegawa 028 * @since JDK5.0, 029 */ 030public interface CalendarQuery { 031 032 /** 033 * 4つの引数を受け取り、整合性チェックを行います。 034 * 引数は、各クラスによって使用するカラム名(意味)が異なります。 035 * また、すべての引数をチェックするのではなく、クラス毎に、チェックする 036 * カラムの数は、異なります。 037 * ※ 引数が正しくない場合は、HybsSystemException を発行します。 038 * 039 * @param arg1 データベース検索時の第1引数 040 * @param arg2 データベース検索時の第2引数 041 * @param arg3 データベース検索時の第3引数 042 * @param arg4 データベース検索時の第4引数 043 * 044 * @return 入力パラメータに応じた配列文字列(必要分のみ配列化) 045 */ 046 String[] checkArgment( String arg1,String arg2,String arg3,String arg4 ) ; 047 048 /** 049 * データベース検索の為の Select 文を返します。 050 * 引数リストとともに、使用します。 051 * 052 * @return データベース検索の為の Select 文 053 * 054 */ 055 String getQuery() ; 056 057 /** 058 * データベースの持ち方を指定します。 059 * 持ち方がフラット(横持ち=1〜31の日付をカラムで持つ)の場合、trueを返します。 060 * 縦持ち(日付単位で、行情報として持つ)場合は、false です。 061 * 062 * @return DBの持ち方がフラット(横持ち=1〜31の日付をカラムで持つ)の場合、true 063 * 064 */ 065 boolean isFlatTable() ; 066}