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 static org.opengion.fukurou.util.StringUtil.nval;
019    
020    import java.io.IOException;
021    import java.io.ObjectInputStream;
022    import java.io.ObjectOutputStream;
023    import java.util.Locale;
024    
025    import org.opengion.fukurou.db.DBUtil;
026    import org.opengion.fukurou.db.Transaction;
027    import org.opengion.fukurou.db.TransactionReal;
028    import org.opengion.fukurou.util.ErrorMessage;
029    import org.opengion.fukurou.util.StringUtil;
030    import org.opengion.hayabusa.common.HybsSystem;
031    import org.opengion.hayabusa.common.HybsSystemException;
032    import org.opengion.hayabusa.db.DBColumn;
033    import org.opengion.hayabusa.db.DBEditConfig;
034    import org.opengion.hayabusa.db.DBTableModel;
035    import org.opengion.hayabusa.db.Query;
036    import org.opengion.hayabusa.db.QueryFactory;
037    import org.opengion.hayabusa.resource.GUIInfo;
038    
039    /**
040     * ãƒ??タベã?ã‚¹ã®æ¤œç´¢ã‚’行ã†ã‚¿ã‚°ã§ã™ã?
041     *
042     * ã“ã?ã‚¿ã‚°ã®å†?®¹ã«ã€SQLæ–?‚’記述ã—ã¾ã™ã? whereã‚¿ã‚°ã€?andã‚¿ã‚° を使ã?¨å¼•æ•°ã«å¿œã˜ã¦
043     * 実行ã•れるSQLæ–?Œç•°ãªã‚Šã¾ã?使用例å‚ç…§)ã€?
044     * ã¾ãŸã?PL/SQLã®SPã§æ¤œç´¢ã‚’行ã†ã¨ãã‚‚ã“ã?タグを使ã?¾ã™ã?
045     * SystemData ã® USE_SQL_INJECTION_CHECK ã?true ã‹ã?quotCheck 属æ?ã?true ã®å ´åˆã?ã€?
046     * ?³?±?¬ã‚¤ãƒ³ã‚¸ã‚§ã‚¯ã‚·ãƒ§ãƒ³å¯¾ç­–用ã®ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?リクエスト引数ã«
047     * クォーãƒ?‚£ã‚·ãƒ§ãƒ³(')ãŒå«ã¾ã‚Œã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ã?
048     * åŒæ§˜ã«USE_XSS_CHECKãŒtrueã‹ã?xssCheck属æ?ãŒtrueã®å ´åˆã?ã€?
049     * クロスサイトススクリプティング(XSS)対策ã?ãŸã‚less/greater than signã®ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
050     *
051     * ※ ã“ã?ã‚¿ã‚°ã¯ã€Transaction ã‚¿ã‚°ã®å¯¾è±¡ã§ã™ã?
052     *
053     * @og.formSample
054     * â—å½¢å¼ï¼?
055     *       ・<og:query command="NEW" >
056     *              SELECTæ–?
057     *         </og:query>
058     *       ・<og:query command="NEW" names="?¥?¥?¥" queryType="JDBCErrMsg" >
059     *              { call PL/SQL(?,?,?,? ) } 
060     *         </og:query>
061     * â—body?šã‚ã‚?EVAL_BODY_BUFFERED:BODYを評価ã—ã?{@XXXX} ã‚’è§£æžã—ã¾ã?
062     *
063     * â—Tag定義??
064     *   <og:query
065     *       queryType          ã€TAG】Query を発行ã™ã‚‹ç‚ºã®ã‚¯ãƒ©ã‚¹ID(JDBC,JDBCCallable,JDBCErrMsg,JDBCUpdate)を指定ã—ã¾ã™{@og.doc03Link queryType åˆæœŸå€¤:JDBC})
066     *       command            ã€TAG】コマンãƒ?NEW,RENEW)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?PlsqlUpdateTag,UpdateTag ã®å ´åˆã?ã€ENTRY)
067     *       scope              ã€TAG】キャãƒ?‚·ãƒ¥ã™ã‚‹å ´åˆã?スコープ[request/page/session/applicaton]を指定ã—ã¾ã?åˆæœŸå€¤:session)
068     *       maxRowCount        ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)ãƒ??ã‚¿ã®æœ?¤§èª­ã¿è¾¼ã¿ä»¶æ•°ã‚’指定ã—ã¾ã?(åˆæœŸå€¤:DB_MAX_ROW_COUNT[=1000])(0:[無制é™])
069     *       skipRowCount       ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)ãƒ??ã‚¿ã®èª­ã¿å§‹ã‚ã®åˆæœŸå€¤ã‚’指定ã—ã¾ã?
070     *       displayMsg         ã€TAGã€‘æ¤œç´¢çµæžœã‚’ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?(åˆæœŸå€¤:VIEW_DISPLAY_MSG[=])
071     *       overflowMsg        ã€TAG】検索ãƒ??ã‚¿ãŒæœ€å¤§æ¤œç´¢æ•°ã‚’オーãƒã?ã—ãŸå ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?(åˆæœŸå€¤:MSG0007[æ¤œç´¢çµæžœãŒã?制é™è¡Œæ•°ã‚’è¶?ˆã¾ã—ãŸã®ã§ã€æ®‹ã‚Šã¯ã‚«ãƒ?ƒˆã•れã¾ã—ãŸ])
072     *       notfoundMsg        ã€TAGã€‘æ¤œç´¢çµæžœãŒã‚¼ãƒ­ä»¶ã®å ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ])
073     *       names              ã€TAG】PL/SQLを利用ã™ã‚‹å ´åˆã?引数ã«ã‚»ãƒ?ƒˆã™ã¹ã?ãƒ??ã‚¿ã®åç§°ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã?
074     *       stopZero           ã€TAGã€‘æ¤œç´¢çµæžœãŒï¼ä»¶ã®ã¨ãå?ç?‚’続行ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false[続行ã™ã‚‹])
075     *       tableId            ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)çµæžœã®DBTableModelã‚’ã?sessionã«ç™»éŒ²ã™ã‚‹ã¨ãã?キーを指定ã—ã¾ã?
076     *       dbid               ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã?
077     *       trace              ã€TAG】引数㮠SQL æ–?‚’ EXPLAIN PLAN ã‚’[true:行ã†/ãれ以å¤?行ã‚ãªã„]を指定ã—ã¾ã?åˆæœŸå€¤:false)
078     *       checkNames         ã€TAGã€‘ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã®æ­£è¦åŒ–を行ã†ã‚«ãƒ©ãƒ?‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã?
079     *       modifyType         ã€TAG】DB検索時ã? モãƒ?‚£ãƒ•ァイタイプをæŒ?®šã—ã¾ã™[A:追åŠ?C:æ›´æ–°/D:削除]
080     *       quotCheck          ã€TAG】リクエスト情報㮠クォーãƒ?‚£ã‚·ãƒ§ãƒ³(') 存在ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]を設定ã—ã¾ã?åˆæœŸå€¤:USE_SQL_INJECTION_CHECK)
081     *       stopError          ã€TAG】PLSQL/SQL処ç?‚¨ãƒ©ãƒ¼ã®æ™‚ã«å‡¦ç?‚’中止ã™ã‚‹ã‹ã©ã?‹[true/false]を設定ã—ã¾ã?åˆæœŸå€¤:true)
082     *       xssCheck           ã€TAG】リクエスト情報㮠HTMLTagé–‹å§?終äº?–‡å­?><) 存在ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]を設定ã—ã¾ã?(åˆæœŸå€¤:USE_XSS_CHECK[=true])
083     *       mainTrans          ã€TAGã€?通常使ã?¾ã›ã‚“)ã‚¿ã‚°ã§å‡¦ç?•れる処ç?Œãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç?‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:true)
084     *       caseKey            ã€TAG】ã“ã®ã‚¿ã‚°è‡ªä½“を利用ã™ã‚‹ã‹ã©ã?‹ã®æ¡ä»¶ã‚­ãƒ¼ã‚’指定ã—ã¾ã?åˆæœŸå€¤:null)
085     *       caseVal            ã€TAG】ã“ã®ã‚¿ã‚°è‡ªä½“を利用ã™ã‚‹ã‹ã©ã?‹ã®æ¡ä»¶å€¤ã‚’指定ã—ã¾ã?åˆæœŸå€¤:null)
086     *       caseNN             ã€TAG】指定ã?値ãŒã?null/ゼロæ–?­—å? ã§ãªã??å?Not Null=NN)ã¯ã€ã“ã®ã‚¿ã‚°ã¯ä½¿ç”¨ã•れã¾ã?åˆæœŸå€¤:true)
087     *       caseNull           ã€TAG】指定ã?値ãŒã?null/ゼロæ–?­—å? ã®å ´åˆã?ã€ã“ã®ã‚¿ã‚°ã¯ä½¿ç”¨ã•れã¾ã?åˆæœŸå€¤:true)
088     *       useBeforeHtmlTag   ã€TAGã€?処ç?™‚é–?queryTime)ãªã©ã®æƒ??出力[true:有効/false:無効]を指定ã—ã¾ã?åˆæœŸå€¤:true)
089     *       debug              ã€TAG】デãƒãƒƒã‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)
090     *   >   ... Body ...
091     *   </og:query>
092     *
093     * â—使用ä¾?
094     *     <og:query command="NEW">
095     *             select PN,YOBI,NMEN,HINM from XX01 where PN = '{@PN}' order by PN
096     *     </og:query>
097     *
098     *          ・検索æ¡ä»¶ãŒå?力ã•ã‚ŒãŸæ™?{@PN}ãŒNOT NULLã®ã¨ã?
099     *            作æ?ã•れるSQLæ–?çselect PN,YOBI,NMEN,HINM from XX01 where PN = 'AAA' order by PN
100     *          ・検索æ¡ä»¶ãŒå?力ã•れãªã‹ã£ãŸæ™‚({@PN}ãŒNULLã®ã¨ã?
101     *            作æ?ã•れるSQLæ–?çselect PN,YOBI,NMEN,HINM from XX01 where PN = '' order by PN
102     *
103     *     <og:query command="NEW">
104     *             select PN,YOBI,NMEN,HINM from XX01
105     *         <og:where>
106     *             <og:and value="PN = '{@PN}%'" />
107     *             <og:and value="YOBI like '{@YOBI}%'" />
108     *         </og:where>
109     *             order by PN
110     *     </og:query>
111     *
112     *          ・検索æ¡ä»¶ãŒå?力ã•ã‚ŒãŸæ™?{@PN}ãŒNOT NULLã®ã¨ã?
113     *            作æ?ã•れるSQLæ–?çselect PN,YOBI,NMEN,HINM from XX01 PN = 'AAA%' and YOBI like 'BBB%' order by PN
114     *          ・検索æ¡ä»¶ãŒå?力ã•れãªã‹ã£ãŸæ™‚({@PN}ãŒNULLã®ã¨ã? WHEREå¥ãŒãªããªã‚‹ã?
115     *            作æ?ã•れるSQLæ–?çselect PN,YOBI,NMEN,HINM from XX01 order by PN
116     *
117     *        注æ„?WhereTagを使ã£ãŸå?åˆã?下ã?よã†ã«ã¯ãªã‚Šã¾ã›ã‚“ã€?
118     *            select PN,YOBI,NMEN,HINM from XX01 PN = '' and YOBI like '%' order by PN
119     *
120     *     <og:query command="NEW">
121     *             select PN,YOBI,NMEN,HINM from XX01 where PN="11111"
122     *         <og:where startKey="and">
123     *             <og:and value="YOBI like '{@PN}%'" />
124     *         </og:where>
125     *             order by PN
126     *     </og:query>
127     *
128     *          ・検索æ¡ä»¶ãŒå?力ã•ã‚ŒãŸæ™?{@YOBI}ãŒNOT NULLã®ã¨ã?
129     *            作æ?ã•れるSQLæ–?çselect PN,YOBI,NMEN,HINM from XX01 PN = '11111' and YOBI like 'BBB%' order by PN
130     *          ・検索æ¡ä»¶ãŒå?力ã•れãªã‹ã£ãŸæ™‚({@YOBI}ãŒNULLã®ã¨ã? WHEREå¥ãŒãªããªã‚‹ã?
131     *            作æ?ã•れるSQLæ–?çselect PN,YOBI,NMEN,HINM from XX01 PN = '11111' order by PN
132     *
133     *     <og:query
134     *          command    = "NEW"
135     *          names      = "SYSTEM_ID,LANG,CLM,NAME_JA,LABEL_NAME,KBSAKU,USER.ID"
136     *          checkNames = "CLM,NAME_JA"
137     *          queryType  = "JDBCErrMsg"
138     *          displayMsg = "">
139     *              {call TYPE3B01.TYPE3B01(?,?,?,?)}
140     *     </og:query>
141     *
142     *          ・queryType ã« JDBCErrMsg を指定ã—ã¦ã€PL/SQL をコールã§ãã¾ã™ã?
143     *            引数ã¯ã€names 属æ?をキーã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã‹ã‚‰èª­ã¿è¾¼ã¿ã¾ã™ã?
144     *          ・checkNames ã«ã‚«ãƒ©ãƒ?を指定ã™ã‚‹ã¨ã€columns.valueSet ã«ã‚ˆã‚‹
145     *            ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã®æ­£è¦åŒ–を行ã„ã¾ã™ã?
146     *
147     * @og.group ?¤?¢æ¤œç´¢
148     * @og.group ?¤?¢ç™»éŒ²
149     *
150     * @version  4.0
151     * @author       Kazuhiko Hasegawa
152     * @since    JDK5.0,
153     */
154    public class QueryTag extends CommonTagSupport {
155            //* ã“ã?プログラãƒ??VERSIONæ–?­—å?を設定ã—ã¾ã™ã?       {@value} */
156            private static final String VERSION = "5.6.5.3 (2013/06/28)" ;
157    
158            private static final long serialVersionUID = 565320130628L ;
159    
160            /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? æ–°è¦?{@value} */
161            public static final String CMD_NEW       = "NEW" ;
162            /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? 冿¤œç´¢ {@value} */
163            public static final String CMD_RENEW = "RENEW" ;
164            /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ?リスãƒ? */
165            private static final String[] COMMAND_LIST = new String[] { CMD_NEW , CMD_RENEW };
166    
167            /** エラーメãƒ?‚»ãƒ¼ã‚¸ID {@value} */
168            protected static final String errMsgId   = HybsSystem.ERR_MSG_KEY;
169    
170            private   String        queryType       = null;
171            // 4.0.0.0 (2007/10/10) dbid ã®åˆæœŸå€¤ã‚’ã?"DEFAULT" ã‹ã‚‰ null ã«å¤‰æ›´
172    //      private   String        dbid            = "DEFAULT";
173            private   String        dbid            = null ;
174            protected transient DBTableModel        table           = null;
175            protected transient ErrorMessage        errMessage      = null;
176            protected String        tableId         = HybsSystem.TBL_MDL_KEY;
177            protected String        command         = CMD_NEW;
178            protected int           skipRowCount = 0;
179            protected int           maxRowCount     = -1;
180            protected String        sql                     = null;
181            protected int           executeCount = -1;                      // 検索/実行件数
182            protected String        names           = null;
183            protected boolean       outMessage      = true;
184            protected int           errCode         = ErrorMessage.OK;
185            protected boolean       quotCheck       = HybsSystem.sysBool( "USE_SQL_INJECTION_CHECK" );      // 4.0.0 (2005/08/31)
186            private   boolean       trace           = false;                // 4.0.0 (2005/01/31) å»?­¢
187            private   boolean       stopZero        = false;
188            private   String        modifyType      = null;                 // 3.8.5.1 (2006/05/08) modifyType 属æ?を追åŠ?—ã¾ã™ã?
189    //      private   String        displayMsg      = "MSG0033";    // ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€?
190            protected String        displayMsg      = HybsSystem.sys( "VIEW_DISPLAY_MSG" );
191            private   String        overflowMsg     = "MSG0007";    // æ¤œç´¢çµæžœãŒã?制é™è¡Œæ•°ã‚’è¶?ˆã¾ã—ãŸã®ã§ã€æ®‹ã‚Šã¯ã‚«ãƒ?ƒˆã•れã¾ã—ãŸã€?
192            private   String        notfoundMsg     = "MSG0077";    // 対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸã€?
193            private   boolean       isMainTrans     = true;                 // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã?
194    
195            // 3.5.4.7 (2004/02/06) 実行時間測定用ã®DIVè¦ç´?‚’出力ã—ã¾ã™ã?
196            protected long dyStart = 0;
197            // 4.3.3.0 (2008/09/22) PLSQL/SQL実行エラーã®éš›ã«ã€å?ç?‚’中止ã™ã‚‹ã‹ã©ã?‹ã€?
198            protected boolean stopError             = true;
199    
200            private StringBuilder debugMsg = null;          // 3.5.6.0 (2004/06/18)
201    
202            // 3.8.0.5 (2005/08/20) ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã®æ­£è¦åŒ–を行ã„ã¾ã™ã?
203            private String                  checkNames      = null;
204    
205            // 3.8.5.3 (2006/08/07) トレース時ã?メãƒ?‚»ãƒ¼ã‚¸æ–?­—å?ã‚’ä¿å­˜ã—ã¦ãŠãã¾ã™ã?
206            private String                  traceMsg        = null;
207    
208            protected boolean       xssCheck        = HybsSystem.sysBool( "USE_XSS_CHECK" );        // 5.0.0.2 (2009/09/15)
209    
210            // 5.3.5.0 (2011/05/01) 処ç?™‚é–?queryTime)ãªã©ã®æƒ??出力ã?有効/無効を指定ã—ã¾ã™ã?
211            private boolean         useBeforeHtmlTag        = true ;
212    
213            /**
214             * Taglibã®é–‹å§‹ã‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doStartTag() ã‚?オーãƒã?ライドã—ã¾ã™ã?
215             *
216             * @og.rev 3.5.4.7 (2004/02/06) 実行時間測定用ã«ã€?–‹å§‹æ™‚刻をå–å¾—ã—ã¾ã™ã?
217             * @og.rev 3.5.6.5 (2004/08/09) 暫定的ã«ã€DBTableModelã‚’å?行削除ã—ã¾ã™ã?
218             * @og.rev 3.6.0.0 (2004/09/24) DBTableModel ã®å…ˆè¡Œå‰Šé™¤ã¯ã€scope="session" ã®å ´åˆã?ã¿ã€?
219             * @og.rev 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??ã€DBTableModelãŒæ–°è¦ä½œæ?ã•れãŸå?ç?§ã®ã¿è¡Œã†ã€?
220             * @og.rev 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿?
221             *
222             * @return      後続å?ç??æŒ?¤º
223             */
224            @Override
225            public int doStartTag() {
226                    // 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿?
227                    if( useTag() ) {
228                            dyStart = System.currentTimeMillis();
229                            if( ! check( command, COMMAND_LIST ) ) { return(SKIP_BODY); }
230    
231                            useMainTrans( isMainTrans );                    // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã?
232                            startQueryTransaction( tableId );               // 3.6.0.8 (2004/11/19)
233    
234                            // 3.5.6.5 (2004/08/09) 削除ã™ã‚‹ã®ã¯ã€ã‚»ãƒ?‚·ãƒ§ãƒ³ã®ã‚ªãƒ–ジェクトã§ã‚ˆã„ã€?
235                            // 3.6.0.0 (2004/09/24) 削除ã™ã‚‹ã®ã¯ã€scope="session" ã®å ´åˆã?ã¿ã€?
236                            if( "session".equals( getScope() ) ) {
237                                    removeSessionAttribute( tableId );
238                                    removeSessionAttribute( HybsSystem.VIEWFORM_KEY );
239                            }
240    
241                            return( EVAL_BODY_BUFFERED );   // Body を評価ã™ã‚‹ã€? extends BodyTagSupport æ™?
242                    }
243                    return ( SKIP_BODY );                           // Body を評価ã—ãªã?
244            }
245    
246            /**
247             * Taglibã®ã‚¿ã‚°æœ¬ä½“を処ç?™ã‚?doAfterBody() ã‚?オーãƒã?ライドã—ã¾ã™ã?
248             *
249             * @og.rev 3.1.1.0 (2003/03/28) ボディã®å†?®¹ã‚’å–å¾—ã™ã‚‹å?ç?‚’ã€CommonTagSupport ã§è¡Œã†ã€?
250             * @og.rev 3.6.0.8 (2004/11/19) エラー発生時ã«ç¢ºå®Ÿã«ãƒªãƒªãƒ¼ã‚¹ã•れるよã?« try finally 追åŠ?
251             * @og.rev 3.8.5.3 (2006/08/07) USER.LASTSQL ã¸ã®SQLæ–??ä¿å­˜ã?ã€å®Ÿè¡Œå‰ã«è¡Œã£ã¦ãŠãã¾ã™ã?
252             * @og.rev 3.8.6.3 (2006/11/30) SQL æ–??å‰å¾Œã?スペã?スをå–り除ãã¾ã™ã?
253             * @og.rev 3.8.7.0 (2006/12/15) アクセスログå–å¾—ã?為,ApplicationInfoオブジェクトを設å®?
254             * @og.rev 4.0.0.0 (2005/01/31) lang â‡?ResourceManager ã¸å¤‰æ›´
255             * @og.rev 4.0.0.0 (2005/08/31) useQuotCheck() ã«ã‚ˆã‚‹?³?±?¬ã‚¤ãƒ³ã‚¸ã‚§ã‚¯ã‚·ãƒ§ãƒ³å¯¾ç­?
256             * @og.rev 4.3.4.0 (2008/12/01) GE20(ユーザー定数)ã¸ç™»éŒ²ã™ã‚‹ã‹ã?フラグã¸ã®å¯¾å¿?
257             * @og.rev 5.0.0.2 (2009/09/15) XSS対�
258             * @og.rev 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??ã€DBTableModelãŒæ–°è¦ä½œæ?ã•れãŸå?ç?§ã®ã¿è¡Œã†ã€?
259             * @og.rev 5.1.9.0 (2010/08/01) TransactionTag 対応ã?上ä½ã« TransactionTag ãŒã‚れã?ã€ãã“ã‹ã‚‰Connection をもらã†ã€?
260             * @og.rev 5.3.6.0 (2011/06/01) é›?¨ˆã?åˆè¨ˆãªã©ã®Edit機è?ã«å¯¾å¿œã—ã¾ã™ã?
261             * @og.rev 5.3.7.0 (2011/07/01) TransactionReal ã®å¼•数変更
262             * @og.rev 5.3.7.0 (2011/07/01) PL/SQLã‹ã¤scope="request"ã§æ­£ã—ã出力ã™ã‚‹ãŸã‚queryType,namesã‚‚ä¿å­˜ã™ã‚‹ã?
263             * @og.rev 5.3.8.0 (2011/08/01) Transaction発生ç®?‰€ã§close()
264             * @og.rev 5.5.3.4 (2012/06/19) trace 時ã?ã€å®Ÿéš›ã®æ¤œç´¢å‡¦ç?‚’行ã‚ãªã?§˜ã«å¤‰æ›´ã€?
265             * @og.rev 5.6.5.3 (2013/06/28) LASTQUERYTYPE �LASTSQLTYPE 変更�
266             *
267             * @return      後続å?ç??æŒ?¤º(SKIP_BODY)
268             */
269            @Override
270            public int doAfterBody() {
271    
272                    // 4.0.0 (2005/08/31) useQuotCheck() ã«ã‚ˆã‚‹?³?±?¬ã‚¤ãƒ³ã‚¸ã‚§ã‚¯ã‚·ãƒ§ãƒ³å¯¾ç­?
273                    useQuotCheck( quotCheck );
274                    // 5.0.0.2 (2009/09/15) XSS対�
275                    useXssCheck( xssCheck );
276    
277                    sql = getBodyString().trim();
278    
279                    // 3.2.1.0 (2003/05/28) æœ?µ‚ï¼³?±?¬æ–?‚’ã€UserInfo ã«ã€ã‚­ãƒ£ãƒ?‚·ãƒ¥ã—ã¦ãŠãã€?
280    //              setUserInfo( "LASTSQL", sql );
281                    // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã?
282                    if( isMainTrans ) {
283                            setUserInfo( "LASTSQL", sql, false );
284                            // 5.3.7.0 (2011/07/01) PL/SQLã‹ã¤scope="request"ã§æ­£ã—ã出力ã™ã‚‹ãŸã‚queryType,namesã‚‚ä¿å­˜ã™ã‚‹ã?
285    //                      setUserInfo( "LASTQUERYTYPE", queryType, false );
286                            setUserInfo( "LASTSQLTYPE", queryType, false );                         // 5.6.5.3 (2013/06/28)
287                            setUserInfo( "LASTNAMES", names, false );
288                    }
289    
290                    Query query = QueryFactory.newInstance( queryType );
291                    Transaction tran = null;
292                    try {
293                            if( maxRowCount < 0 ) {
294                                    maxRowCount     = sysInt( "DB_MAX_ROW_COUNT" );
295                            }
296    
297                            // 5.1.9.0 (2010/08/01) TransactionTag 対�
298    //                      final Transaction tran ;
299                            TransactionTag tranTag = (TransactionTag)findAncestorWithClass( this,TransactionTag.class );
300                            if( tranTag == null ) {
301    //                              tran = new TransactionReal( dbid,getApplicationInfo() );
302                                    tran = new TransactionReal( getApplicationInfo() );             // 5.3.7.0 (2011/07/01) 引数変更
303                            }
304                            else {
305                                    tran = tranTag.getTransaction();
306                            }
307                            query.setTransaction( dbid,tran );      // 5.1.9.0 (2010/08/01) TransactionTag 対�
308    
309                            query.setSkipRowCount( skipRowCount );
310                            query.setMaxRowCount( maxRowCount );
311    //                      query.setConnectionID( dbid );
312                            query.setResourceManager( getResource() );      // 4.0.0 (2005/01/31)
313    
314                            if( trace ) {
315    //                              traceMsg = traceQuery( sql );
316                                    traceMsg = traceQuery( sql,tran );              // 5.1.9.0 (2010/08/01) TransactionTag 対�
317                                    // 5.5.3.4 (2012/06/19) trace 時ã?ã€å®Ÿéš›ã®æ¤œç´¢å‡¦ç?‚’行ã‚ãªã?§˜ã«å¤‰æ›´
318    //                              query.setMaxRowCount( 1 );
319                                    return(SKIP_BODY);
320                            }
321                            query.setStatement( sql );
322    //                      query.setApplicationInfo( getApplicationInfo() );       // 3.8.7.0 (2006/12/15)
323    
324                            // 5.3.6.0 (2011/06/01) é›?¨ˆã?åˆè¨ˆãªã©ã®Edit機è?ã«å¯¾å¿œã—ã¾ã™ã?
325                            if( isMainTrans ) {
326                                    String guikey = getGUIInfoAttri( "KEY" );
327                                    String editName = getRequestValue( "editName" );
328                                    DBEditConfig config = getUser().getEditConfig( guikey, editName );
329                                    if( config != null ) {
330                                            query.setEditConfig( config );
331                                    }
332                            }
333    
334                            execute( query );
335    
336                            executeCount = query.getExecuteCount();
337                            if( errCode < ErrorMessage.NG && executeCount >= 0 ) {            // 異常以外ã?å ´å?
338                                    table = query.getDBTableModel();
339                                    // 3.8.5.1 (2006/05/08) modifyType 属æ?を追åŠ?—ã¾ã™ã?
340                                    if( modifyType != null ) {
341                                            for( int row=0; row<executeCount; row++ ) {
342                                                    table.setModifyType( row,modifyType );
343                                            }
344                                    }
345                            }
346                    }
347                    finally {
348    //                      if( query != null ) { query.close(); }
349                            QueryFactory.close( query );
350                            if( tran != null ) { tran.close(); }            // 5.3.8.0 (2011/08/01) Transaction発生ç®?‰€ã§close()
351                    }
352                    return(SKIP_BODY);
353            }
354    
355            /**
356             * Taglibã®çµ‚äº?‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doEndTag() ã‚?オーãƒã?ライドã—ã¾ã™ã?
357             *
358             * @og.rev 2.0.0.8 (2002/10/09) command="NEW" ã®ã¨ãã?ã¿ã€displayMsg を表示ã•ã›ã¾ã™ã?
359             * @og.rev 2.1.1.4 (2002/11/25) ãƒ?ƒãƒ?‚°æ™‚ã«æœ?µ‚SQLをユーザーæƒ??ã‚’ã‚»ãƒ?ƒˆã™ã‚‹ã‚ˆã†ã«å¤‰æ›´ã€?
360             * @og.rev 2.1.2.1 (2002/11/27) ErrorMessage をクリアã—ãªã?‚ˆã?«å¤‰æ›´ã€?
361             * @og.rev 3.1.1.0 (2003/03/28) JspWriter オブジェクトã?使用ç®?‰€ã‚’ã?jspPrint() を使用ã™ã‚‹ã‚ˆã†ã«å¤‰æ›´ã€?
362             * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€?
363             * @og.rev 3.2.1.0 (2003/05/28) æœ?µ‚ï¼³?±?¬æ–?‚’ã€UserInfo ã«ã€ã‚­ãƒ£ãƒ?‚·ãƒ¥ã—ã¦ãŠãã€?
364             * @og.rev 3.3.3.3 (2003/08/06) æ¤œç´¢çµæžœã®ä»¶æ•°ã‚’ã?"DB.COUNT" キーã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚»ãƒ?ƒˆã™ã‚‹ã€?
365             * @og.rev 3.3.3.3 (2003/08/06) æ¤œç´¢çµæžœã‚’ã?"DB.ERR_CODE" キーã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚»ãƒ?ƒˆã™ã‚‹ã€?
366             * @og.rev 3.5.4.7 (2004/02/06) 実行時間測定用ã®DIVè¦ç´?‚’出力ã—ã¦ãŠãã¾ã™ã?
367             * @og.rev 3.5.4.9 (2004/02/25) 警告時ã«åœæ­¢ã—ã¦ã?¾ã—ãŸãŒã?継続å?ç?•ã›ã¾ã™ã?
368             * @og.rev 3.5.5.0 (2004/03/12) ErrorMessage オブジェクトをã€query ãŒæ?功ã—ãŸæ™‚ã«ã‚‚クリアã™ã‚‹ã‚ˆã†ã«å¤‰æ›´
369             * @og.rev 3.5.5.2 (2004/04/02) TaglibUtil.makeHTMLErrorTable メソãƒ?ƒ‰ã‚’利用
370             * @og.rev 3.5.5.8 (2004/05/20) ErrorMessage オブジェクトをã€ã‚³ãƒžãƒ³ãƒ‰ãŒ NEW ã®å ´åˆã?ã¿ã€ã‚¯ãƒªã‚¢
371             * @og.rev 3.5.6.0 (2004/06/18) debugMsg 属æ?ã‚’å?力ã™ã‚‹ã‚ˆã?«ä¿®æ­£ã—ã¾ã™ã?
372             * @og.rev 3.6.0.8 (2004/11/19) DBTableModel をセーブã™ã‚‹æ™‚ã«ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
373             * @og.rev 3.8.5.3 (2006/08/07) USER.LASTSQL ã¸ã®SQLæ–??ä¿å­˜ã?ã€å®Ÿè¡Œå‰ã«è¡Œã£ã¦ãŠãã¾ã™ã?
374             * @og.rev 4.0.0.0 (2006/11/14) notfoundMsg 属æ?を追åŠ??displayMsg ã¯ã€VIEW_USE_DISPLAY_MSG ã§åˆ¶å¾¡
375             * @og.rev 4.0.0.0 (2007/10/18) メãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹çµ±å? getResource().getMessage > getResource().getLabel )
376             * @og.rev 4.3.3.0 (2008/09/22) 属æ? stopError ã®è¨­å®šã«ã‚ˆã‚Šã€JSP処ç?‚’中止ã™ã‚‹ã‹ã©ã?‹ã‚’制御ã—ã¾ã™ã?
377             * @og.rev 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿?
378             * @og.rev 5.3.5.0 (2011/05/01) 処ç?™‚é–?queryTime)ãªã©ã®æƒ??出力ã?有効/無効を指定ã—ã¾ã™ã?
379             * @og.rev 5.5.0.3 (2012/03/13) オーãƒã?フローメãƒ?‚»ãƒ¼ã‚¸ãŒå­˜åœ¨ã—ãªã?¨ãã?ã€ä½•ã‚‚ã—ãªã??(改行も入れãªã?
380             * @og.rev 5.5.3.4 (2012/06/19) trace 時ã?ã€å®Ÿéš›ã®æ¤œç´¢å‡¦ç?‚’行ã‚ãªã?§˜ã«å¤‰æ›´ã€?
381             * @og.rev 5.6.3.0 (2013/04/01) エラー時メãƒ?‚»ãƒ¼ã‚¸å¤‰æ›´
382             *
383             * @return      後続å?ç??æŒ?¤º
384             */
385            @Override
386            public int doEndTag() {
387                    debugPrint();           // 4.0.0 (2005/02/28)
388                    // 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿?
389                    if( !useTag() ) { return(EVAL_PAGE); }
390    
391                    if( trace ) {
392                            jspPrint( traceMsg );
393                            return (SKIP_PAGE);             // 5.5.3.4 (2012/06/19) trace 時ã?ã€å®Ÿéš›ã®æ¤œç´¢å‡¦ç?‚’行ã‚ãªã?§˜ã«å¤‰æ›´ã€?
394                    }
395    
396                    String label  = "";                             // 4.0.0 (2005/11/30) 検索ã—ãªã‹ã£ãŸå?åˆã?
397                    if( check( command, COMMAND_LIST ) ) {
398                            StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_SMALL );
399    
400                            // 実行件数ã®è¡¨ç¤º command="NEW" ã®ã¨ãã?ã¿ã€displayMsg を表示ã•ã›ã¾ã™ã?
401                            // 4.0.0 (2005/11/30) 出力é?ã®å¤‰æ›´ã€‚ä¸?•ªæœ??ã«å‡ºåŠ›ã—ã¾ã™ã?
402    //                      boolean useStatusBar = HybsSystem.sysBool( "VIEW_USE_DISPLAY_MSG" );
403                            if( CMD_NEW.equals( command ) ) {
404    //                              if( useStatusBar && executeCount > 0 && displayMsg != null && displayMsg.length() > 0 ) {
405                                    if( executeCount > 0 && displayMsg != null && displayMsg.length() > 0 ) {
406                                            buf.append( executeCount );
407    //                                      buf.append( getResource().getMessage( displayMsg ) );
408                                            buf.append( getResource().getLabel( displayMsg ) );
409                                            buf.append( HybsSystem.BR );
410                                    }
411                                    else if( executeCount == 0 && notfoundMsg != null && notfoundMsg.length() > 0 ) {
412    //                                      buf.append( getResource().getMessage( notfoundMsg ) );
413                                            buf.append( getResource().getLabel( notfoundMsg ) );
414                                            buf.append( HybsSystem.BR );
415                                    }
416                            }
417    
418                            // 3.3.3.3 (2003/08/06) æ¤œç´¢çµæžœã®ä»¶æ•°ã‚’ã?"DB.COUNT" キーã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚»ãƒ?ƒˆã™ã‚‹ã€?
419                            setRequestAttribute( "DB.COUNT"   , String.valueOf( executeCount ) );
420                            // 3.3.3.3 (2003/08/06) æ¤œç´¢çµæžœã‚’ã?"DB.ERR_CODE" キーã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚»ãƒ?ƒˆã™ã‚‹ã€?
421                            setRequestAttribute( "DB.ERR_CODE", String.valueOf( errCode ) );
422    
423                            // オーãƒã?フロー時ã?メãƒ?‚»ãƒ¼ã‚¸ã‚’表示
424    //                      if( table != null && table.isOverflow() ) {
425                            // 5.5.0.3 (2012/03/09) オーãƒã?フローメãƒ?‚»ãƒ¼ã‚¸ãŒå­˜åœ¨ã—ãªã?¨ãã?ã€ä½•ã‚‚ã—ãªã??(改行も入れãªã?
426                            if( table != null && table.isOverflow() && overflowMsg != null && overflowMsg.length() > 0  ) {
427    //                              buf.append( getResource().getMessage( overflowMsg ) );
428                                    buf.append( getResource().getLabel( overflowMsg ) );
429                                    buf.append( HybsSystem.BR );
430                            }
431    
432                            // 3.5.5.2 (2004/04/02) TaglibUtil.makeHTMLErrorTable メソãƒ?ƒ‰ã‚’利用
433                            String err = TaglibUtil.makeHTMLErrorTable( errMessage,getResource() );
434                            if( err != null && err.length() > 0 ) {
435                                    buf.append( err );
436                                    setSessionAttribute( errMsgId,errMessage );
437                            }
438                            else if( CMD_NEW.equals( command ) ) {          // 3.5.5.8 (2004/05/20)
439                                    removeSessionAttribute( errMsgId );
440                            }
441                            label = buf.toString();
442    
443                            if( table != null && ! commitTableObject( tableId, table ) ) {
444                                    // 3.6.0.8 (2004/11/19) トランザクションãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
445                                    // jspPrint( "QueryTag Query処ç?Œå‰²ã‚Šè¾¼ã¾ã‚Œã¾ã—ãŸã€?BTableModel ã¯ç™»éŒ²ã—ã¾ã›ã‚“ã€? );
446                                    
447                                    // 5.6.4.0 (2013/04/01) リソースã‹ã‚‰å‡ºåŠ›ã™ã‚‹ã‚ˆã?«å¯¾å¿?
448                                    ErrorMessage errMsgObj = new ErrorMessage( "QueryTag Query Error!" );
449                                    errMsgObj.addMessage( 0,ErrorMessage.NG,"ERR0041" );
450                                    jspPrint( TaglibUtil.makeHTMLErrorTable( errMsgObj,getResource() ) );
451                                    
452                                    return (SKIP_PAGE);
453                            }
454                    }
455    
456                    jspPrint( label );
457    
458                    // 3.5.4.9 (2004/02/25) 警告時ã«åœæ­¢ã—ã¦ã?¾ã—ãŸãŒã?継続å?ç?•ã›ã¾ã™ã?
459    //              int rtnCode = EVAL_PAGE;
460                    final int rtnCode ;
461                    if( errCode >= ErrorMessage.NG )  {  // 異常
462                            if( stopError ) {                               // 4.3.3.0 (2008/09/22) 属æ? stopError ã®è¨­å®šã«ã‚ˆã‚Šã€å?ç?‚’中止ã™ã‚‹ã‹ã‚’判断ã—ã¾ã™ã?
463                                    rtnCode = SKIP_PAGE;
464                            }
465                            else {
466                                    rtnCode = EVAL_PAGE;
467                            }
468                    }
469                    else {
470                            // ä»¶æ•°?ä»¶ã‹ã¤ stopZero = true
471                            if( executeCount == 0 && stopZero )     {
472                                    rtnCode = SKIP_PAGE;
473                            }
474                            else {
475                                    rtnCode = EVAL_PAGE;
476                            }
477                    }
478    
479                    // 3.5.4.7 (2004/02/06)
480                    long dyTime = System.currentTimeMillis()-dyStart;
481    
482                    // 5.3.5.0 (2011/05/01) 処ç?™‚é–?queryTime)ãªã©ã®æƒ??出力ã?有効/無効を指定ã—ã¾ã™ã?
483                    if( useBeforeHtmlTag ) {
484                            jspPrint( "<div id=\"queryTime\" value=\"" + (dyTime) + "\"></div>" );      // 3.5.6.3 (2004/07/12)
485                    }
486    
487                    // 4.0.0 (2005/01/31) セキュリãƒ?‚£ãƒã‚§ãƒ?‚¯(ãƒ??タアクセス件数登録)
488                    GUIInfo guiInfo = (GUIInfo)getSessionAttribute( HybsSystem.GUIINFO_KEY );
489                    if( guiInfo != null ) { guiInfo.addReadCount( executeCount,dyTime,sql ); }
490    
491                    return( rtnCode );
492            }
493    
494            /**
495             * タグリブオブジェクトをリリースã—ã¾ã™ã?
496             * キャãƒ?‚·ãƒ¥ã•れã¦å†åˆ©ç”¨ã•れるã?ã§ã€ãƒ•ィールドã?åˆæœŸè¨­å®šã‚’行ã„ã¾ã™ã?
497             *
498             * @og.rev 2.0.0.4 (2002/09/27) カスタãƒ?‚¿ã‚°ã® release() メソãƒ?ƒ‰ã‚’ã?追åŠ?
499             * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€?
500             * @og.rev 3.5.4.7 (2004/02/06) 実行時間測定用ã«ã€dyStart を追åŠ?—ã¾ã™ã?
501             * @og.rev 3.5.6.0 (2004/06/18) debugMsg 属æ?を追åŠ?—ã¾ã™ã?
502             * @og.rev 3.8.0.5 (2005/08/20) checkNames 属æ?を追åŠ?—ã¾ã™ã?
503             * @og.rev 3.8.5.1 (2006/05/08) modifyType 属æ?を追åŠ?—ã¾ã™ã?
504             * @og.rev 3.8.5.1 (2006/05/08) traceMsg 属æ?(トレース時ã?メãƒ?‚»ãƒ¼ã‚¸æ–?­—å?)を追åŠ?—ã¾ã™ã?
505             * @og.rev 4.0.0.0 (2005/08/31) quotCheck 属æ?ã®è¿½åŠ?
506             * @og.rev 4.0.0.0 (2007/10/10) dbid ã®åˆæœŸå€¤ã‚’ã?"DEFAULT" ã‹ã‚‰ null ã«å¤‰æ›´
507             * @og.rev 4.3.3.0 (2008/09/22) stopError 属æ?ã®è¿½åŠ?
508             * @og.rev 5.0.0.2 (2009/09/15) XSS対�
509             * @og.rev 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??ã€DBTableModelãŒæ–°è¦ä½œæ?ã•れãŸå?ç?§ã®ã¿è¡Œã†ã€?
510             * @og.rev 5.3.5.0 (2011/05/01) 処ç?™‚é–?queryTime)ãªã©ã®æƒ??出力ã?有効/無効を指定ã—ã¾ã™ã?
511             *
512             */
513            @Override
514            protected void release2() {
515                    super.release2();
516                    tableId                 = HybsSystem.TBL_MDL_KEY;
517                    queryType               = null;
518    //              dbid                    = "DEFAULT";
519                    dbid                    = null;
520                    command                 = CMD_NEW;
521                    skipRowCount    = 0;
522                    maxRowCount             = -1;
523                    table                   = null;
524                    sql                             = null;
525    //              displayMsg              = "MSG0033";    // ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€?
526                    displayMsg              = HybsSystem.sys( "VIEW_DISPLAY_MSG" );
527                    overflowMsg             = "MSG0007";    // æ¤œç´¢çµæžœãŒã?制é™è¡Œæ•°ã‚’è¶?ˆã¾ã—ãŸã®ã§ã€æ®‹ã‚Šã¯ã‚«ãƒ?ƒˆã•れã¾ã—ãŸã€?
528                    notfoundMsg             = "MSG0077";    // 対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸã€?
529                    executeCount    = -1;                   // 検索/実行件数
530                    names                   = null;
531                    outMessage              = true;
532                    trace                   = false;
533                    errCode                 = ErrorMessage.OK;
534                    errMessage              = null;
535                    stopZero                = false;
536                    stopError               = true;                 // 4.3.3.0 (2008/09/22)
537                    dyStart                 = 0;
538                    debugMsg                = null;                 // 3.5.6.0 (2004/06/18)
539                    checkNames              = null;                 // 3.8.0.5 (2005/08/20)
540                    quotCheck               = HybsSystem.sysBool( "USE_SQL_INJECTION_CHECK" );      // 4.0.0 (2005/08/31)
541                    modifyType      = null;                 // 3.8.5.1 (2006/05/08)
542                    traceMsg                = null;                 // 3.8.5.3 (2006/08/07)
543                    xssCheck                = HybsSystem.sysBool( "USE_XSS_CHECK" );        // 5.0.0.2 (2009/09/15)
544                    isMainTrans             = true;                 // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã?
545                    useBeforeHtmlTag        = true ;        // 5.3.5.0 (2011/05/01)
546            }
547    
548            /**
549             * Query を実行ã—ã¾ã™ã?
550             *
551             * @og.rev 2.1.2.3 (2002/12/02) ãƒ??タベã?ス更新時ã«ã€æ›´æ–°ãƒ•ラグをセãƒ?ƒˆã™ã‚‹ã‚ˆã†ã«å¤‰æ›´
552             * @og.rev 3.4.0.0 (2003/09/01) 登録エラー時ã?キーã¨å€¤ã‚’表示ã™ã‚‹ã‚ˆã†ã«å¤‰æ›´ã€?
553             * @og.rev 3.5.6.0 (2004/06/18) ãƒ?ƒãƒ?‚°æƒ??出力用ã«ã€printDebug メソãƒ?ƒ‰ã‚’追åŠ??
554             * @og.rev 3.6.1.0 (2005/01/05) エラーコードã«ã‚ˆã‚‹ commit/rollback ã®åˆ¤æ–­è¿½åŠ?
555             * @og.rev 5.3.7.0 (2011/07/01) nameã®åˆ¤å®šã«ã‚¼ãƒ­æ–?­—å?を付加
556             *
557             * @param       query オブジェク�
558             */
559            protected void execute( final Query query ) {
560                    String[] nameArray = null;
561                    String[] values    = null;
562                    try {
563    //                      if( names == null ) {
564                            if( names == null || names.length() == 0 ) {
565                                    query.execute();
566                            }
567                            else {
568                                    nameArray = StringUtil.csv2Array( names );
569                                    values = getRequest( nameArray );
570                                    // 3.5.6.0 (2004/06/18) ãƒ?ƒãƒ?‚°æƒ??出力用
571                                    if( isDebug() ) { printDebug( nameArray,values ); }
572                                    query.execute( values );
573                            }
574                            errCode = query.getErrorCode();
575                            errMessage = query.getErrorMessage();
576                            // 3.6.1.0 (2005/01/05) エラーコードã«ã‚ˆã‚‹ commit/rollback ã®åˆ¤æ–­è¿½åŠ?
577    //                      if( query.getUpdateFlag() ) {
578                            if( query.isUpdate() ) {
579                                    if( errCode < ErrorMessage.NG ) {            // 異常以下ã?å ´å?
580                                            query.commit();
581                                    }
582                                    else {
583                                            query.rollback();
584                                    }
585                            }
586                    }
587                    catch( HybsSystemException ex ) {
588                            query.rollback();
589    
590                            // 4.0.0 (2005/02/28) エラー時ã?表示ã¨ãƒ?ƒãƒ?‚°æ™‚ã?表示を統ä¸?™ã‚‹ã?
591                            String errMsg = "DATABASE ERROR! " + HybsSystem.CR ;
592                            if( nameArray != null ) {
593                                    printDebug( nameArray,values );
594                                    errMsg += debugMsg;
595                            }
596                            throw new HybsSystemException( errMsg,ex );             // 3.5.5.4 (2004/04/15) 引数ã®ä¸¦ã³é ?¤‰æ›´
597                    }
598                    finally {
599                            if( query != null ) { query.close(); }
600                    }
601            }
602    
603            /**
604             * ãƒ?ƒãƒ?‚°ç”¨ã«ã€??列データを書ãå?ã—ã¾ã™ã?
605             *
606             * @og.rev 3.5.6.0 (2004/06/18) æ–°è¦è¿½åŠ?
607             *
608             * @param       nms     引数 names ã®é…å?ãƒ??ã‚¿
609             * @param       vals    names ã«å¯¾å¿œã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆæƒ…å ±ã®é…å?
610             */
611            private void printDebug( final String[] nms,final String[] vals ) {
612                    if( debugMsg == null ) { debugMsg = new StringBuilder(); }
613    
614                    debugMsg.append( "  names=[" );
615                    debugMsg.append( StringUtil.array2csv( nms ) );
616                    debugMsg.append( "]" );
617                    debugMsg.append( HybsSystem.CR );
618                    debugMsg.append( "  values=[" );
619                    debugMsg.append( StringUtil.array2csv( vals ) );
620                    debugMsg.append( "]" );
621                    debugMsg.append( HybsSystem.CR );
622            }
623    
624            /**
625             * åç§°é…å?ã‚’å?ã«ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆæƒ…å ±ã®ãƒ??ã‚¿ã‚’å–å¾—ã—ã¾ã™ã?
626             * checkNames 属æ?ã«è¨­å®šã•れã¦ã?‚‹ã‚«ãƒ©ãƒ?Œã‚れã°ã€å?ã‚’æ­£è¦åŒ–ã—ã¾ã™ã?
627             *
628             * @og.rev 3.8.0.5 (2005/08/20) ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã®æ­£è¦åŒ–(checkNames)対å¿?
629             *
630             * @param       nameArray       キーã¨ãªã‚‹åç§°ã®é…å?
631             *
632             * @return      ãã?リクエスト情報ã®é…å?
633             */
634            protected String[] getRequest( final String[] nameArray ) {
635                    String[] rtn = new String[nameArray.length];
636    
637                    for( int i=0; i<rtn.length; i++ ) {
638                            rtn[i] = getRequestValue( nameArray[i] );
639    
640                            // 3.8.0.5 (2005/08/20) checkNames ãŒã‚りã?rtn[i] ãŒã‚ã‚‹å?åˆã?
641                            if( checkNames != null && checkNames.length() > 0 && rtn[i].length() > 0 ) {
642                                    if( ( "," + checkNames + "," ).indexOf( "," + nameArray[i] + "," ) >= 0 ) {
643                                            DBColumn dbColumn = getDBColumn( nameArray[i] );
644                                            String val = dbColumn.valueSet( rtn[i] );
645                                            if( val != null ) { rtn[i] = val; }
646                                    }
647                            }
648                    }
649    
650                    return rtn;
651            }
652    
653            /**
654             * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)ãƒ??ã‚¿ã®èª­ã¿å§‹ã‚ã®åˆæœŸå€¤ã‚’指定ã—ã¾ã™ã?
655             *
656             * @og.tag
657             * ãƒ??タベã?ス自体ã?検索ã¯,æŒ?®šã•れãŸSQLã®å…¨ä»¶ã‚’検索ã—ã¾ã™ãŒ,
658             * DBTableModelã®ãƒ??ã‚¿ã¨ã—ã¦ã¯ã€ã‚¹ã‚­ãƒ??ä»¶æ•°åˆ??登録ã•れã¾ã›ã‚“ã€?
659             * サーãƒã?ã®ãƒ¡ãƒ¢ãƒªè³?ºã¨å¿œç­”時間ã?確ä¿ã?為ã§ã™ã?
660             *
661             * @param       count 読ã¿å§‹ã‚ã®åˆæœŸå€¤
662             */
663            public void setSkipRowCount( final String count ) {
664                    skipRowCount = nval( getRequestParameter( count ),skipRowCount );
665            }
666    
667            /**
668             * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)ãƒ??ã‚¿ã®æœ?¤§èª­ã¿è¾¼ã¿ä»¶æ•°ã‚’指定ã—ã¾ã?
669             *              (åˆæœŸå€¤:DB_MAX_ROW_COUNT[={@og.value org.opengion.hayabusa.common.SystemData#DB_MAX_ROW_COUNT}])ã€?
670             *
671             * @og.tag
672             * ãƒ??タベã?ス自体ã?検索ã¯,æŒ?®šã•れãŸSQLã®å…¨ä»¶ã‚’検索ã—ã¾ã™ãŒ,
673             * DBTableModelã®ãƒ??ã‚¿ã¨ã—ã¦ç™»éŒ²ã™ã‚‹æœ?¤§ä»¶æ•°ã‚’ã“ã®å€¤ã«è¨­å®šã—ã¾ã™ã?
674             * サーãƒã?ã®ãƒ¡ãƒ¢ãƒªè³?ºã¨å¿œç­”時間ã?確ä¿ã?為ã§ã™ã?
675             * 0 ã‚’ã‚»ãƒ?ƒˆã™ã‚‹ã¨ã€ç„¡åˆ¶é™?Integer.MAX_VALUE)ã«ãªã‚Šã¾ã™ã?
676             * (åˆæœŸå€¤:ユーザー定数ã®DB_MAX_ROW_COUNT[={@og.value org.opengion.hayabusa.common.SystemData#DB_MAX_ROW_COUNT}])ã€?
677             *
678             * @og.rev 5.5.8.5 (2012/11/27) 0を無制é™ã¨ã—ã¦å‡¦ç?—ã¾ã™ã?
679             *
680             * @param       count æœ?¤§èª­ã¿è¾¼ã¿ä»¶æ•°
681             * @see         org.opengion.hayabusa.common.SystemData#DB_MAX_ROW_COUNT
682             */
683            public void setMaxRowCount( final String count ) {
684                    maxRowCount = nval( getRequestParameter( count ),maxRowCount );
685                    if( maxRowCount == 0 ) { maxRowCount = Integer.MAX_VALUE ; }            // 5.5.8.5 (2012/11/27)
686            }
687    
688            /**
689             * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)çµæžœã®DBTableModelã‚’ã?sessionã«ç™»éŒ²ã™ã‚‹ã¨ãã?キーを指定ã—ã¾ã?åˆæœŸå€¤:HybsSystem.TBL_MDL_KEY)ã€?
690             *
691             * @og.tag
692             * æ¤œç´¢çµæžœã‚ˆã‚Šã€DBTableModelオブジェクトを作æ?ã—ã¾ã™ã?ã“れをã?以下ã?view ç­‰ã?ã‚¿ã‚°ã«
693             * 渡ã™å?åˆã«ã€??常ã¯ã€session を利用ã—ã¾ã™ã?ãã?å ´åˆã?登録キーã§ã™ã?
694             * query ã‚¿ã‚°ã‚’åŒæ™‚ã«å®Ÿè¡Œã—ã¦ã€çµæžœã‚’求ã‚ã‚‹å?åˆã?åŒä¸?ƒ¡ãƒ¢ãƒªã«é…ç½®ã•れる為ã€?
695             * ã“ã? tableId 属æ?を利用ã—ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã‚’åˆ?‘ã¾ã™ã?
696             * åˆæœŸå€¤ã¯ã€HybsSystem.TBL_MDL_KEY (={@og.value org.opengion.hayabusa.common.HybsSystem#TBL_MDL_KEY})ã§ã™ã?
697             *
698             * @param       id sessionã«ç™»éŒ²ã™ã‚‹æ™‚ã? ID
699             */
700            public void setTableId( final String id ) {
701                    tableId   = nval( getRequestParameter( id ),tableId );  // 3.8.0.9 (2005/10/17)
702            }
703    
704            /**
705             * ã€TAG】Query を発行ã™ã‚‹ç‚ºã®ã‚¯ãƒ©ã‚¹ID(JDBC,JDBCCallable,JDBCErrMsg,JDBCUpdate)を指定ã—ã¾ã?{@og.doc03Link queryType åˆæœŸå€¤:JDBC})ã€?
706             *
707             * @og.tag
708             * 検索を実行ã™ã‚‹æ‰‹æ®µã¯ã€Query インターフェースã®å®Ÿè£?‚¯ãƒ©ã‚¹ã«ãªã‚Šã¾ã™ã?
709             * ã“ã?ã‚¿ã‚°ã§ã¯ã€Query.execute( String[] ) メソãƒ?ƒ‰ãŒå‘¼ã°ã‚Œã¾ã™ã?
710             * 例ãˆã°ã€ã‚¹ãƒˆã‚¢ãƒ‰ã?ロシージャ等を実行ã™ã‚‹å?åˆã«ã€queryType="JDBCErrMsg"
711             * を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã?
712             * åˆæœŸå€¤ã¯ã€?JDBC" ã§ã™ã?
713             * queryType ã¯ã€ã‚·ã‚¹ãƒ?ƒ ãƒªã‚½ãƒ¼ã‚¹ã® Query_**** 宣è¨?? **** を与ãˆã¾ã™ã?
714             * ã“れらã?ã€Query インターフェースを継承ã—ãŸã‚µãƒ–クラスã§ã‚ã‚‹å¿?¦ãŒã‚りã¾ã™ã?
715             * 標準ã§ã€org.opengion.hayabusa.db 以下ã? Query_**** クラスãŒã?Query_**** 宣è¨?ã¨
716             * ã—ã¦ã€å®šç¾©ã•れã¦ã?¾ã™ã?
717             * 属æ?クラス定義㮠{@link org.opengion.hayabusa.db.Query Query} ã‚’å‚照願ã„ã¾ã™ã?
718             * {@og.doc03Link queryType Query_**** クラス}
719             *
720             * @param       id Query を発行ã™ã‚‹ç‚ºã®å®Ÿã‚¯ãƒ©ã‚¹ ID
721             * @see         org.opengion.hayabusa.db.Query  Queryã®ã‚µãƒ–クラス
722             * @see         org.opengion.hayabusa.db.Query#execute( String[] )
723             */
724            public void setQueryType( final String id ) {
725                    queryType = getRequestParameter( id );
726            }
727    
728            /**
729             * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã™ã?
730             *
731             * @og.tag
732             * Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã™ã?
733             * ã“れã¯ã€ã‚·ã‚¹ãƒ?ƒ ãƒªã‚½ãƒ¼ã‚¹ã§ã€DEFAULT_DB_URL ç­‰ã§æŒ?®šã—ã¦ã?‚‹ ãƒ??タベã?ス接続å?
734             * æƒ??ã«ã€XX_DB_URL を定義ã™ã‚‹ã“ã¨ã§ã€?dbid="XX" ã¨ã™ã‚‹ã¨ã€ã“㮠接続å?を使用ã—ã¦
735             * ãƒ??タベã?スã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã?
736             *
737             * @param       id ãƒ??タベã?ス接続ID
738             */
739            public void setDbid( final String id ) {
740                    dbid = nval( getRequestParameter( id ),dbid );
741            }
742    
743            /**
744             * ã€TAG】コマンãƒ?NEW,RENEW)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?PlsqlUpdateTag,UpdateTag ã®å ´åˆã?ã€ENTRY)ã€?
745             *
746             * @og.tag
747             * コマンドã?,HTMLã‹ã‚‰(get/post)æŒ?®šã•れã¾ã™ã?ã§,CMD_xxx ã§è¨­å®šã•れる
748             * フィールド定数値ã®ã?¥ã‚Œã‹ã‚’ã?æŒ?®šã§ãã¾ã™ã?
749             *
750             * @param       cmd コマンãƒ?public static final 宣è¨?•れã¦ã?‚‹æ–?­—å?)
751             * @see         <a href="{&#064;docRoot}/constant-values.html#org.opengion.hayabusa.taglib.QueryTag.CMD_NEW">コマンド定数</a>
752             */
753            public void setCommand( final String cmd ) {
754                    String cmd2 = getRequestParameter( cmd );
755                    if( cmd2 != null && cmd2.length() >= 0 ) { command = cmd2.toUpperCase(Locale.JAPAN); }
756            }
757    
758            /**
759             * ã€TAGã€‘æ¤œç´¢çµæžœãŒï¼ä»¶ã®ã¨ãå?ç?‚’続行ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false[続行ã™ã‚‹])ã€?
760             *
761             * @og.tag
762             * åˆæœŸå€¤ã¯ã€false(続行ã™ã‚?ã§ã™ã?
763             *
764             * @param  cmd æ¤œç´¢çµæžœãŒï¼ä»¶ã®ã¨ãã?[true:処ç?‚’中止ã™ã‚‹/false:続行ã™ã‚‹]
765             */
766            public void setStopZero( final String cmd ) {
767                    stopZero = nval( getRequestParameter( cmd ),stopZero );
768            }
769    
770            /**
771             * ã€TAGã€‘æ¤œç´¢çµæžœã‚’ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?
772             *              (åˆæœŸå€¤:VIEW_DISPLAY_MSG[={@og.value org.opengion.hayabusa.common.SystemData#VIEW_DISPLAY_MSG}])ã€?
773             *
774             * @og.tag
775             * ã“ã“ã§ã¯ã€æ¤œç´¢çµæžœã®ä»¶æ•°ã‚?™»éŒ²ã•れãŸä»¶æ•°ã‚’ã¾ãšå?力ã—ã€?
776             * ãã?次ã«ã€ã“ã“ã§æŒ?®šã—ãŸãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’リソースã‹ã‚‰å–å¾—ã—ã¦è¡¨ç¤ºã—ã¾ã™ã?
777             * 件数を表示ã•ã›ãŸã„å ´åˆã?ã€displayMsg = "MSG0033"[ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸ] ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€?
778             * 表示ã•ã›ãŸããªã??åˆã?, displayMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€?
779             * (åˆæœŸå€¤:シスãƒ?ƒ å®šæ•°ã®VIEW_DISPLAY_MSG[={@og.value org.opengion.hayabusa.common.SystemData#VIEW_DISPLAY_MSG}])ã€?
780             *
781             * @param       id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID
782             * @see         org.opengion.hayabusa.common.SystemData#VIEW_DISPLAY_MSG
783             */
784            public void setDisplayMsg( final String id ) {
785                    String ids = getRequestParameter( id );
786                    if( ids != null ) { displayMsg = ids; }
787            }
788    
789            /**
790             * ã€TAG】検索ãƒ??ã‚¿ãŒæœ€å¤§æ¤œç´¢æ•°ã‚’オーãƒã?ã—ãŸå ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?
791             *              (åˆæœŸå€¤:MSG0007[æ¤œç´¢çµæžœãŒã?制é™è¡Œæ•°ã‚’è¶?ˆã¾ã—ãŸã®ã§ã€æ®‹ã‚Šã¯ã‚«ãƒ?ƒˆã•れã¾ã—ãŸ])ã€?
792             *
793             * @og.tag
794             * æ¤œç´¢çµæžœãŒã?maxRowCount ã§è¨­å®šã•れãŸå€¤ã‚ˆã‚Šå¤šã„å ´åˆã?何らã‹ã?ãƒ??ã‚¿ã¯æ¤œç´¢ã•れã?
795             * åˆ?‚Šæ¨ã¦ã‚‰ã‚ŒãŸã“ã¨ã«ãªã‚Šã¾ã™ã?
796             * ã“ã“ã§ã¯ã€displayMsg を表示ã—ãŸå¾Œã?å¿?¦ã«å¿œã˜ã¦ã€ã“ã®ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ã?
797             * 表示ã•ã›ãŸããªã??åˆã?, overflowMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€?
798             * åˆæœŸå€¤ã¯ã€MSG0007[æ¤œç´¢çµæžœãŒã?制é™è¡Œæ•°ã‚’è¶?ˆã¾ã—ãŸã®ã§ã€æ®‹ã‚Šã¯ã‚«ãƒ?ƒˆã•れã¾ã—ãŸ]ã§ã™ã?
799             *
800             * @param       id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID
801             */
802            public void setOverflowMsg( final String id ) {
803                    String ids = getRequestParameter( id );
804                    if( ids != null ) { overflowMsg = ids; }
805            }
806    
807            /**
808             * ã€TAGã€‘æ¤œç´¢çµæžœãŒã‚¼ãƒ­ä»¶ã®å ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ])ã€?
809             *
810             * @og.tag
811             * ã“ã“ã§ã¯ã€æ¤œç´¢çµæžœãŒã‚¼ãƒ­ä»¶ã®å ´åˆã?ã¿ã€ç‰¹åˆ¥ãªãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’表示ã•ã›ã¾ã™ã?
812             * 従æ¥ã¯ã€displayMsg ã¨å…¼ç”¨ã§ã€ã?0ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€ã¨ã?†è¡¨ç¤ºã§ã—ãŸãŒã?
813             * displayMsg ã®åˆæœŸè¡¨ç¤ºã¯ã€OFF ã«ãªã‚Šã¾ã—ãŸã®ã§ã€ã‚¼ãƒ­ä»¶ã®å ´åˆã?ã¿åˆ¥ã«è¡¨ç¤ºã•ã›ã¾ã™ã?
814             * 表示ã•ã›ãŸããªã??åˆã?, notfoundMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€?
815             * åˆæœŸå€¤ã¯ã€MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ]ã§ã™ã?
816             *
817             * @param       id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID
818             */
819            public void setNotfoundMsg( final String id ) {
820                    String ids = getRequestParameter( id );
821                    if( ids != null ) { notfoundMsg = ids; }
822            }
823    
824            /**
825             * ã€TAG】PL/SQLを利用ã™ã‚‹å ´åˆã?引数ã«ã‚»ãƒ?ƒˆã™ã¹ã?ãƒ??ã‚¿ã®åç§°ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã™ã?
826             *
827             * @og.tag
828             * è¤?•°ã‚ã‚‹å ´åˆã?ã€ã‚«ãƒ³ãƒžåŒºåˆ?‚Šæ–?­—ã§æ¸¡ã—ã¾ã™ã?
829             * names 属æ?ã¯ã€queryType ã«å¿œã˜ã¦è¨­å®šå¯å¦ãŒç•°ãªã‚Šã¾ã™ã?ã§ã€ã”注æ„ãã?•ã??
830             * names ãªã—:JDBC,JDBCUpdate
831             * names ã‚り?šJDBCCallable,JDBCErrMsg,JDBCUpdate
832             * (JDBCUpdateã¯ã€names 属æ?ã®ã‚り/ãªã—両方ã«å¯¾å¿œã—ã¦ã?¾ã™ã?)
833             *
834             * @og.rev 3.0.1.3 (2003/03/11) names 属æ?ã« null ã§æ¸¡ã™å?åˆã?ãƒã‚°ã‚’修正
835             *
836             * @param       nm 引数ã®åç§°(è¤?•°ã‚ã‚‹å ´åˆã?ã€ã‚«ãƒ³ãƒžåŒºåˆ?‚Šæ–?­?
837             */
838            public void setNames( final String nm ) {
839                    names = nval( getRequestParameter( nm ),names );
840            }
841    
842            /**
843             * ã€TAGã€‘æ¤œç´¢çµæžœã®ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’表示ã™ã‚‹/ã—ãªã„[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:true)ã€?
844             *
845             * @og.tag
846             * åˆæœŸå€¤ã¯ã€è¡¨ç¤ºã™ã‚‹?štrue ã§ã™ã?
847             *
848             * @param       flag  [true:表示ã™ã‚‹/ãれ以å¤?å«ã‚ãªã„]
849             */
850            public void setOutMessage( final String flag ) {
851                    outMessage = nval( getRequestParameter( flag ),outMessage );
852            }
853    
854            /**
855             * ã€TAG】引数㮠SQL æ–?‚’ EXPLAIN PLAN ã‚’[true:行ã†/ãれ以å¤?行ã‚ãªã„]を指定ã—ã¾ã?åˆæœŸå€¤:false)ã€?
856             *
857             * @og.tag
858             *
859             * ã“ã“ã§ã¯ã€ä»¥ä¸‹ã?処ç?‚’行ã„ã¾ã™ã?
860             * ?‘.引数㮠SQL æ–?‚’ç”»é¢ã«è¡¨ç¤ºã—ã¾ã™ã?
861             * ?’.引数㮠SQL æ–?‚’ EXPLAIN PLAN ã—ãŸçµæžœã‚’ã?ç”»é¢ã«è¡¨ç¤ºã—ã¾ã™ã?
862             * ãªãŠã?以å‰ã?ã€ã‚»ãƒ?‚·ãƒ§ãƒ³ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’行ã£ã¦ã?¾ã—ãŸãŒã?ãã?機è?ã¯ã€å»?­¢ã?Ÿã—ã¾ã™ã?
863             * åˆæœŸå€¤ã¯ã€è¡Œã‚ãªã?¼šfalse ã§ã™ã?
864             *
865             * @param       flag トレース [true:行ã†/ãれ以å¤?行ã‚ãªã„]
866             */
867            public void setTrace( final String flag ) {
868                    trace = nval( getRequestParameter( flag ),trace );
869            }
870    
871            /**
872             * ã€TAGã€‘ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã®æ­£è¦åŒ–を行ã†ã‚«ãƒ©ãƒ?‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã™ã?
873             *
874             * @og.tag
875             * PL/SQLを利用ã™ã‚‹å ´åˆã?引数ã«ã‚»ãƒ?ƒˆã™ã¹ã?ãƒ??ã‚¿ã‚’ã?リクエスト変数ã®
876             * 値ãã?ã¾ã¾ã§ã¯ãªãã?カラãƒ?‚ªãƒ–ジェクトã? valueSet メソãƒ?ƒ‰çµŒç”±ã§æ­£è¦åŒ–
877             * ã—ãŸå€¤ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™ã?
878             *
879             * @og.rev 3.8.0.5 (2005/08/20) æ–°è¦è¿½åŠ?
880             *
881             * @param       nm ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã®æ­£è¦åŒ–を行ã†ã‚«ãƒ©ãƒ?
882             */
883            public void setCheckNames( final String nm ) {
884                    checkNames = nval( getRequestParameter( nm ),checkNames );
885            }
886    
887            /**
888             * ã€TAG】DB検索時ã? モãƒ?‚£ãƒ•ァイタイプをæŒ?®šã—ã¾ã™[A:追åŠ?C:æ›´æ–°/D:削除]ã€?
889             *
890             * @og.tag
891             * DB検索時ã«ã€ãã®ãƒ??ã‚¿ã‚’A(追åŠ?ã€C(æ›´æ–°)ã€D(削除)ã®ãƒ¢ãƒ?‚£ãƒ•ァイタイプを
892             * ã¤ã‘ãŸçŠ¶æ…‹ã«ã—ã¾ã™ã?
893             * ãã?状態ã§ã€ãã®ã¾ã¾ã€update ã™ã‚‹äº‹ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã?
894             *
895             * @og.rev 3.8.5.1 (2006/05/08) æ–°è¦è¿½åŠ?
896             *
897             * @param   type DB検索時ã? モãƒ?‚£ãƒ•ァイタイãƒ?[A:追åŠ?C:æ›´æ–°/D:削除]
898             */
899            public void setModifyType( final String type ) {
900                    modifyType = nval( getRequestParameter( type ),modifyType );
901            }
902    
903            /**
904             * ã€TAG】リクエスト情報㮠クォーãƒ?‚£ã‚·ãƒ§ãƒ³(') 存在ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]を設定ã—ã¾ã?
905             *              (åˆæœŸå€¤:USE_SQL_INJECTION_CHECK[={@og.value org.opengion.hayabusa.common.SystemData#USE_SQL_INJECTION_CHECK}])ã€?
906             *
907             * @og.tag
908             * ?³?±?¬ã‚¤ãƒ³ã‚¸ã‚§ã‚¯ã‚·ãƒ§ãƒ³å¯¾ç­–ã?ä¸?¤ã¨ã—ã¦ã€æš«å®šçš„ã§ã¯ã‚りã¾ã™ãŒã€SQLã®ãƒ‘ラメータã«
909             * æ¸¡ã™æ–‡å­—å?ã«ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³(') を許ã•ãªã?¨­å®šã«ã™ã‚Œã°ã€ã‚る程度ã¯é˜²æ­¢ã§ãã¾ã™ã?
910             * 数字タイプã?引数ã«ã¯ã€?or 5=5 ãªã©ã®ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³ã‚’使用ã—ãªã?‚³ãƒ¼ãƒ‰ã‚’埋ã‚ã¦ã‚‚ã?
911             * æ•°å­—ãƒã‚§ãƒ?‚¯ã§æ¤œå?å¯èƒ½ã§ã™ã?æ–?­—タイプã?å ´åˆã?ã€å¿?š (')ã‚’ã?ãšã—ã¦ã€?
912             * ' or 'A' like 'A ã®ã‚ˆã†ãªå½¢å¼ã«ãªã‚‹ç‚ºã€?')ãƒã‚§ãƒ?‚¯ã?‘ã§ã‚‚有効ã§ã™ã?
913             * (') ãŒå«ã¾ã‚Œã¦ã?Ÿã‚¨ãƒ©ãƒ¼ã«ã™ã‚‹(true)?ã‹ãƒŽã?ãƒã‚§ãƒ?‚¯ã?false)を指定ã—ã¾ã™ã?
914             * åˆæœŸå€¤ã¯ã€SystemData#USE_SQL_INJECTION_CHECK ã§ã™ã?
915             *
916             * @og.rev 4.0.0.0 (2005/08/31) æ–°è¦è¿½åŠ?
917             *
918             * @param   flag クォーãƒ?‚£ã‚·ãƒ§ãƒ³ãƒã‚§ãƒ?‚¯ [true:ã™ã‚‹/ãれ以å¤?ã—ãªã„]
919             */
920            public void setQuotCheck( final String flag ) {
921                    quotCheck = nval( getRequestParameter( flag ),quotCheck );
922            }
923    
924            /**
925             * ã€TAG】リクエスト情報㮠HTMLTagé–‹å§?終äº?–‡å­?&gt;&lt;) 存在ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]を設定ã—ã¾ã?
926             *              (åˆæœŸå€¤:USE_XSS_CHECK[={@og.value org.opengion.hayabusa.common.SystemData#USE_XSS_CHECK}])ã€?
927             *
928             * @og.tag
929             * クロスサイトスクリプティング(XSS)対策ã?ä¸?’°ã¨ã—ã¦less/greater than signã«ã¤ã?¦ã®ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
930             * (&gt;&lt;) ãŒå«ã¾ã‚Œã¦ã?Ÿã‚¨ãƒ©ãƒ¼ã«ã™ã‚‹(true)?ã‹ãƒŽã?ãƒã‚§ãƒ?‚¯ã?false)を指定ã—ã¾ã™ã?
931             * (åˆæœŸå€¤:シスãƒ?ƒ å®šæ•°ã®USE_XSS_CHECK[={@og.value org.opengion.hayabusa.common.SystemData#USE_XSS_CHECK}])
932             *
933             * @og.rev 5.0.0.2 (2009/09/15) æ–°è¦è¿½åŠ?
934             *
935             * @param       flag    XSSãƒã‚§ãƒ?‚¯ [true:ã™ã‚‹/false:ã—ãªã„]
936             * @see         org.opengion.hayabusa.common.SystemData#USE_XSS_CHECK
937             */
938            public void setXssCheck( final String flag ) {
939                    xssCheck = nval( getRequestParameter( flag ),xssCheck );
940            }
941    
942            /**
943             * ã€TAG】PLSQL/SQL処ç?‚¨ãƒ©ãƒ¼ã®æ™‚ã«å‡¦ç?‚’中止ã™ã‚‹ã‹ã©ã?‹[true/false]を設定ã—ã¾ã?åˆæœŸå€¤:true)ã€?
944             *
945             * @og.tag
946             * false(中止ã—ãªã?ã«è¨­å®šã™ã‚‹å?åˆã?後続å?ç?§ã¯ã€{&#064;DB.ERR_CODE}ã®å€¤ã«ã‚ˆã‚Šã€?
947             * PLSQL/SQLã®ç•°å¸¸/正常終äº?«ã‚ˆã£ã¦åˆ?²å?ç??å¯èƒ½ã¨ãªã‚Šã¾ã™ã?
948             * åˆæœŸå€¤ã¯ã€true(中止ã™ã‚‹)ã§ã™ã?
949             *
950             * @og.rev 4.3.3.0 (2008/09/22) æ–°è¦è¿½åŠ?
951             *
952             * @param   flag  [true:中止ã™ã‚‹/false:中止ã—ãªã„]
953             */
954            public void setStopError( final String flag ) {
955                    stopError = nval( getRequestParameter( flag ),stopError );
956            }
957    
958            /**
959             * 引数㮠SQL æ–?‚’ EXPLAIN PLAN ã—ã¾ã™ã?
960             *
961             * ã“ã“ã§ã¯ã€ä»¥ä¸‹ã?処ç?‚’行ã„ã¾ã™ã?
962             * ?‘.引数㮠SQL æ–?‚’ç”»é¢ã«è¡¨ç¤ºã—ã¾ã™ã?
963             * ?’.引数㮠SQL æ–?‚’ EXPLAIN PLAN ã—ãŸçµæžœã‚’ã?ç”»é¢ã«è¡¨ç¤ºã—ã¾ã™ã?
964             * ãªãŠã?ã“ã?処ç??ã€ORACLE 専用処ç?§ã™ã?
965             *
966             * @og.rev 3.8.5.3 (2006/08/07) æ–°è¦è¿½åŠ?
967             * @og.rev 3.8.7.0 (2006/12/15) アクセスログå–å¾—ã?為,ApplicationInfoオブジェクトを設å®?
968             * @og.rev 5.1.9.0 (2010/08/01) Transaction 対応ã—ã¾ã™ã?
969             * @og.rev 5.5.3.4 (2012/06/19) getUserInfo ã¯ã€ã‚­ãƒ¼éƒ¨åˆ? ã‘ã§å‡¦ç?—ã¾ã™ã?
970             *
971             * @param   sql         EXPLAIN PLANã™ã‚‹SQL æ–?
972             * @param   tran        Transactionオブジェク�
973             *
974             * @return ãƒˆãƒ¬ãƒ¼ã‚¹çµæžœã®æ–?­—å?
975             */
976    //      private String traceQuery( final String sql ) {
977            private String traceQuery( final String sql , final Transaction tran ) {
978    //              ApplicationInfo appInfo = getApplicationInfo();
979    
980    //              String userId = getUserInfo( "USER.ID" ) ;
981                    String userId = getUserInfo( "ID" ) ;                   // 5.5.3.4 (2012/06/19) getUserInfo ã¯ã€ã‚­ãƒ¼éƒ¨åˆ? ã‘ã§å‡¦ç?—ã¾ã™ã?
982    
983                    String[] arg1 = new String[] { userId };
984    //              DBUtil.dbExecute( "DELETE FROM PLAN_TABLE WHERE STATEMENT_ID = ?",arg1,appInfo,dbid );
985                    DBUtil.dbExecute( "DELETE FROM PLAN_TABLE WHERE STATEMENT_ID = ?",arg1,tran,dbid );             // 5.1.9.0 (2010/08/01)
986    
987                    String explan1 = "EXPLAIN PLAN SET STATEMENT_ID = '" + userId + "' FOR " + sql ;
988    //              DBUtil.dbExecute( explan1,null,appInfo,dbid );
989                    DBUtil.dbExecute( explan1,null,tran,dbid );             // 5.1.9.0 (2010/08/01)
990    
991                    String[] arg2 = new String[] { userId,userId,userId };
992    //              String explan2 = "SELECT LEVEL,LPAD(' ',LEVEL,' ') || RTRIM( OPERATION ) || ' ' ||"
993    //                                              + " RTRIM( OPTIONS )   || ' ' || RTRIM( OBJECT_NAME )"
994    //                                              + " FROM PLAN_TABLE"
995    //                                              + " WHERE STATEMENT_ID = ?"
996    //                                              + " CONNECT BY PRIOR ID = PARENT_ID"
997    //                                              + "         AND STATEMENT_ID = ?"
998    //                                              + " START WITH ID = 0"
999    //                                              + "         AND STATEMENT_ID = ?" ;
1000                    String explan2 = "select LEVEL as LVL"
1001                                                            + ",lpad(' ',LEVEL,' ') || rtrim( OPERATION ) || ' ' || rtrim( OPTIONS ) || ' ' || rtrim( OBJECT_NAME ) as EXECUTION_PLAN"
1002                                                            + ",OBJECT_NAME                 as OBJ_NAME"
1003                                                            + ",DECODE(INSTR(OBJECT_TYPE,' '),0,OBJECT_TYPE,SUBSTR(OBJECT_TYPE,1,INSTR(OBJECT_TYPE,' ')-1)) as OBJ_TYPE"
1004                                                            + ",OPTIMIZER                   as OPT"
1005                                                            + ",COST                                as CST"
1006                                                            + ",CARDINALITY                 as CARD"
1007                                                            + ",BYTES                               as BYTE"
1008                                                            + ",ACCESS_PREDICATES   as ACCS"
1009                                                            + ",FILTER_PREDICATES   as FILTER"
1010                                                    + " from PLAN_TABLE"
1011                                                    + " where STATEMENT_ID = ?"
1012                                                    + " start with ID = 0"
1013                                                    + "       and STATEMENT_ID = ?"
1014                                                    + " connect by prior ID = PARENT_ID"
1015                                                    + "       and STATEMENT_ID = ?" ;
1016    //              String[][] plan = DBUtil.dbExecute( explan2,arg2,appInfo,dbid );
1017    //              String[][] plan = DBUtil.dbExecute( explan2,arg2,tran,dbid );                   // 5.1.9.0 (2010/08/01)
1018    
1019    //              StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_MIDDLE );
1020    //              buf.append( "<pre>" ).append( sql ).append( "</pre>" ).append( HybsSystem.BR );
1021    //              buf.append( "<table>" );
1022    //              buf.append( "<tr  class=\"row_h\"><th>LEVEL</th><th>EXECUTION_PLAN</th></tr>" );
1023    //              for( int i=0; i<plan.length; i++ ) {
1024    //                      buf.append( "<tr class=\"row_" ).append( i%2 ).append( "\">" );
1025    //                      buf.append( "<td>" ).append( plan[i][0] ).append( "</td>" );
1026    //                      buf.append( "<td><pre>" ).append( plan[i][1] ).append( "</td></tr>" );
1027    //              }
1028    //              buf.append( "</table>" ).append( HybsSystem.BR );
1029    
1030                    String[][] plan = DBUtil.dbExecute( explan2,arg2,tran,dbid,true );                      // 5.5.3.4 (2012/06/19) ヘッãƒ??æƒ??ã‚‚åŒæ™‚ã«å–å¾—ã™ã‚‹ã?
1031    
1032                    StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_MIDDLE );
1033                    buf.append( "<pre>" ).append( sql ).append( "</pre>" ).append( HybsSystem.BR );
1034                    buf.append( "<table>" );
1035                    // 1行目ã®ãƒ˜ãƒƒãƒ??ã®å‡ºåŠ?
1036                    int colsize = plan[0].length;
1037                    buf.append( "<tr class=\"row_h\">" );
1038                    for( int j=0; j<colsize; j++ ) {
1039                            buf.append( "<th>" ).append( plan[0][j] ).append( "</th>" );
1040                    }
1041                    buf.append( "</tr>" );
1042    
1043                    for( int i=1; i<plan.length; i++ ) {
1044                            buf.append( "<tr class=\"row_" ).append( i%2 ).append( "\">" );
1045                            for( int j=0; j<colsize; j++ ) {
1046                                    if( j==1 ) {
1047                                            buf.append( "<td><pre>" ).append( plan[i][1] ).append( "</pre></td>" );
1048                                    }
1049                                    else {
1050                                            buf.append( "<td>" ).append( plan[i][j] ).append( "</td>" );
1051                                    }
1052                            }
1053                            buf.append( "</tr>" );
1054                    }
1055                    buf.append( "</table>" ).append( HybsSystem.BR );
1056                    return buf.toString();
1057            }
1058    
1059            /**
1060             * ã€TAGã€?通常使ã?¾ã›ã‚“)ã‚¿ã‚°ã§å‡¦ç?•れる処ç?Œãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç?‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:true)ã€?
1061             *
1062             * @og.tag
1063             * ã“ã?値ã¯ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰å?ç?«å½±éŸ¿ã—ã¾ã™ã?ã“ã?値ãŒtrueã«æŒ?®šã•ã‚ŒãŸæ™‚ã«commitã•れãŸDBTableModelã?
1064             * ファイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã?対象ã®è¡¨ã«ãªã‚Šã¾ã™ã?
1065             *
1066             * ã“ã?パラメーターã¯ã€??常ã€å„ã‚¿ã‚°ã«ã‚ˆã‚Šå®Ÿè£?•れã?ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæŒ‡å®šã™ã‚‹å¿?¦ã?ã‚りã¾ã›ã‚“ã€?
1067             * ä½?—ã€?ã¤ã®JSPå†?§DBTableModelãŒè¤?•°ç”Ÿæ?ã•れるå?åˆã«ã€å‰ã«å‡¦ç?—ãŸDBTableModelã«ã¤ã?¦ãƒ•ァイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’ã•ã›ãŸã„
1068             * å ´åˆã?ã€å¾Œã‚ã§DBTableModelを生æˆã™ã‚‹ã‚¿ã‚°ã§ã€æ?示çš?«ã“ã?値をfalseã«æŒ?®šã™ã‚‹ã“ã¨ã§ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰å?ç??対象ã‹ã‚‰
1069             * 除外ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã?
1070             *
1071             * @og.rev 5.1.6.0 (2010/05/01) æ–°è¦ä½œæ?
1072             *
1073             * @param  flag メイントランザクションã‹ã©ã?‹
1074             */
1075            public void setMainTrans( final String flag ) {
1076                    isMainTrans = nval( getRequestParameter( flag ),isMainTrans );
1077            }
1078    
1079            /**
1080             * ã€TAGã€?処ç?™‚é–?queryTime)ãªã©ã®æƒ??出力[true:有効/false:無効]を指定ã—ã¾ã?åˆæœŸå€¤:true)ã€?
1081             *
1082             * @og.tag
1083             * Query ã§ã€æ¤œç´¢ã™ã‚‹å ´åˆã«ã€å?ç?™‚é–?queryTime)ãªã©ã®æƒ??ã‚’å?力ã—ã¦ã?¾ã™ãŒã€?
1084             * ViewForm ã§ã€CustomData ãªã©ã® éžHTML表示ビューを使用ã™ã‚‹å ´åˆã?ãƒ??ã‚¿ã¨ã—ã¦ã€?
1085             * 紛れ込んã§ã—ã¾ã?Ÿã‚ã?出力を抑制ã™ã‚‹å¿?¦ãŒã‚りã¾ã™ã?
1086             * true(有効)ã«ã™ã‚‹ã¨ã€ã“れらã®HTMLãŒå?力ã•れã¾ã™ã?false ã«ã™ã‚‹ã¨ã€å?力ã•れã¾ã›ã‚“ã€?
1087             * åˆæœŸå€¤ã¯ã€true(有効) ã§ã™ã?
1088             *
1089             * @og.rev 5.3.5.0 (2011/05/01) æ–°è¦è¿½åŠ?
1090             *
1091             * @param  useTag  æƒ??出力ã?有効/無効を指å®?[true:有効/false:無効]
1092             */
1093            public void setUseBeforeHtmlTag( final String useTag ) {
1094                    useBeforeHtmlTag = nval( getRequestParameter( useTag ),useBeforeHtmlTag );
1095            }
1096    
1097            /**
1098             * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºæ›¸ãè¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
1099             *
1100             * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ?
1101             * @serialData
1102             *
1103             * @param       strm    ObjectOutputStreamオブジェク�
1104             */
1105            private void writeObject( final ObjectOutputStream strm ) throws IOException {
1106                    strm.defaultWriteObject();
1107            }
1108    
1109            /**
1110             * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºèª­ã¿è¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
1111             *
1112             * ã“ã“ã§ã¯ã€transient 宣è¨?•れãŸå†?ƒ¨å¤‰æ•°ã®å†??åˆæœŸåŒ–ãŒå¿?¦ãªãƒ•ィールドã?ã¿è¨­å®šã—ã¾ã™ã?
1113             *
1114             * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ?
1115             * @serialData
1116             *
1117             * @param       strm    ObjectInputStreamオブジェク�
1118             * @see #release2()
1119             */
1120            private void readObject( final ObjectInputStream strm ) throws IOException , ClassNotFoundException {
1121                    strm.defaultReadObject();
1122            }
1123    
1124            /**
1125             * ã“ã?オブジェクトã?æ–?­—å?表ç¾ã‚’è¿”ã—ã¾ã™ã?
1126             * 基本çš?«ãƒ?ƒãƒ?‚°ç›®çš?«ä½¿ç”¨ã—ã¾ã™ã?
1127             *
1128             * @return ã“ã?ã‚¯ãƒ©ã‚¹ã®æ–?­—å?表ç¾
1129             */
1130            @Override
1131            public String toString() {
1132                    return sql ;
1133    
1134            //      return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
1135            //                      .println( "VERSION"                     ,VERSION                )
1136            //                      .println( "tableId"                     ,tableId                )
1137            //                      .println( "queryType"           ,queryType              )
1138            //                      .println( "dbid"                        ,dbid                   )
1139            //                      .println( "command"                     ,command                )
1140            //                      .println( "skipRowCount"        ,skipRowCount   )
1141            //                      .println( "maxRowCount"         ,maxRowCount    )
1142            //                      .println( "sql"                         ,sql                    )
1143            //                      .println( "displayMsg"          ,displayMsg             )
1144            //                      .println( "overflowMsg"         ,overflowMsg    )
1145            //                      .println( "executeCount"        ,executeCount   )
1146            //                      .println( "names"                       ,names                  )
1147            //                      .println( "outMessage"          ,outMessage             )
1148            //                      .println( "trace"                       ,trace                  )
1149            //                      .println( "errCode"                     ,errCode                )
1150            //                      .println( "stopZero"            ,stopZero               )
1151            //                      .println( "quotCheck"           ,quotCheck              )
1152            //                      .println( "dyStart"                     ,dyStart                )
1153            //                      .println( "checkNames"          ,checkNames             )
1154            //                      .println( "Other..."            ,getAttributes().getAttribute() )
1155            //                      .fixForm().toString() ;
1156            }
1157    }