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 import org.opengion.fukurou.util.LogWriter;
019 import org.opengion.fukurou.util.StringUtil;
020
021 import org.opengion.hayabusa.common.HybsSystem;
022 import org.opengion.hayabusa.resource.CodeData;
023
024 /**
025 * ãƒ??ã‚¿ã®ã‚³ãƒ¼ãƒ‰æƒ…å ±ã‚’å–り扱ã?electionクラスã®ã€NULL時オブジェクトã§ã™ã?
026 *
027 * 以å‰ã?ã€Selection オブジェクト㌠null ã®å ´åˆã«ã€NullPointerException ã§
028 * ã?ãªã‚Šã‚¨ãƒ©ãƒ¼ã§åœæ¢ã—ã¦ã?¾ã—ãŸãŒã?ã“ã?ã€NULLセレクションを作æ?ã™ã‚‹ã“ã¨ã§ã€?
029 * å–りã‚ãˆãšã?ã©ã?„ã?жæ³ãªã®ã‹ã?判るよã?«ã—ã¾ã™ã?
030 *
031 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ?
032 * @og.group é¸æŠžãƒ‡ãƒ¼ã‚¿åˆ¶å¾¡
033 *
034 * @version 4.0
035 * @author Kazuhiko Hasegawa
036 * @since JDK5.0,
037 */
038 public class Selection_NULL extends Selection_KEYVAL {
039 private final String errMsg ;
040
041 /**
042 * 引数ã«ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’指定ã—ã¦ä½œæ?ã™ã‚‹ã€ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼
043 *
044 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ?
045 *
046 * @param strCode エラーメãƒ?‚»ãƒ¼ã‚¸æ–?—å?
047 */
048 public Selection_NULL( final String strCode ) {
049 super( null );
050 errMsg = strCode ;
051 }
052
053 /**
054 * åˆæœŸå€¤ãŒé¸æŠžæ¸ˆã¿ã® é¸æŠžè‚¢(オプション)ã‚’è¿”ã—ã¾ã™ã?
055 * ç„¡æ¡ä»¶ã§ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’è¿”ã—ã¾ã™ã?
056 *
057 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ?
058 *
059 * @param selectValue é¸æŠžã•れã¦ã?‚‹å€¤
060 * @param seqFlag シーケンスアクセス機è? [true:ON/false:OFF]
061 * @param useShortLabel ラベル(çŸ)ã‚’ã?ースã¨ã—ãŸã‚ªãƒ—ション表示を行ã†ã‹ã©ã?‹(常ã«false)ã€?
062 *
063 * @return オプションタグ
064 * @see #getOption( String, boolean )
065 */
066 @Override
067 public String getOption( final String selectValue,final boolean seqFlag, final boolean useShortLabel ) {
068 return errMsg + " value=[" + selectValue + "]";
069 }
070
071 /**
072 * é¸æŠžè‚¢(value)ã«å¯¾ã™ã‚‹ãƒ©ãƒ™ãƒ«ã‚’è¿”ã—ã¾ã™ã?
073 * ç„¡æ¡ä»¶ã§ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’è¿”ã—ã¾ã™ã?
074 *
075 * @og.rev 5.7.3.0 (2014/02/07) æ–°è¦è¿½åŠ?
076 *
077 * @param selectValue é¸æŠžè‚¢ã®å€¤
078 * @param flag çŸç¸®ãƒ©ãƒ™ãƒ«ã‚?[true:使用ã™ã‚‹/false:ã—ãªã„](常㫠false)
079 *
080 * @return é¸æŠžè‚¢ã®ãƒ©ãƒ™ãƒ«
081 * @see #getValueLabel( String )
082 */
083 @Override
084 public String getValueLabel( final String selectValue,final boolean flag ) {
085 return errMsg + " value=[" + selectValue + "]";
086 }
087 }