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.hayabusa.db; 017 018 /** 019 * ãƒ??ã‚¿ã®ã‚³ãƒ¼ãƒ‰æƒ…å ±ã‚’å–り扱ã?electionクラスã®ã€NULL時オブジェクトã§ã™ã? 020 * 021 * 以å‰ã?ã€Selection オブジェクト㌠null ã®å ´åˆã«ã€NullPointerException ã§ 022 * ã?ãªã‚Šã‚¨ãƒ©ãƒ¼ã§åœæ¢ã—ã¦ã?¾ã—ãŸãŒã?ã“ã?ã€NULLセレクションを作æ?ã™ã‚‹ã“ã¨ã§ã€? 023 * å–りã‚ãˆãšã?ã©ã?„ã?жæ³ãªã®ã‹ã?判るよã?«ã—ã¾ã™ã? 024 * 025 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ? 026 * @og.rev 5.7.7.1 (2014/06/13) Selectionオブジェクトã?基本実è£?¨ã—ã¾ã™ã? 027 * @og.group é¸æŠžãƒ‡ãƒ¼ã‚¿åˆ¶å¾¡ 028 * 029 * @version 4.0 030 * @author Kazuhiko Hasegawa 031 * @since JDK5.0, 032 */ 033 // public class Selection_NULL extends Selection_KEYVAL { 034 public class Selection_NULL implements Selection { 035 private final String initMsg ; 036 037 /** 038 * ãƒ?ƒ•ォルトコンストラクター 039 * 継承å…??クラスã‹ã‚‰ã€å‘¼ã³å‡ºã•ã›ã‚‹ã‚ˆã?«ã€ä½œæ?ã—ã¦ãŠãã¾ã™ã? 040 * 041 * @og.rev 5.7.7.1 (2014/06/13) æ–°è¦è¿½åŠ? 042 */ 043 public Selection_NULL() { initMsg = null; } 044 045 /** 046 * 引数ã«åˆæœŸãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’指定ã—ã¦ä½œæ?ã™ã‚‹ã€ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ 047 * 048 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ? 049 * 050 * @param strCode åˆæœŸãƒ¡ãƒ?‚»ãƒ¼ã‚¸æ–?—å? 051 */ 052 public Selection_NULL( final String strCode ) { 053 // super( null ); 054 initMsg = strCode ; 055 } 056 057 /** 058 * åˆæœŸå€¤ãŒé¸æŠžæ¸ˆã¿ã® é¸æŠžè‚¢(オプション)ã‚’è¿”ã—ã¾ã™ã? 059 * ã“ã?オプションã¯ã€å¼•æ•°ã®å€¤ã‚’å?期å?ã¨ã™ã‚‹ã‚ªãƒ—ションタグを返ã—ã¾ã™ã? 060 * ã“ã?メソãƒ?ƒ‰ã§ã¯ã€ãƒ©ãƒ™ãƒ«(çŸ)ãŒè¨å®šã•れã¦ã?‚‹å ´åˆã§ã‚‚ã?ã“れを使用ã›ãšã«å¿?šãƒ©ãƒ™ãƒ«(é•·)を使用ã—ã¾ã™ã? 061 * 062 * @og.rev 5.7.7.1 (2014/06/13) æ–°è¦è¿½åŠ? 063 * 064 * @param selectValue é¸æŠžã•れã¦ã?‚‹å€¤ 065 * @param seqFlag シーケンスアクセス機è? [true:ON/false:OFF] 066 * 067 * @return オプションタグ 068 * @see #getOption( String, boolean, boolean ) 069 */ 070 @Override 071 public String getOption( final String selectValue,final boolean seqFlag ) { 072 return getOption( selectValue, seqFlag, false ); 073 } 074 075 /** 076 * åˆæœŸå€¤ãŒé¸æŠžæ¸ˆã¿ã® é¸æŠžè‚¢(オプション)ã‚’è¿”ã—ã¾ã™ã? 077 * ç„¡æ¡ä»¶ã§ã€å?期メãƒ?‚»ãƒ¼ã‚¸ã‚’è¿”ã—ã¾ã™ã? 078 * 079 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ? 080 * 081 * @param selectValue é¸æŠžã•れã¦ã?‚‹å€¤ 082 * @param seqFlag シーケンスアクセス機è? [true:ON/false:OFF] 083 * @param useShortLabel ラベル(çŸ)ã‚’ã?ースã¨ã—ãŸã‚ªãƒ—ション表示を行ã†ã‹ã©ã?‹(常ã«false)ã€? 084 * 085 * @return オプションタグ 086 * @see #getOption( String, boolean ) 087 */ 088 @Override 089 public String getOption( final String selectValue,final boolean seqFlag, final boolean useShortLabel ) { 090 return initMsg + " value=[" + selectValue + "]"; 091 } 092 093 /** 094 * åˆæœŸå€¤ãŒé¸æŠžæ¸ˆã¿ã® é¸æŠžè‚¢(オプション)ã‚’è¿”ã—ã¾ã™ã? 095 * ã“ã?オプションã¯ã€å¼•æ•°ã®å€¤ã‚’å?期å?ã¨ã™ã‚‹ã‚ªãƒ—ションタグを返ã—ã¾ã™ã? 096 * ※ ã“ã?クラスã§ã¯å®Ÿè£?•れã¦ã?¾ã›ã‚“ã€? 097 * 098 * @param name ラジオ㮠name 099 * @param selectValue é¸æŠžã•れã¦ã?‚‹å€¤ 100 * @param useLabel ãƒ©ãƒ™ãƒ«è¡¨ç¤ºã®æœ‰ç„¡ [true:æœ?false:ç„¡] 101 * 102 * @return オプションタグ 103 */ 104 @Override 105 public String getRadio( final String name,final String selectValue,final boolean useLabel ) { 106 String errMsg = "ã“ã?クラスã§ã¯å®Ÿè£?•れã¦ã?¾ã›ã‚“ã€?; 107 throw new UnsupportedOperationException( errMsg ); 108 } 109 110 /** 111 * åˆæœŸå€¤ãŒé¸æŠžæ¸ˆã¿ã® é¸æŠžè‚¢(オプション)ã‚’è¿”ã—ã¾ã™ã? 112 * ã“ã?オプションã¯ã€å¼•æ•°ã®å€¤ã‚’å?期å?ã¨ã™ã‚‹ã‚ªãƒ—ションタグを返ã—ã¾ã™ã? 113 * ※ ã“ã?クラスã§ã¯å®Ÿè£?•れã¦ã?¾ã›ã‚“ã€? 114 * 115 * @param selectValue é¸æŠžã•れã¦ã?‚‹å€¤ 116 * 117 * @return オプションタグ 118 */ 119 @Override 120 public String getRadioLabel( final String selectValue ) { 121 String errMsg = "ã“ã?クラスã§ã¯å®Ÿè£?•れã¦ã?¾ã›ã‚“ã€?; 122 throw new UnsupportedOperationException( errMsg ); 123 } 124 125 /** 126 * é¸æŠžè‚¢(value)ã«å¯¾ã™ã‚‹ãƒ©ãƒ™ãƒ«ã‚’è¿”ã—ã¾ã™ã? 127 * é¸æŠžè‚¢(value)ãŒã?å˜åœ¨ã—ãªã‹ã£ãŸå?åˆã?ã€?¸æŠžè‚¢ãã?ã‚‚ã?ã‚’è¿”ã—ã¾ã™ã? 128 * getValueLabel( XX ) ã¯ã€getValueLabel( XX,false ) ã¨åŒã˜ã§ã™ã? 129 * 130 * @param selectValue é¸æŠžè‚¢ã®å€¤ 131 * 132 * @return é¸æŠžè‚¢ã®ãƒ©ãƒ™ãƒ« 133 * @see #getValueLabel( String,boolean ) 134 */ 135 @Override 136 public String getValueLabel( final String selectValue ) { 137 return getValueLabel( selectValue,false ); 138 } 139 140 /** 141 * é¸æŠžè‚¢(value)ã«å¯¾ã™ã‚‹ãƒ©ãƒ™ãƒ«ã‚’è¿”ã—ã¾ã™ã? 142 * ç„¡æ¡ä»¶ã§ã€å?期メãƒ?‚»ãƒ¼ã‚¸ã‚’è¿”ã—ã¾ã™ã? 143 * 144 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ? 145 * 146 * @param selectValue é¸æŠžè‚¢ã®å€¤ 147 * @param flag çŸç¸®ãƒ©ãƒ™ãƒ«ã‚?[true:使用ã™ã‚‹/false:ã—ãªã„](常㫠false) 148 * 149 * @return é¸æŠžè‚¢ã®ãƒ©ãƒ™ãƒ« 150 * @see #getValueLabel( String ) 151 */ 152 @Override 153 public String getValueLabel( final String selectValue,final boolean flag ) { 154 return initMsg + " value=[" + selectValue + "]"; 155 } 156 157 /** 158 * マルãƒã?ã‚ーセレクトを使用ã™ã‚‹ã‹ã©ã?‹ã‚’è¿”ã—ã¾ã™ã? 159 * true?šä½¿ç”¨ã™ã‚‹ã€‚false:使用ã—ãªã?ã§ã™ã? 160 * ãŸã ã—ã?実際ã«ä½¿ç”¨ã™ã‚‹ã‹ã©ã?‹ã¯ã€HTMLå‡ºåŠ›æ™‚ã«æ±ºã‚ã‚‹ã“ã¨ãŒå?æ¥ã¾ã™ã? 161 * ã“ã“ã§ã¯ã€USE_MULTI_KEY_SELECT ã?true ã§ã€USE_SIZE(=20)以上ã?å ´åˆã« 162 * true ã‚’è¿”ã—ã¾ã™ã? 163 * 164 * ※ ã“ã“ã§ã¯ã€å¸¸ã« false ã‚’è¿”ã—ã¾ã™ã? 165 * 166 * @return é¸æŠžãƒªã‚¹ãƒˆã§ã€ã?ルãƒã?ã‚ーセレクトを使用ã™ã‚‹ã‹ã©ã?‹(true:使用ã™ã‚‹) 167 */ 168 @Override 169 public boolean useMultiSelect() { 170 return false; 171 } 172 173 /** 174 * オブジェクトã?ã‚ャãƒ?‚·ãƒ¥ãŒæ™‚é–“å?れã‹ã©ã?‹ã‚’è¿”ã—ã¾ã™ã? 175 * ã‚ャãƒ?‚·ãƒ¥ãŒæ™‚é–“å?ã‚?無効)ã§ã‚れã°ã€true ã‚’ã?有効ã§ã‚れã°ã€? 176 * false ã‚’è¿”ã—ã¾ã™ã? 177 * 178 * ※ ã“ã“ã§ã¯ã€å¸¸ã« false ã‚’è¿”ã—ã¾ã™ã? 179 * 180 * @return ã‚ャãƒ?‚·ãƒ¥ãŒæ™‚é–“å?れãªã‚?true 181 */ 182 @Override 183 public boolean isTimeOver() { 184 return false; 185 } 186 }