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.taglib;
017    
018    import org.opengion.hayabusa.common.HybsSystem;
019    import org.opengion.hayabusa.common.HybsSystemException;
020    import org.opengion.hayabusa.db.DBTableModel;
021    import org.opengion.hayabusa.db.DBTableModelUtil;
022    import org.opengion.hayabusa.db.DBColumn;
023    
024    import static org.opengion.fukurou.util.StringUtil.nval ;
025    
026    import java.util.prefs.Preferences;
027    import java.util.prefs.BackingStoreException;
028    import java.util.Locale ;
029    
030    /**
031     * æŒ?®šã? Windowsレジストリã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã®ã‚¿ã‚°ã§ã?特殊ãªç’°å¢?¨­å®šãŒå¿?¦ã§ã?ã€?
032     *
033     * 検索ã—ãŸçµæžœã¯ã€DBTableModel ã«ã‚»ãƒ?ƒˆã•れるãŸã‚ã?
034     * JDBCQuery ã¨åŒæ§˜ã«ã€viewã‚¿ã‚°ã§è¡¨ç¤ºã•ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã?
035     *
036     * 注æ„1ï¼?
037     *   通常ã§ã‚れã°ã€ä»¥ä¸‹ã??’ã¤ã®ãƒ«ãƒ¼ãƒˆãƒ‘ス以下ã?レジストリã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã?
038     *     HKEY_CURRENT_USER/Software/JavaSoft/Prefs
039     *     HKEY_LOCAL_MACHINE/Software/JavaSoft/Prefs
040     *
041     * 注æ„ï¼’ï¼?
042     *   ルートパスを強制çš?«å¤‰æ›´ã™ã‚‹ç‚ºã€java.util.prefs.WindowsPreferenceクラスã‚?
043     *   ç›´æŽ¥æ›¸ãæ›ãˆãŸã€ogPreferences.jar を用æ„ã—ã¦ã?¾ã™ã?
044     *   ã“れをã?tomcat/endorsed フォルãƒ?«ã‚³ãƒ”ã?ã—ã¦ä½¿ã?¾ã™ã?
045     *   ãã?å ´åˆã?ã€?
046     *     HKEY_CURRENT_USER/Software/Muratec
047     *     HKEY_LOCAL_MACHINE/Software/Muratec
048     *   以下ã??’ã¤ã®ãƒ«ãƒ¼ãƒˆãƒ‘ス以下ã?レジストリã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã?
049     *
050     * @og.formSample
051     * â—å½¢å¼ï¼?lt;og:regQuery baseKey="?¥?¥?¥" ?¥?¥?¥ />
052     * â—body?šãªã?
053     *
054     * â—Tag定義??
055     *   <og:regQuery
056     *       baseKey          â—‹ã?TAG】検索ベã?スキーを設定ã—ã¾ã?HKEY_CURRENT_USER/Software/XXXX ã® XXXX を指定ã—ã¾ã?(å¿??)ã€?
057     *       hkeyType           ã€TAG】HKEY_CURRENT_USER(="user") を読ã‚?‹ã€HKEY_LOCAL_MACHINE(="system") を読ã‚?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:user)ã€?
058     *       key                ã€TAG】検索キーを設定ã—ã¾ã?
059     *       value              ã€TAG】検索ãƒãƒªãƒ¥ãƒ¼ã‚’設定ã—ã¾ã?
060     *       maxRowCount        ã€TAGã€‘ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã®æœ?¤§æ¤œç´¢ä»¶æ•°ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:0[無制é™])
061     *       orderBy            ã€TAG】検索ã—ãŸçµæžœã‚’表示ã™ã‚‹è¡¨ç¤ºé ?‚’ファイル属æ?åã§æŒ?®šã—ã¾ã?
062     *       maxLevel           ã€TAG】検索時ã?æœ?¤§å±•開レベル(0ã¯ç„¡åˆ¶é™?を指定ã—ã¾ã?åˆæœŸå€¤:1)
063     *       like               ã€TAG】キーãŠã‚ˆã³ãƒãƒªãƒ¥ãƒ¼ã«ã¤ã?¦,like 検索を行ã†ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)
064     *       tableId            ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)çµæžœã‚’DBTableModelã«æ›¸ã込んã§ã€sessionã«ç™»éŒ²ã™ã‚‹ã¨ãã?キーを指定ã—ã¾ã?
065     *       command            ã€TAG】コマンãƒ?NEW,RENEW)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:NEW)
066     *       displayMsg         ã€TAGã€‘æ¤œç´¢çµæžœã‚’ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0033[ 件検索ã—ã¾ã—ãŸ])
067     *       notfoundMsg        ã€TAGã€‘æ¤œç´¢çµæžœãŒã‚¼ãƒ­ä»¶ã®å ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ])
068     *       overflowMsg        ã€TAG】オーãƒã?フロー時ã«ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0007)
069     *       scope              ã€TAG】キャãƒ?‚·ãƒ¥ã™ã‚‹å ´åˆã?スコープ[request/page/session/applicaton]を指定ã—ã¾ã?åˆæœŸå€¤:session)
070     *       mainTrans          ã€TAGã€?通常使ã?¾ã›ã‚“)ã‚¿ã‚°ã§å‡¦ç?•れる処ç?Œãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç?‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:false)
071     *       debug              ã€TAG】デãƒãƒƒã‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)
072     *   />
073     *
074     * â—使用ä¾?
075     *    <og:regQuery  debug="false"
076     *        command     = "NEW"                       NEW,RENEW ãŒä½¿ç”¨ã§ãã¾ã™ã?
077     *        baseKey     = "/"                         検索時ã?ベã?スã¨ãªã‚‹ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã‚­ãƒ¼å?
078     *        key         = "driver"                    検索ã—ãŸã?ƒ¬ã‚¸ã‚¹ãƒˆãƒªã‚­ãƒ¼å?åˆæœŸå€¤ã¯å…¨ä»¶)
079     *        value       = "Ne"                        検索ã—ãŸã?ƒ¬ã‚¸ã‚¹ãƒˆãƒªå€¤(åˆæœŸå€¤ã¯å…¨ä»¶)
080     *        maxRowCount = "0"                         æœ?¤§æ¤œç´¢ä»¶æ•°(0ã§ç„¡åˆ¶é™?
081     *        maxLevel    = "0"                         æœ?¤§æ¤œç´¢éšŽå±¤ãƒ¬ãƒ™ãƒ«(0ã§ç„¡åˆ¶é™?
082     *        like        = "true"                      true ã§æ›–昧検索/false ã¯ä¸??検索
083     *    />
084     *
085     * like ã¯ã€key / value を設定ã—ãŸã¨ãã?ã¿æœ‰åйã§ã™ã?ã¾ãŸã?key / value ã‚’ä¸¡æ–¹åŒæ™‚ã«è¨­å®šã—ãŸå?åˆã?ã€?
086     * like 属æ?ã¯ä¸¡æ–¹ã«åŒæ™‚ã«é©ç”¨ã•れã¾ã™ã?
087     *
088     * @og.rev 3.1.0.0 (2003/03/20) Windowsレジストリã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã€RegistryQueryTag.java ã‚’æ–°è¦ã«ä½œæ?ã€?
089     * @og.group ãã?ä»–å?åŠ?
090     *
091     * @version  4.0
092     * @author       Kazuhiko Hasegawa
093     * @since    JDK5.0,
094     */
095    public class RegistryQueryTag extends CommonTagSupport {
096            //* ã“ã?プログラãƒ??VERSIONæ–?­—å?を設定ã—ã¾ã™ã?       {@value} */
097            private static final String VERSION = "5.6.8.2 (2013/09/20)" ;
098    
099            private static final long serialVersionUID = 568220130920L ;
100    
101            /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? æ–°è¦?{@value} */
102            public static final String CMD_NEW       = "NEW" ;
103            /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? 冿¤œç´¢ {@value} */
104            public static final String CMD_RENEW = "RENEW" ;
105            /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ?リスãƒ? */
106            private static final String[] COMMAND_LIST = new String[] { CMD_NEW , CMD_RENEW };
107    
108    //      private static final String PREF_ROOT = "HKEY_CURRENT_USER/Software/Muratec" ;
109    //      private static final String PREF_ROOT = "/Software/" ;
110    
111            private static final String[] COLUMN_KEY = new String[] { "LEBEL","KEY","VALUE","CHILD","PATH" };
112    
113            private String  tableId                 = HybsSystem.TBL_MDL_KEY;                       // session?·?°
114            private String  command                 = CMD_NEW;                                                      // ?º?ï¾ï¾?¾?
115            private String  baseKey                 = null;                                                         // 検索ベã?ス?·?°
116            private String  key                             = null;                                                         // 検索キー
117            private String  value                   = null;                                                         // 検索ãƒãƒªãƒ¥ãƒ¼
118            private int     maxRowCount             = 0;                                                            // æœ?¤§æ¤œç´¢æ•°(0ã¯ç„¡åˆ¶é™?
119            private String  orderBy                 = null;                                                         // ソートé?ç›®
120    //      private String  displayMsg              = "MSG0033";                                            // ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€?
121            private String  displayMsg              = HybsSystem.sys( "VIEW_DISPLAY_MSG" );
122            private String  overflowMsg             = "MSG0007";                                            // æ¤œç´¢çµæžœãŒã?制é™è¡Œæ•°ã‚’è¶?ˆã¾ã—ãŸã®ã§ã€æ®‹ã‚Šã¯ã‚«ãƒ?ƒˆã•れã¾ã—ãŸã€?
123            private String  notfoundMsg             = "MSG0077";                                            // 対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸã€?
124            private int             maxLevel                = 1;                                                            // 下ä½å±¤å±•é–‹æœ?¤§ãƒ¬ãƒ™ãƒ«(0ã¯ç„¡åˆ¶é™?
125            private boolean like                    = false;                                                        // ã‚ã„ã¾ã?¤œç´¢?Œï¾—ク??
126    
127            private int             executeCount    = 0;                                                            // 検索/実行件数
128            private boolean isMainTrans             = true;                                                         // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã?
129            private int             hkeyType                = 0;                                                            // 5.6.8.2 (2013/09/20) 0:HKEY_CURRENT_USER(="user") , 1:HKEY_LOCAL_MACHINE(="system")
130    
131            // 5.6.8.2 (2013/09/20) エラーメãƒ?‚»ãƒ¼ã‚¸ç­‰ã«ä½¿ã?–‡å­—å?
132            private static final String[] HKEY_TYPE = new String[] { "HKEY_CURRENT_USER","HKEY_LOCAL_MACHINE" } ;
133    
134            /**
135             * Taglibã®çµ‚äº?‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doEndTag() ã‚?オーãƒã?ライドã—ã¾ã™ã?
136             *
137             * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€?
138             * @og.rev 3.6.0.8 (2004/11/19) DBTableModel をセーブã™ã‚‹æ™‚ã«ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
139             * @og.rev 4.0.0.0 (2007/10/18) メãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹çµ±å? getResource().getMessage â‡?getResource().getLabel )
140             * @og.rev 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??ã€DBTableModelãŒæ–°è¦ä½œæ?ã•れãŸå?ç?§ã®ã¿è¡Œã†ã€?
141             *
142             * @return      後続å?ç??æŒ?¤º
143             */
144            @Override
145            public int doEndTag() {
146                    debugPrint();           // 4.0.0 (2005/02/28)
147    
148                    if( check( command, COMMAND_LIST ) ) {
149                            useMainTrans( isMainTrans );                    // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã?
150                            startQueryTransaction( tableId );               // 3.6.0.8 (2004/11/19)
151    
152                            DBTableModel table = makeDBTable();
153                            // 3.6.0.8 (2004/11/19) トランザクションãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
154                            if( ! commitTableObject( tableId, table ) ) {
155                                    jspPrint( "RegistryQueryTag Query処ç?Œå‰²ã‚Šè¾¼ã¾ã‚Œã¾ã—ãŸã€?BTableModel ã¯ç™»éŒ²ã—ã¾ã›ã‚“ã€? );
156                                    return (SKIP_PAGE);
157                            }
158    
159    //                      String label  = "";                             // 4.0.0 (2005/11/30) 検索ã—ãªã‹ã£ãŸå?åˆã?
160                            StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_SMALL );
161    
162                            // 実行件数ã®è¡¨ç¤º command="NEW" ã®ã¨ãã?ã¿ã€displayMsg を表示ã•ã›ã¾ã™ã?
163                            // 4.0.0 (2005/11/30) 出力é?ã®å¤‰æ›´ã€‚ä¸?•ªæœ??ã«å‡ºåŠ›ã—ã¾ã™ã?
164    //                      boolean useStatusBar = HybsSystem.sysBool( "VIEW_USE_DISPLAY_MSG" );
165                            if( CMD_NEW.equals( command ) ) {
166    //                              if( useStatusBar && executeCount > 0 && displayMsg != null && displayMsg.length() > 0 ) {
167                                    if( executeCount > 0 && displayMsg != null && displayMsg.length() > 0 ) {
168                                            buf.append( executeCount );
169    //                                      buf.append( getResource().getMessage( displayMsg ) );
170                                            buf.append( getResource().getLabel( displayMsg ) );
171                                            buf.append( HybsSystem.BR );
172                                    }
173                                    else if( executeCount == 0 && notfoundMsg != null && notfoundMsg.length() > 0 ) {
174    //                                      buf.append( getResource().getMessage( notfoundMsg ) );
175                                            buf.append( getResource().getLabel( notfoundMsg ) );
176                                            buf.append( HybsSystem.BR );
177                                    }
178                            }
179    
180                            if( maxRowCount > 0 && maxRowCount <= executeCount ) {
181    //                              buf.append( getResource().getMessage( overflowMsg ) );
182                                    buf.append( getResource().getLabel( overflowMsg ) );
183                                    buf.append( HybsSystem.BR );
184                            }
185    //                      label = buf.toString();
186    
187                            jspPrint( buf.toString() );
188                    }
189    
190                    return(EVAL_PAGE);
191            }
192    
193            /**
194             * タグリブオブジェクトをリリースã—ã¾ã™ã?
195             * キャãƒ?‚·ãƒ¥ã•れã¦å†åˆ©ç”¨ã•れるã?ã§ã€ãƒ•ィールドã?åˆæœŸè¨­å®šã‚’行ã„ã¾ã™ã?
196             *
197             * @og.rev 2.0.0.4 (2002/09/27) カスタãƒ?‚¿ã‚°ã® release() メソãƒ?ƒ‰ã‚’ã?追åŠ?
198             * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€?
199             * @og.rev 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??ã€DBTableModelãŒæ–°è¦ä½œæ?ã•れãŸå?ç?§ã®ã¿è¡Œã†ã€?
200             * @og.rev 5.6.8.2 (2013/09/20) hkeyType 追�
201             *
202             */
203            @Override
204            protected void release2() {
205                    super.release2();
206    
207                    tableId                 = HybsSystem.TBL_MDL_KEY;                       // session?·?°
208                    orderBy                 = null;                                                         // ソートé?ç›®
209                    command                 = CMD_NEW;                                                      // ?º?ï¾ï¾?¾?
210                    baseKey                 = null;                                                         // 検索ベã?ス?·?°
211                    key                             = null;                                                         // 検索キー
212                    value                   = null;                                                         // 5.6.8.2 (2013/09/20) 検索ãƒãƒªãƒ¥ãƒ¼ 入れ忘れ
213                    executeCount    = 0;                                                            // 検索/実行件数
214                    maxRowCount             = 0;                                                            // æœ?¤§æ¤œç´¢æ•°(0ã¯ç„¡åˆ¶é™?
215    //              displayMsg              = "MSG0033";                                            // 件検索ã—ã¾ã—ãŸã€?
216                    displayMsg              = HybsSystem.sys( "VIEW_DISPLAY_MSG" );
217                    overflowMsg             = "MSG0007";                                            // æ¤œç´¢çµæžœãŒã?制é™è¡Œæ•°ã‚’è¶?ˆã¾ã—ãŸã®ã§ã€æ®‹ã‚Šã¯ã‚«ãƒ?ƒˆã•れã¾ã—ãŸã€?
218                    notfoundMsg             = "MSG0077";                                            // 対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸã€?
219                    maxLevel                = 1;                                                            // 下ä½å±¤å±•é–‹æœ?¤§ãƒ¬ãƒ™ãƒ«(0ã¯ç„¡åˆ¶é™?
220                    like                    = false;                                                        // ã‚ã„ã¾ã?¤œç´¢?Œï¾—ク??
221                    isMainTrans             = true;                                                         // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã?
222                    hkeyType                = 0;                                                            // 5.6.8.2 (2013/09/20) 0:HKEY_CURRENT_USER(="user") , 1:HKEY_LOCAL_MACHINE(="system")
223            }
224    
225            /**
226             * レジストリ ã‹ã‚‰ã€å?ã‚’å–りå?ã—ã?DBTableModel を作æ?ã—ã¾ã™ã?
227             *
228             * @og.rev 5.6.8.2 (2013/09/20) hkeyType 追åŠ?«ä¼´ã?„種修正
229             *
230             * @return      ãƒ??ブルモãƒ?ƒ«
231             */
232            private DBTableModel makeDBTable() {
233                    DBTableModel table = DBTableModelUtil.newDBTable();
234                    table.init( COLUMN_KEY.length );
235                    for( int i=0; i<COLUMN_KEY.length; i++ ) {
236                            DBColumn dbColumn = getResource().makeDBColumn( COLUMN_KEY[i] );
237                            table.setDBColumn( i,dbColumn );
238                    }
239    
240                    // 5.6.8.2 (2013/09/20) 0:HKEY_CURRENT_USER(="user") , 1:HKEY_LOCAL_MACHINE(="system")
241    //              Preferences hayabusaRoot = Preferences.userRoot();
242                    Preferences hayabusaRoot = ( hkeyType == 0 ) ? Preferences.userRoot() : Preferences.systemRoot();
243    
244                    try {
245                            if( ! hayabusaRoot.nodeExists( baseKey ) ) {
246                                    String errMsg = "Preferences BaseKey ã?Windows Registry ã«å­˜åœ¨ã—ã¾ã›ã‚“ã§ã—ãŸã€?
247    //                                                              + "[" + PREF_ROOT + baseKey + "]" ;
248    //                                                              + "[" + HKEY_TYPE[hkeyType] + PREF_ROOT + baseKey + "]" ;
249                                                                    + "[" + HKEY_TYPE[hkeyType] + "\\" + hayabusaRoot.absolutePath() + "]" ;
250                                    throw new HybsSystemException( errMsg );
251                            }
252    
253                            showChild( table,hayabusaRoot.node(baseKey),1 );
254                    }
255                    catch(BackingStoreException ex) {
256                            String errMsg = "レジストリ ã‹ã‚‰ã€å?ã‚’å–りå?ã™äº‹ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—ãŸã€?
257    //                                                      + "[" + PREF_ROOT + baseKey + "]" ;             // 5.1.8.0 (2010/07/01) errMsg 修正
258    //                                                      + "[" + HKEY_TYPE[hkeyType] + PREF_ROOT + baseKey + "]" ;
259                                                                    + "[" + HKEY_TYPE[hkeyType] + "\\" + hayabusaRoot.absolutePath() + "]" ;
260                            throw new HybsSystemException( errMsg,ex );             // 3.5.5.4 (2004/04/15) 引数ã®ä¸¦ã³é ?¤‰æ›´
261                    }
262    
263                    return table ;
264            }
265    
266            /**
267             * Preferences ã®å­è¦ç´?‚’検索ã—ã¾ã™ã?
268             *
269             * ã“ã?処ç??ã€å?帰定義ã«ã‚ˆã‚Šã€?šŽå±¤ã‚’é?次下ãŒã£ã¦ã?ã¾ã™ã?
270             * レベル制é™ã?検索æœ?¤§æ•°åˆ¶é™ã?ãƒã‚§ãƒ?‚¯ã‚’行ã£ã¦ã?¾ã™ã?
271             * addTableValue メソãƒ?ƒ‰ã‚’呼ã³å‡ºã—ã¦ã€æ¤œç´¢çµæžœã‚’ã?DBTableModel ã«é ?¬¡è¿½åŠ?—ã¦ã?ã¾ã™ã?
272             *
273             * @og.rev 5.6.8.2 (2013/09/20) BackingStoreException ã‚?throwã—ãªã?§˜ã«ä¿®æ­£
274             *
275             * @param       table   DBTableModelオブジェク�
276             * @param       prefs   Preferencesオブジェク�
277             * @param       lvl             レベル制�
278             */
279            private void showChild( final DBTableModel table,
280                                                            final Preferences prefs,
281    //                                                      final int lvl ) throws BackingStoreException {
282                                                            final int lvl ) {
283    
284                    if( maxRowCount > 0 && maxRowCount <= executeCount ) { return ; }
285                    if( maxLevel > 0 && lvl > maxLevel ) { return; }
286    
287                    String name = null;
288                    try {
289                            String [] child = prefs.childrenNames();
290    
291                            if( child != null && child.length > 0 ) {
292                                    for( int i = 0; i < child.length; i++) {
293                                            name = child[i];
294    
295                                            // name ã«å…¨è§’文字ãŒä½¿ã‚れã¦ã?‚‹å ´åˆã?正常ã«å‡¦ç?§ããªã??ã§ã€Tableã¸ã®æ›¸ãè¾¼ã¿ã?‘行ã„ã¾ã™ã?
296                                            if( isZenkakuName( name ) ) {
297                                                    addTableValue( name,table,prefs,lvl,null,false );
298                                            }
299                                            else {
300                                                    Preferences childPrefs = prefs.node( name.toLowerCase(Locale.JAPAN) );
301    
302                                                    addTableValue( name,table,childPrefs,lvl,null,true );
303                                                    showChild( table,childPrefs,lvl+1 );
304                                            }
305                                    }
306                            }
307                            else {
308                                    showPrefs( table,prefs,lvl );
309                            }
310                    }
311                    // エラーãŒç™ºç”Ÿã—ã¦ã‚‚ã?処ç??継続ã—ã¾ã™ã?
312                    catch( BackingStoreException ex ) {
313                            String errMsg = "BackingStoreエラーãŒç™ºç”Ÿã—ã¾ã—ãŸã€?" + (executeCount+1) + "]"
314                                                    + " key=[" + name + "] "
315                                                    + ex.getMessage() ;
316                            System.out.println( errMsg );
317                            addTableValue( name,table,prefs,lvl,errMsg,false );
318                    }
319                    // エラーãŒç™ºç”Ÿã—ã¦ã‚‚ã?処ç??継続ã—ã¾ã™ã?
320                    catch( RuntimeException ex ) {
321                            String errMsg = "RuntimeExceptionエラーãŒç™ºç”Ÿã—ã¾ã—ãŸã€?" + (executeCount+1) + "]"
322                                                    + " key=[" + name + "] "
323                                                    + ex.getMessage() ;
324                            System.out.println( errMsg );
325                            addTableValue( name,table,prefs,lvl,errMsg,false );
326                    }
327            }
328    
329            /**
330             * レジストリã®ã‚­ãƒ¼æƒ??ãŒã?全角文字をå«ã‚?‹ã‹ã©ã?‹åˆ¤å®šã—ã¾ã™ã?(å«ã‚?ªã‚‰ã?true)ã€?
331             *
332             * name ã«å…¨è§’文字ãŒä½¿ã‚れã¦ã?‚‹å ´åˆã?正常ã«å‡¦ç?§ããªã??ã§ã€åˆ¤å®šã—ã¾ã™ã?
333             *
334             * @param       name    レジストリã®ã‚­ãƒ¼æƒ??
335             * @return      全角文字ãŒä½¿ã‚れã¦ã?‚‹å ´åˆã?true ã‚’è¿”ã—ã¾ã™ã?
336             */
337            private boolean isZenkakuName( final String name ) {
338                    boolean isZenkaku = false;
339                    for( int i=0; i<name.length(); i++ ) {
340                            char ch =name.charAt(i);
341                            if ((ch < 0x0020)||(ch > 0x007f)){
342                                    isZenkaku = true;
343                                    break;
344                            }
345                    }
346                    return isZenkaku;
347            }
348    
349            /**
350             * Preferences ã®å±žæ?を検索ã—ã¾ã™ã?
351             *
352             * addTableValue メソãƒ?ƒ‰ã‚’呼ã³å‡ºã—ã¦ã€æ¤œç´¢çµæžœã‚’ã?DBTableModel ã«é ?¬¡è¿½åŠ?—ã¦ã?ã¾ã™ã?
353             *
354             * @param       table   DBTableModelオブジェク�
355             * @param       prefs   Preferencesオブジェク�
356             * @param       lvl             レベル制�
357             */
358            private void showPrefs( final DBTableModel table,
359                                                            final Preferences prefs,
360                                                            final int lvl ) throws BackingStoreException {
361    
362                    String [] keys = prefs.keys();
363    
364                    if( keys != null ) {
365                            for( int i = 0; i < keys.length; i++) {
366                                    String name = keys[i];
367                                    addTableValue( name,table,prefs,lvl,null,false );
368                            }
369                    }
370            }
371    
372            /**
373             * 検索ã•れã?Preferencesã‚’ã?DBTableModel ã«é ?¬¡è¿½åŠ?—ã¦ã?ã¾ã™ã?
374             *
375             * @param       name    検索キー
376             * @param       table   DBTableModelオブジェク�
377             * @param       prefs   Preferencesオブジェク�
378             * @param       lvl             レベル制�
379             * @param       msg             値ã«ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’書ãè¾¼ã¿ãŸã„å ´å?正常時ãªã‚‰nullã§ã‹ã¾ã‚ãªã?ã€?
380             * @param       flag    true:値ã«ç©ºæ–?­—å?/false:Preferencesã‹ã‚‰ã€æ¤œç´¢ã‚­ãƒ¼ã‚’使用ã—ã¦å€¤ã‚’å–å¾?
381             */
382            private void addTableValue( final String name,
383                                                                    final DBTableModel table,
384                                                                    final Preferences prefs,
385                                                                    final int lvl,
386                                                                    final String msg,
387                                                                    final boolean flag ) {
388    
389                    if( maxRowCount > 0 && maxRowCount <= executeCount ) { return ; }
390    
391                    String lowerName = name.toLowerCase(Locale.JAPAN);
392                    String val               = (msg != null) ? msg : ( ( flag ) ? "" : prefs.get(lowerName, "") );
393    //              String path              = (prefs == null) ? "䏿?" : prefs.absolutePath() ;
394    
395                    if( key != null ) {
396                            if( like ) {
397                                    if( lowerName.indexOf( key ) < 0 ) { return; }
398                            }
399                            else {
400                                    if( ! lowerName.equalsIgnoreCase( key ) ) { return; }
401                            }
402                    }
403                    if( value != null ) {
404                            if( like ) {
405                                    if( (val.toLowerCase(Locale.JAPAN)).indexOf( value ) < 0 ) { return; }
406                            }
407                            else {
408                                    if( ! val.equalsIgnoreCase( value ) ) { return; }
409                            }
410                    }
411    
412                    String[] clmVals = new String[COLUMN_KEY.length];
413                    clmVals[0] = String.valueOf( lvl );                             // LEVEL
414                    clmVals[1] = name;                                                              // KEY
415                    clmVals[2] = val;                                                                       // VALUE
416                    clmVals[3] = String.valueOf( flag );                            // CHILD
417                    clmVals[4] = prefs.absolutePath() ;                             // PATH
418    //              clmVals[4] = path ;                                                             // PATH
419    
420                    table.addColumnValues( clmVals );
421                    executeCount++ ;
422            }
423    
424            /**
425             * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)çµæžœã®DBTableModelã‚’ã?sessionã«ç™»éŒ²ã™ã‚‹ã¨ãã?キーを指定ã—ã¾ã?
426             *              (åˆæœŸå€¤:HybsSystem#TBL_MDL_KEY[={@og.value org.opengion.hayabusa.common.HybsSystem#TBL_MDL_KEY}])ã€?
427             *
428             * @og.tag
429             * æ¤œç´¢çµæžœã‚ˆã‚Šã€DBTableModelオブジェクトを作æ?ã—ã¾ã™ã?ã“れをã?下æµã?viewã‚¿ã‚°ç­‰ã«
430             * 渡ã™å?åˆã«ã€??常ã¯ã€session を利用ã—ã¾ã™ã?ãã?å ´åˆã?登録キーã§ã™ã?
431             * query ã‚¿ã‚°ã‚’åŒæ™‚ã«å®Ÿè¡Œã—ã¦ã€çµæžœã‚’求ã‚ã‚‹å?åˆã?åŒä¸?ƒ¡ãƒ¢ãƒªã«é…ç½®ã•れる為ã€?
432             * ã“ã? tableId 属æ?を利用ã—ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã‚’åˆ?‘ã¾ã™ã?
433             *              (åˆæœŸå€¤:HybsSystem#TBL_MDL_KEY[={@og.value org.opengion.hayabusa.common.HybsSystem#TBL_MDL_KEY}])ã€?
434             *
435             * @param       id sessionã«ç™»éŒ²ã™ã‚‹æ™‚ã? ID
436             */
437            public void setTableId( final String id ) {
438                    tableId = nval( getRequestParameter( id ), tableId );
439            }
440    
441            /**
442             * ã€TAG】検索ã—ãŸçµæžœã‚’表示ã™ã‚‹è¡¨ç¤ºé ?‚’ファイル属æ?åã§æŒ?®šã—ã¾ã™ã?
443             *
444             * @og.tag
445             * ç¾ä»•様ã§ã¯ã€è¤?•°ã®ã‚­ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“ã€?
446             *
447             * @param       ordr    ソートキーを指定ã?
448             */
449            public void setOrderBy( final String ordr ) {
450                    orderBy = nval( getRequestParameter( ordr ),orderBy );
451            }
452    
453            /**
454             * ã€TAG】コマンãƒ?NEW,RENEW)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:NEW)ã€?
455             *
456             * @og.tag
457             * コマンドã?,HTMLã‹ã‚‰(get/post)æŒ?®šã•れã¾ã™ã?ã§,CMD_xxx ã§è¨­å®šã•れる
458             * フィールド定数値ã®ã?¥ã‚Œã‹ã‚’ã?æŒ?®šã§ãã¾ã™ã?
459             * 何も設定ã•れãªã??ã¾ãŸã?ã€null ã®å ´åˆã?ã€?NEW" ãŒå?期å?ã«ã‚»ãƒ?ƒˆã•れã¾ã™ã?
460             *
461             * @param       cmd コマンãƒ?public static final 宣è¨?•れã¦ã?‚‹æ–?­—å?)
462             * @see         <a href="../../../../constant-values.html#org.opengion.hayabusa.taglib.RegistryQueryTag.CMD_NEW">コマンド定数</a>
463             */
464            public void setCommand( final String cmd ) {
465                    String cmd2 = getRequestParameter( cmd );
466                    if( cmd2 != null && cmd2.length() > 0 ) { command = cmd2.toUpperCase(Locale.JAPAN); }
467            }
468    
469            /**
470             * ã€TAG】検索ベã?スキーを設定ã—ã¾ã?HKEY_CURRENT_USER/Software/XXX ã® XXX ã‚’ã?ースã¨ã—ã¾ã?ã€?
471             *
472             * @og.tag
473             * ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã®æ¤œç´¢ã§ã€HKEY_CURRENT_USER ã‹ã?HKEY_LOCAL_MACHINE ã®åŒºåˆ¥ã‚’ã?hkeyType 属æ?ã§ä»˜ã‘る事ãŒ
474             * ã§ãるよã†ã«ã—ã¾ã—ãŸã€‚æ?ã¯ã€HKEY_CURRENT_USER/Software/ 以下ã?検索ãŒã§ãã¦ã?¾ã—ãŸãŒã?
475             * 今ç¾åœ¨ã¯ã€ã§ããªããªã£ã¦ã?‚‹ã‚ˆã†ã§ã™ã??ˆã¾ãŸã?ã€ä½¿ã?–¹ãŒé–“é•ã£ã¦ã?‚‹ã‹ï¼?
476             * ãã“ã§ã€æ¨™æº?/JavaSoft/Prefs)ã€?Muratecã€?Microsoft ã?‘ã€æ¤œç´¢ã§ãるよã†ã«ã€?
477             * XXXXPreferencesFactory を作æ?ã—ã¾ã—ãŸã€?
478             * 詳細ã¯ã€opengionV6/src/jdk170uXX_WindowsPreference ã‚’å‚照願ã„ã¾ã™ã?
479             * ã“れã«ã‚ˆã‚Šã€å¾“æ¥é€šã‚Šã®æ–¹æ³•ã§?ˆåˆ¶é™ã?ã‹ã‹ã‚Šã¾ã™ãŒ?‰ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã‚’検索ã§ãã¾ã™ã?
480             * 
481             * ベã?スキー ã«æŒ?®šã§ãã‚‹ã®ã¯ã€?/Muratec" , "/Microsoft" ã§å§‹ã¾ã‚‹ã‚­ãƒ¼ã?‘ã§ã™ã?
482             * ãれã«ç¶šã "/" ã§åŒºåˆ?£ãŸéšŽå±¤æ§‹é?も表ç¾å¯èƒ½ã§ã™ã?
483             * 標æº?/JavaSoft/Prefs) ã¯ã€ä½•ã‚‚æŒ?®šã—ãªã?“ã¨ã§ã€æ¨™æº–ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã?
484             *
485             * @param       bkey 検索ベã?スキー
486             */
487            public void setBaseKey( final String bkey ) {
488                    baseKey = nval( getRequestParameter( bkey ),baseKey );
489            }
490    
491            /**
492             * ã€TAG】検索キーを設定ã—ã¾ã™ã?
493             *
494             * @og.tag 検索キーを設定ã—ã¾ã™ã?
495             *
496             * @param       ky 検索キー
497             */
498            public void setKey( final String ky ) {
499                    key = nval( getRequestParameter( ky ),key );
500                    if( key != null ) { key = key.toLowerCase(Locale.JAPAN); }
501            }
502    
503            /**
504             * ã€TAG】検索ãƒãƒªãƒ¥ãƒ¼ã‚’設定ã—ã¾ã™ã?
505             *
506             * @og.tag 検索ãƒãƒªãƒ¥ãƒ¼ã‚’設定ã—ã¾ã™ã?
507             *
508             * @param       val 検索ãƒãƒªãƒ¥ãƒ¼
509             */
510            public void setValue( final String val ) {
511                    value = nval( getRequestParameter( val ),value );
512                    if( value != null ) { value = value.toLowerCase(Locale.JAPAN); }
513            }
514    
515            /**
516             * ã€TAGã€‘ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã®æœ?¤§æ¤œç´¢ä»¶æ•°ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:0[無制é™])ã€?
517             *
518             * @og.tag
519             * DBTableModelã®ãƒ??ã‚¿ã¨ã—ã¦ç™»éŒ²ã™ã‚‹æœ?¤§ä»¶æ•°ã‚’ã“ã®å€¤ã«è¨­å®šã—ã¾ã™ã?
520             * サーãƒã?ã®ãƒ¡ãƒ¢ãƒªè³?ºã¨å¿œç­”時間ã?確ä¿ã?為ã§ã™ã?
521             * åˆæœŸå€¤ã¯ã€? ã¯ã€ç„¡åˆ¶é™ã§ã™ã?
522             *
523             * @param       count ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã®æœ?¤§æ¤œç´¢ä»¶æ•°
524             */
525            public void setMaxRowCount( final String count ) {
526                    maxRowCount = nval( getRequestParameter( count ),maxRowCount );
527            }
528    
529            /**
530             * ã€TAGã€‘æ¤œç´¢çµæžœã‚’ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0033[ 件検索ã—ã¾ã—ãŸ])ã€?
531             *
532             * @og.tag
533             * ã“ã“ã§ã¯ã€æ¤œç´¢çµæžœã®ä»¶æ•°ã‚?™»éŒ²ã•れãŸä»¶æ•°ã‚’ã¾ãšå?力ã—ã€?
534             * ãã?次ã«ã€ã“ã“ã§æŒ?®šã—ãŸãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’リソースã‹ã‚‰å–å¾—ã—ã¦
535             * 表示ã—ã¾ã™ã?
536             * 表示ã•ã›ãŸããªã??åˆã?, displayMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€?
537             * åˆæœŸå€¤ã¯ã€æ¤œç´¢ä»¶æ•°ã‚’表示ã—ã¾ã™ã?
538             *
539             * @param       id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID
540             */
541            public void setDisplayMsg( final String id ) {
542                    displayMsg = getRequestParameter( id );
543            }
544    
545            /**
546             * ã€TAGã€‘æ¤œç´¢çµæžœãŒã‚¼ãƒ­ä»¶ã®å ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ])ã€?
547             *
548             * @og.tag
549             * ã“ã“ã§ã¯ã€æ¤œç´¢çµæžœãŒã‚¼ãƒ­ä»¶ã®å ´åˆã?ã¿ã€ç‰¹åˆ¥ãªãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’表示ã•ã›ã¾ã™ã?
550             * 従æ¥ã¯ã€displayMsg ã¨å…¼ç”¨ã§ã€ã?0ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€ã¨ã?†è¡¨ç¤ºã§ã—ãŸãŒã?
551             * displayMsg ã®åˆæœŸè¡¨ç¤ºã¯ã€OFF ã«ãªã‚Šã¾ã—ãŸã®ã§ã€ã‚¼ãƒ­ä»¶ã®å ´åˆã?ã¿åˆ¥ã«è¡¨ç¤ºã•ã›ã¾ã™ã?
552             * 表示ã•ã›ãŸããªã??åˆã?, notfoundMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€?
553             * åˆæœŸå€¤ã¯ã€MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ]ã§ã™ã?
554             *
555             * @param       id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID
556             */
557            public void setNotfoundMsg( final String id ) {
558                    String ids = getRequestParameter( id );
559                    if( ids != null ) { notfoundMsg = ids; }
560            }
561    
562            /**
563             * ã€TAG】オーãƒã?フロー時ã«ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0007)ã€?
564             *
565             * @og.tag
566             * 表示ã•ã›ãŸããªã??åˆã?, overflowMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€?
567             *
568             * @param       id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID
569             */
570            public void setOverflowMsg( final String id ) {
571                    overflowMsg = getRequestParameter( id );
572            }
573    
574            /**
575             * ã€TAG】検索時ã?æœ?¤§å±•開レベル(0ã¯ç„¡åˆ¶é™?を指定ã—ã¾ã?åˆæœŸå€¤:1)ã€?
576             *
577             * @og.tag
578             * ?ã‚’æŒ?®šã™ã‚‹ã¨ã€ç„¡åˆ¶é™ã«éšŽå±¤ã‚’展開ã—ã¾ã™ã?
579             * åˆæœŸå€¤ã¯ã€?¼‘レベルã§ã™ã?
580             *
581             * @param       lvl 検索時ã?æœ?¤§å±•開レベル
582             */
583            public void setMaxLevel( final String lvl ) {
584                    maxLevel = nval( getRequestParameter( lvl ),maxLevel );
585            }
586    
587            /**
588             * ã€TAG】キーãŠã‚ˆã³ãƒãƒªãƒ¥ãƒ¼ã«ã¤ã?¦,like 検索を行ã†ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)ã€?
589             *
590             * @og.tag
591             * like検索ã¨ã¯ã€ã‚­ãƒ¼ã®ä¸?ƒ¨ã®æ–?­—ã‚’å«ã‚??åˆã«ãƒžãƒƒãƒã—ãŸã¨ã—ã¦ã€å?ã‚’å–りå?ã—ã¾ã™ã?
592             * ã“ã“ã§ã®è¨­å®šã?ã€ã‚­ãƒ¼ã‚‚ãƒãƒªãƒ¥ãƒ¼ã‚‚åŒæ™‚ã«é©ç”¨ã•れã¾ã™ã?ã¾ãŸã?大æ–?­—å°æ–‡å­—ã?区別も行ã„ã¾ã›ã‚“ã€?
593             *
594             * @param       lik like 検索を行ã†ã‹ã©ã?‹
595             */
596            public void setLike( final String lik ) {
597                    like = nval( getRequestParameter( lik ),like );
598            }
599    
600            /**
601             * ã€TAG】レジストリã®èª­ã¿è¾¼ã‚?ƒ«ãƒ¼ãƒˆã‚’(user/system)ã§æŒ?®šã—ã¾ã?åˆæœŸå€¤:user)ã€?
602             *
603             * @og.tag
604             * HKEY_CURRENT_USER/Software/XXXX を読ã‚??åˆã?ã€?user" ã‚’ã?HKEY_LOCAL_MACHINE/Software/XXXX 
605             * を読ã‚??åˆã?ã€?system" を指定ã—ã¾ã™ã?ãれ以外ã?æŒ?®šã?ã€ã‚¨ãƒ©ãƒ¼ã«ã—ã¦ã?¾ã™ã?
606             * ã“ã“ã§ã®è¨­å®šã?ã€å¤§æ–?­—å°æ–‡å­—ã?区別ã¯è¡Œã„ã¾ã›ã‚“ã€?
607             * åˆæœŸå€¤ã¯ã€?user"(HKEY_CURRENT_USER) ã§ã™ã?
608             *
609             * @og.rev 5.6.8.2 (2013/09/20) æ–°è¦è¿½åŠ?
610             *
611             * @param       type レジストリã®èª­ã¿è¾¼ã‚?ƒ«ãƒ¼ãƒ?user/system)
612             */
613            public void setHkeyType( final String type ) {
614                    String temp = nval( getRequestParameter( type ),null );
615                    if( temp != null ) {
616                            if(        "user".equalsIgnoreCase( temp ) ) { hkeyType = 0; }
617                            else if( "system".equalsIgnoreCase( temp ) ) { hkeyType = 1; }
618                            else {
619                                    String errMsg = "hkeyType ã¯ã€[user] ã‹ã?[system] ã®ã©ã¡ã‚‰ã‹ã‚’指定ã—ã¦ãã ã•ã„ã€?
620                                                            + " hkeyType[" + temp + "]" ;
621                                    throw new HybsSystemException( errMsg );
622                            }
623                    }
624            }
625    
626            /**
627             * ã‚¿ã‚°ã®åç§°ã‚’ã?è¿”ã—ã¾ã™ã?
628             * 自åˆ??身ã®ã‚¯ãƒ©ã‚¹åよりã?自動的ã«å–り出ã›ãªã?Ÿã‚ã?ã“ã?メソãƒ?ƒ‰ã‚’オーãƒã?ライドã—ã¾ã™ã?
629             *
630             * @og.rev 4.0.0.0 (2005/01/31) æ–°è¦è¿½åŠ?
631             *
632             * @return  ã‚¿ã‚°ã®åç§°
633             */
634            @Override
635            protected String getTagName() {
636                    return "regQuery" ;
637            }
638    
639            /**
640             * ã€TAGã€?通常使ã?¾ã›ã‚“)ã‚¿ã‚°ã§å‡¦ç?•れる処ç?Œãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç?‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:false)ã€?
641             *
642             * @og.tag
643             * ã“ã?値ã¯ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰å?ç?«å½±éŸ¿ã—ã¾ã™ã?ã“ã?値ãŒtrueã«æŒ?®šã•ã‚ŒãŸæ™‚ã«commitã•れãŸDBTableModelã?
644             * ファイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã?対象ã®è¡¨ã«ãªã‚Šã¾ã™ã?
645             *
646             * ã“ã?パラメーターã¯ã€??常ã€å„ã‚¿ã‚°ã«ã‚ˆã‚Šå®Ÿè£?•れã?ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæŒ‡å®šã™ã‚‹å¿?¦ã?ã‚りã¾ã›ã‚“ã€?
647             * ä½?—ã€?ã¤ã®JSPå†?§DBTableModelãŒè¤?•°ç”Ÿæ?ã•れるå?åˆã«ã€å‰ã«å‡¦ç?—ãŸDBTableModelã«ã¤ã?¦ãƒ•ァイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’ã•ã›ãŸã„
648             * å ´åˆã?ã€å¾Œã‚ã§DBTableModelを生æˆã™ã‚‹ã‚¿ã‚°ã§ã€æ?示çš?«ã“ã?値をfalseã«æŒ?®šã™ã‚‹ã“ã¨ã§ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰å?ç??対象ã‹ã‚‰
649             * 除外ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã?
650             *
651             * @og.rev 5.1.6.0 (2010/05/01) æ–°è¦ä½œæ?
652             *
653             * @param  flag メイントランザクションã‹ã©ã?‹
654             */
655            public void setMainTrans( final String flag ) {
656                    isMainTrans = nval( getRequestParameter( flag ),isMainTrans );
657            }
658    
659            /**
660             * ã“ã?オブジェクトã?æ–?­—å?表ç¾ã‚’è¿”ã—ã¾ã™ã?
661             * 基本çš?«ãƒ?ƒãƒ?‚°ç›®çš?«ä½¿ç”¨ã—ã¾ã™ã?
662             *
663             * @return ã“ã?ã‚¯ãƒ©ã‚¹ã®æ–?­—å?表ç¾
664             */
665            @Override
666            public String toString() {
667                    return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
668                                    .println( "VERSION"             ,VERSION                )
669                                    .println( "tableId"             ,tableId                )
670                                    .println( "command"             ,command                )
671                                    .println( "baseKey"             ,baseKey                )
672                                    .println( "key"                 ,key                    )
673                                    .println( "value"               ,value                  )
674                                    .println( "maxRowCount" ,maxRowCount    )
675                                    .println( "orderBy"             ,orderBy                )
676                                    .println( "displayMsg"  ,displayMsg             )
677                                    .println( "overflowMsg" ,overflowMsg    )
678                                    .println( "maxLevel"    ,maxLevel               )
679                                    .println( "like"                ,like                   )
680                                    .println( "executeCount",executeCount   )
681                                    .println( "COLUMN_KEY"  ,COLUMN_KEY             )
682                                    .println( "Other..."    ,getAttributes().getAttribute() )
683                                    .fixForm().toString() ;
684            }
685    }