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.resource.UserInfo; 019 import org.opengion.hayabusa.db.DBTableModel; 020 import org.opengion.hayabusa.db.Query; 021 import org.opengion.hayabusa.db.QueryFactory; 022 import org.opengion.fukurou.db.Transaction; 023 import org.opengion.fukurou.db.TransactionReal; 024 025 import static org.opengion.fukurou.util.StringUtil.nval ; 026 027 import java.util.Locale ; 028 import java.io.ObjectOutputStream; 029 import java.io.ObjectInputStream; 030 import java.io.IOException; 031 032 /** 033 * ユーザーæƒ??を管ç?—ã¦ã?‚‹ã‚¿ã‚°ã§ã™ã? 034 * 035 * è¨å®šã—ãŸå?ã¯ã€{@USER.XXXX} å½¢å¼ã§ å–り出ã™ã“ã¨ãŒã§ãã¾ã™ã? 036 * ã¾ãŸã?command 属æ?㧠直接画é¢ã«å€¤ã‚’書ãå?ã™ã“ã¨ã‚‚å¯èƒ½ã§ã™ã? 037 * 038 * 以下ã?値㯠UserInfo オブジェクトã?é ?›®ã‹ã‚‰å–å¾—ã—ã¾ã™ã? 039 * ・USER.JNAME ユーザー日本語åç§° 040 * ・USER.ID ユーザー?©?¤ 041 * ・USER.IDNO USER.ID ãŒï¼•Byte以上ã?時ã?ã¿å…ˆé??‘æ–‡å—を除ã?Ÿãƒ¦ãƒ¼ã‚¶ãƒ¼?©?¤ 042 * ・USER.INFO ユーザーæƒ??(ユーザーID?šæ—¥æœ¬èªžåç§°) 043 * ・USER.LANG è¨?ª? 044 * ・USER.ROLES ãƒãƒ¼ãƒ« 045 * ・USER.IPADDRESS IPアドレス 046 * ・USER.LOGINTIME ãƒã‚°ã‚¤ãƒ³æ™‚刻 047 * 048 * 以下ã?値ã¯ã‚らã‹ã˜ã‚ã?å‹•çš„ã«ä½œæ?ã•れã¾ã™ã? 049 * ・USER.YMD ?˜byte ã®ä»Šæ—¥ã®ã‚·ã‚¹ãƒ?ƒ æ—¥ä»? 050 * ・USER.YMDH ?‘ï¼”byte ã®ä»Šæ—¥ã®ã‚·ã‚¹ãƒ?ƒ æ—¥æ™? 051 * 052 * ãれ以外ã?ã€å¤–部よりè¨å®šã•れãŸå€¤ã§ã™ã? 053 * 054 * ※ ã“ã?ã‚¿ã‚°ã¯ã€Transaction ã‚¿ã‚°ã®å¯¾è±¡ã§ã™ã? 055 * 056 * @og.formSample 057 * â—å½¢å¼ï¼?lt;og:userInfo command="[…]" key="[…]" value="[…]" /> 058 * â—body?šã‚ã‚? 059 * 060 * â—Tag定義?? 061 * <og:userInfo 062 * command ã€TAG】コマンãƒ?SET,GET,NVLEGT,REMOVE,SQL)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:SET) 063 * key ã€TAG】UserInfo ã«ç™»éŒ²ã™ã‚‹ã‚ーをセãƒ?ƒˆã—ã¾ã?予ç´?ª?JNAME,ID,PASSWD,IDNO,INFO,LANG,ROLE,IPADDRESS,LOGINTIME) 064 * value ã€TAG】UserInfo ã«ç™»éŒ²ã™ã‚‹å€¤ã‚’ã‚»ãƒ?ƒˆã—ã¾ã? 065 * dbid ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã? 066 * save ã€TAG】UserInfo ã«ç™»éŒ²ã—ãŸå€¤ã‚’永続化ã™ã‚‹ã‹ã‚’æŒ?®šã—ã¾ã? 067 * caseKey ã€TAG】ã“ã®ã‚¿ã‚°è‡ªä½“を利用ã™ã‚‹ã‹ã©ã?‹ã®æ¡ä»¶ã‚ーを指定ã—ã¾ã?åˆæœŸå€¤:null) 068 * caseVal ã€TAG】ã“ã®ã‚¿ã‚°è‡ªä½“を利用ã™ã‚‹ã‹ã©ã?‹ã®æ¡ä»¶å€¤ã‚’指定ã—ã¾ã?åˆæœŸå€¤:null) 069 * debug ã€TAG】デãƒãƒƒã‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false) 070 * > ... Body ... 071 * </og:userInfo> 072 * 073 * â—使用ä¾? 074 * <og:userInfo 075 * command = "コマンãƒ?SET,GET,NVLEGT,REMOVE,SQL)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:SET)ã€?quot; 076 * key = "UserInfo ã«ç™»éŒ²ã™ã‚‹ã‚ーをセãƒ?ƒˆã—ã¾ã?予ç´?ª?JNAME,ID,PASSWD,IDNO,INFO,LANG,ROLE,IPADDRESS,LOGINTIME)ã€?quot; 077 * value = "UserInfo ã«ç™»éŒ²ã™ã‚‹å€¤ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?" 078 * dbid = "(通常ã¯ä½¿ã?¾ã›ã‚“)Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã™ã?" 079 * > 080 * 081 * @og.group ãã?他部å“? 082 * 083 * @version 4.0 084 * @author Kazuhiko Hasegawa 085 * @since JDK5.0, 086 */ 087 public class UserInfoTag extends CommonTagSupport { 088 //* ã“ã?プãƒã‚°ãƒ©ãƒ??VERSIONæ–?—å?ã‚’è¨å®šã—ã¾ã™ã? {@value} */ 089 private static final String VERSION = "5.3.8.0 (2011/08/01)" ; 090 091 private static final long serialVersionUID = 538020110801L ; 092 093 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? ã‚»ãƒ?ƒˆ {@value} */ 094 public static final String CMD_SET = "SET" ; 095 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? ゲãƒ?ƒˆ {@value} */ 096 public static final String CMD_GET = "GET" ; 097 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? ゲãƒ?ƒˆ {@value} */ 098 public static final String CMD_REMOVE = "REMOVE" ; 099 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? ゲãƒ?ƒˆ {@value} */ 100 public static final String CMD_SQL = "SQL" ; 101 // 3.5.5.3 (2004/04/09) 値ã?null ã®å ´åˆã?ã€?"(ã‚¼ãƒæ–?—å?)ã‚’è¿”ã™NVLGETを採用 102 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? NVLゲãƒ?ƒˆ {@value} */ 103 public static final String CMD_NVLGET = "NVLGET" ; 104 105 // 3.5.5.3 (2004/04/09) 値ã?null ã®å ´åˆã?ã€?"(ã‚¼ãƒæ–?—å?)ã‚’è¿”ã™NVLGETを採用 106 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ?リスãƒ? */ 107 private static final String[] COMMAND_LIST = new String[] { 108 CMD_SET , CMD_GET , CMD_NVLGET , CMD_REMOVE , CMD_SQL }; 109 110 // 3.5.6.0 (2004/06/18) ã™ã¹ã¦ã‚?protected ã‹ã‚‰ private ã«å¤‰æ›´ã—ã¾ã™ã? 111 private String command = CMD_SET; 112 private String key = null; 113 private String value = null; 114 // private boolean isNullSet = true; // NULL ã®ã¨ãã«ã‚»ãƒ?ƒˆã—ç›´ã™ã‹ã©ã?‹ã€? 115 private transient DBTableModel table = null; 116 // 4.0.0.0 (2007/10/10) dbid ã®åˆæœŸå€¤ã‚’ã?"DEFAULT" ã‹ã‚‰ null ã«å¤‰æ›´ 117 // private String dbid = "DEFAULT"; 118 private String dbid = null; 119 private String sql = null; 120 // 4.3.4.0 (2008/12/01) save属æ?追åŠ? 121 private boolean save = false; 122 123 /** 124 * Taglibã®é–‹å§‹ã‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doStartTag() ã‚?オーãƒã?ライドã—ã¾ã™ã? 125 * 126 * @og.rev 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿? 127 * 128 * @return 後続å?ç??æŒ?¤º 129 */ 130 @Override 131 public int doStartTag() { 132 // 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿? 133 // if( CMD_SQL.equals( command ) ) { 134 if( useTag() && CMD_SQL.equals( command ) ) { 135 return( EVAL_BODY_BUFFERED ); // Body を評価ã™ã‚‹ 136 } 137 else { 138 return( SKIP_BODY ); // Body を評価ã—ãªã? 139 } 140 } 141 142 /** 143 * Taglibã®ã‚¿ã‚°æœ¬ä½“を処ç?™ã‚?doAfterBody() ã‚?オーãƒã?ライドã—ã¾ã™ã? 144 * 145 * @og.rev 3.1.1.0 (2003/03/28) ボディã®å†?®¹ã‚’å–å¾—ã™ã‚‹å?ç?‚’ã€CommonTagSupport ã§è¡Œã†ã€? 146 * @og.rev 3.6.0.8 (2004/11/19) エラー発生時ã«ç¢ºå®Ÿã«ãƒªãƒªãƒ¼ã‚¹ã•れるよã?« try finally 追åŠ? 147 * @og.rev 3.8.6.3 (2006/11/30) SQL æ–??å‰å¾Œã?スペã?スをå–り除ãã¾ã™ã? 148 * @og.rev 3.8.7.0 (2006/12/15) アクセスãƒã‚°å–å¾—ã?為,ApplicationInfoオブジェクトをè¨å®? 149 * @og.rev 4.0.0.0 (2005/01/31) lang â‡?ResourceManager ã¸å¤‰æ›´ 150 * @og.rev 5.1.9.0 (2010/08/01) TransactionTag 対応ã?上ä½ã« TransactionTag ãŒã‚れã?ã€ãã“ã‹ã‚‰Connection をもらã†ã€? 151 * @og.rev 5.3.7.0 (2011/07/01) TransactionReal ã®å¼•数変更 152 * @og.rev 5.3.8.0 (2011/08/01) Transaction発生ç®?‰€ã§close() 153 * 154 * @return 後続å?ç??æŒ?¤º(SKIP_BODY) 155 */ 156 @Override 157 public int doAfterBody() { 158 sql = getBodyString().trim(); 159 160 Query query = QueryFactory.newInstance(); // 4.0.0 (2005/01/31) 161 Transaction tran = null; 162 try { 163 // 5.1.9.0 (2010/08/01) TransactionTag 対å¿? 164 // final Transaction tran ; 165 TransactionTag tranTag = (TransactionTag)findAncestorWithClass( this,TransactionTag.class ); 166 if( tranTag == null ) { 167 // tran = new TransactionReal( dbid,getApplicationInfo() ); 168 tran = new TransactionReal( getApplicationInfo() ); // 5.3.7.0 (2011/07/01) 引数変更 169 } 170 else { 171 tran = tranTag.getTransaction(); 172 } 173 query.setTransaction( dbid,tran ); // 5.1.9.0 (2010/08/01) TransactionTag 対å¿? 174 175 // query.setConnectionID( dbid ); 176 query.setResourceManager( getResource() ); // 4.0.0 (2005/01/31) 177 178 query.setStatement( sql ); 179 // query.setApplicationInfo( getApplicationInfo() ); // 3.8.7.0 (2006/12/15) 180 query.execute(); 181 182 table = query.getDBTableModel(); 183 } 184 finally { 185 // if( query != null ) { query.close(); } 186 QueryFactory.close( query ); 187 if( tran != null ) { tran.close(); } // 5.3.8.0 (2011/08/01) Transaction発生ç®?‰€ã§close() 188 } 189 return(SKIP_BODY); 190 } 191 192 /** 193 * Taglibã®çµ‚äº?‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doEndTag() ã‚?オーãƒã?ライドã—ã¾ã™ã? 194 * 195 * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€? 196 * @og.rev 3.5.5.3 (2004/04/09) 値ã?null ã®å ´åˆã?ã€?"(ã‚¼ãƒæ–?—å?)ã‚’è¿”ã™ãƒ•ラグを採用 197 * @og.rev 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿? 198 * 199 * @return 後続å?ç??æŒ?¤º 200 */ 201 @Override 202 public int doEndTag() { 203 debugPrint(); // 4.0.0 (2005/02/28) 204 // 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿? 205 // if( check( command, COMMAND_LIST ) ) { 206 if( useTag() && check( command, COMMAND_LIST ) ) { 207 commandExec( command ); 208 209 if( CMD_GET.equals( command ) ) { 210 jspPrint( value ); 211 } 212 else if( CMD_NVLGET.equals( command ) ) { // 3.5.5.3 (2004/04/09) 213 jspPrint( nval(value,"") ); 214 } 215 } 216 217 return(EVAL_PAGE); 218 } 219 220 /** 221 * タグリブオブジェクトをリリースã—ã¾ã™ã? 222 * ã‚ャãƒ?‚·ãƒ¥ã•れã¦å†åˆ©ç”¨ã•れるã?ã§ã€ãƒ•ィールドã?åˆæœŸè¨å®šã‚’行ã„ã¾ã™ã? 223 * 224 * @og.rev 2.0.0.4 (2002/09/27) カスタãƒ?‚¿ã‚°ã® release() メソãƒ?ƒ‰ã‚’ã?追åŠ? 225 * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€? 226 * @og.rev 4.0.0.0 (2007/10/10) dbid ã®åˆæœŸå€¤ã‚’ã?"DEFAULT" ã‹ã‚‰ null ã«å¤‰æ›´ 227 * @og.rev 4.3.4.0 (2008/12/01) save属æ?対å¿? 228 * 229 */ 230 @Override 231 protected void release2() { 232 super.release2(); 233 command = CMD_SET; 234 key = null; 235 value = null; 236 // isNullSet = true; // NULL ã®ã¨ãã«ã‚»ãƒ?ƒˆã—ç›´ã™ã‹ã©ã?‹ã€? 237 table = null; 238 // dbid = "DEFAULT"; 239 dbid = null; 240 sql = null; 241 save = false; 242 } 243 244 /** 245 * コマンドを実行ã—ã¾ã™ã? 246 * 247 * コマンドã?,HTMLã‹ã‚‰(get/post)æŒ?®šã•れã¾ã™ã?ã§,setCommand()メソãƒ?ƒ‰ã§ 248 * 登録ã—ã¾ã™ã? 249 * コマンドを登録ã™ã‚‹ã¨åŒæ™‚ã«,実行も行ãªã?¾ã™ã? 250 * 251 * @og.rev 3.5.5.3 (2004/04/09) 値ã?null ã®å ´åˆã?ã€?"(ã‚¼ãƒæ–?—å?)ã‚’è¿”ã™ãƒ•ラグを採用 252 * 253 * @param command コマンãƒ?public static final 宣è¨?•れã¦ã?‚‹æ–?—å?) 254 * @see <a href="{@docRoot}/constant-values.html#org.opengion.hayabusa.taglib.UserInfoTag.CMD_SET">コマンド定数</a> 255 */ 256 protected void commandExec( final String command ) { 257 if( CMD_SQL.equals( command ) ) { setSQLAttribute() ; } 258 else if( CMD_SET.equals( command ) ) { setAttribute() ; } 259 else if( CMD_GET.equals( command ) ) { getAttribute() ; } 260 else if( CMD_NVLGET.equals( command ) ) { getAttribute() ; } // 3.5.5.3 (2004/04/09) 261 else if( CMD_REMOVE.equals( command ) ) { removeAttribute() ; } 262 } 263 264 /** 265 * UserInfoã®æ–?—å?を登録ã—ã¾ã™ã? 266 * 267 * @og.rev 4.3.4.0 (2008/12/01) GE20(ユーザー定数)ã¸ç™»éŒ²ã™ã‚‹ã‹ã?フラグを追åŠ? 268 * 269 */ 270 private void setAttribute() { 271 // if( isNullSet ) { 272 // setUserInfo( key, value ); 273 setUserInfo( key, value, save ); 274 // } 275 } 276 277 /** 278 * UserInfoã®æ–?—å?を作æ?ã—ã¾ã™ã? 279 * 280 */ 281 private void getAttribute() { 282 value = getUserInfo( key ); 283 } 284 285 /** 286 * UserInfoã®æ–?—å?を削除ã—ã¾ã™ã? 287 * 288 * @og.rev 5.3.6.0 (2011/06/01) GE20(ユーザー定数)ã‹ã‚‰å‰Šé™¤ã™ã‚‹ã‹ã?フラグを追åŠ? 289 */ 290 private void removeAttribute() { 291 UserInfo userInfo = getUser(); 292 // userInfo.removeAttribute( key ); 293 userInfo.removeAttribute( key, save ); 294 } 295 296 /** 297 * UserInfoã®æ–?—å?を指定ã?SQLæ–?‚ˆã‚Šä½œæ?ã—ã¾ã™ã? 298 * 299 * @og.rev 4.3.4.0 (2008/12/01) GE20(ユーザー定数)ã¸ç™»éŒ²ã™ã‚‹ã‹ã?フラグを追åŠ? 300 * 301 */ 302 private void setSQLAttribute() { 303 if( table == null || table.getRowCount() == 0 ) { return ; } 304 305 int row = 0; 306 int clmCnt = table.getColumnCount(); 307 for( int clm=0; clm<clmCnt; clm++ ) { 308 String clmkey = table.getColumnName( clm ); 309 String clmval = table.getValue( row,clm ); 310 // setUserInfo( clmkey,clmval ); 311 setUserInfo( clmkey, clmval, save ); 312 } 313 } 314 315 /** 316 * ã€TAG】コマンãƒ?SET,GET,NVLEGT,REMOVE,SQL)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:SET)ã€? 317 * 318 * @og.tag 319 * コマンドã?,HTMLã‹ã‚‰(get/post)æŒ?®šã•れã¾ã™ã?ã§,CMD_xxx ã§è¨å®šã•れる 320 * フィールド定数値ã®ã?šã‚Œã‹ã‚’ã?æŒ?®šã§ãã¾ã™ã? 321 * 何もè¨å®šã•れãªã??ã¾ãŸã?ã€null ã®å ´åˆã?ã€?SET" ãŒå?期å?ã«ã‚»ãƒ?ƒˆã•れã¾ã™ã? 322 * SQL ã®å ´åˆã?æ¤œç´¢çµæžœã®æˆ»ã‚Šå?ãŒè¤?•°å˜åœ¨ã™ã‚‹å ´åˆã?ã€æœ€åˆã??‘ä»¶ç›®ã®ã¿ä½¿ç”¨ã—ã¾ã™ã? 323 * 324 * @param cmd コマンãƒ?public static final 宣è¨?•れã¦ã?‚‹æ–?—å?) 325 * @see <a href="{@docRoot}/constant-values.html#org.opengion.hayabusa.taglib.UserInfoTag.CMD_SET">コマンド定数</a> 326 */ 327 public void setCommand( final String cmd ) { 328 String cmd2 = getRequestParameter( cmd ); 329 if( cmd2 != null && cmd2.length() > 0 ) { command = cmd2.toUpperCase(Locale.JAPAN); } 330 } 331 332 /** 333 * ã€TAG】UserInfo ã«ç™»éŒ²ã™ã‚‹ã‚ーをセãƒ?ƒˆã—ã¾ã?予ç´?ª?JNAME,ID,PASSWD,IDNO,INFO,LANG,ROLE,IPADDRESS,LOGINTIME)ã€? 334 * 335 * @og.tag UserInfo ã«ç™»éŒ²ã™ã‚‹ã‚ーをセãƒ?ƒˆã—ã¾ã™ã? 336 * 337 * @param inkey UserInfo ã«ç™»éŒ²ã™ã‚‹ã‚ー 338 */ 339 public void setKey( final String inkey ) { 340 key = getRequestParameter( inkey ).toUpperCase(Locale.JAPAN); 341 if( key.startsWith( "USER." ) ) { 342 key = key.substring( 5 ); 343 } 344 } 345 346 /** 347 * ã€TAG】UserInfo ã«ç™»éŒ²ã™ã‚‹å€¤ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã? 348 * 349 * @og.tag UserInfo ã«ç™»éŒ²ã™ã‚‹å€¤ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã? 350 * 351 * @param val UserInfoã«ç™»éŒ²ã™ã‚‹å€¤ 352 */ 353 public void setValue( final String val ) { 354 value = getRequestParameter( val ); 355 } 356 357 /** 358 * ã€TAG】UserInfo ã«ç™»éŒ²ã—ãŸå€¤ã‚’永続化ã™ã‚‹ã‹ã‚’æŒ?®šã—ã¾ã™ã? 359 * 360 * @og.tag 361 * UserInfo ã«ç™»éŒ²ã—ãŸå€¤ã‚’永続化ã™ã‚‹ã‹ã‚’æŒ?®šã—ã¾ã™ã? 362 * trueãŒæŒ‡å®šã•れãŸå ´åˆã?UserInfoã«è¨å®šã•れãŸå€¤ã¯ã€GE20(ユーザー定数)ã«ä¿å˜ã•れã? 363 * UserInfoãŒå?作æ?ã•れるタイミングã§è‡ªå‹•çš„ã«å¾©å…?•れã¾ã™ã? 364 * ã“ã“ã§ã€ç™»éŒ²ã•れãŸå?ã¯ã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å…¨ã¦ã®ãƒãƒ¼ãƒ«ã«å¯¾ã—ã¦æœ‰åйã¨ãªã‚Šã¾ã™ã? 365 * åˆæœŸå€¤ã¯ã€false(永続化ã—ãªã?ã§ã™ã? 366 * 367 * @param sv 登録値を永続化ã™ã‚‹ã? 368 */ 369 public void setSave( final String sv ) { 370 save = nval( getRequestParameter( sv ),save ); 371 } 372 373 // /** 374 // * ã€å»?¢ã€‘Query を実行ã—ã¦ã€value ã«å€¤ã‚’ã‚»ãƒ?ƒˆã™ã‚‹ã‹ã©ã?‹ã‚’指定ã—ã¾ã™ã? 375 // * 376 // * @og.tag 377 // * åˆæœŸå€¤ã¯ã€å®Ÿè¡Œã—ãªã?("false") 378 // * 379 // * @og.rev 3.1.0.1 (2003/03/26) query 属æ?ã‚’éžæŽ¨å¥¨å±žæ?ã¨ã—ã¾ã™ã?å†?ƒ¨ã§ã¯ä½¿ç”¨ã—ã¾ã›ã‚“ã€? 380 // * 381 // * @param flag Query を実行ã™ã‚?("true")?実行ã—ãªã?ãれ以å¤? 382 // * @deprecated 383 // */ 384 // @Deprecated public void setQuery( final String flag ) { 385 // // ã“ã“ã§ã¯å‡¦ç?‚’行ã„ã¾ã›ã‚“ã€? 386 // } 387 388 // /** 389 // * ã€å»?¢ã€‘value ã?NULL ã®æ™‚ã«ã€è¨å®šã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:true)ã€? 390 // * 391 // * @og.tag 392 // * true ã®å ´åˆã?, null ã®ã¨ãã§ã‚‚ã‚»ãƒ?ƒˆã—ã¾ã™ã? 393 // * false ã®å ´åˆã?, null ã®ã¨ãã?ã€æ—¢å˜ã?å€¤ã‚’ç½®ãæ›ãˆã¾ã›ã‚“ã€? 394 // * åˆæœŸå€¤ã¯ã€null ã®ã¨ãã§ã‚‚ã‚»ãƒ?ƒˆã™ã‚‹ã§ã™ã? ("true") 395 // * 396 // * @param flag NULL ã®æ™‚ã«ã€è¨å®šã™ã‚?("true")?è¨å®šã—ãªã?ãれ以å¤? 397 // * @deprecated 398 // */ 399 // @Deprecated public void setNullSet( final String flag ) { 400 // isNullSet = nval( getRequestParameter( flag ),isNullSet ); 401 // } 402 403 /** 404 * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã™ã? 405 * 406 * @og.tag Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã™ã? 407 * 408 * @param id ãƒ??タベã?ス接続ID 409 */ 410 public void setDbid( final String id ) { 411 dbid = nval( getRequestParameter( id ),dbid ); 412 } 413 414 /** 415 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºæ›¸ãè¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰ 416 * 417 * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ? 418 * @serialData 419 * 420 * @param strm ObjectOutputStreamオブジェクãƒ? 421 */ 422 private void writeObject( final ObjectOutputStream strm ) throws IOException { 423 strm.defaultWriteObject(); 424 } 425 426 /** 427 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºèªã¿è¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰ 428 * 429 * ã“ã“ã§ã¯ã€transient 宣è¨?•れãŸå†?ƒ¨å¤‰æ•°ã®å†??åˆæœŸåŒ–ãŒå¿?¦ãªãƒ•ィールドã?ã¿è¨å®šã—ã¾ã™ã? 430 * 431 * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ? 432 * @serialData 433 * 434 * @param strm ObjectInputStreamオブジェクãƒ? 435 * @see #release2() 436 */ 437 private void readObject( final ObjectInputStream strm ) throws IOException , ClassNotFoundException { 438 strm.defaultReadObject(); 439 } 440 441 /** 442 * ã“ã?オブジェクトã?æ–?—å?表ç¾ã‚’è¿”ã—ã¾ã™ã? 443 * 基本çš?«ãƒ?ƒãƒ?‚°ç›®çš?«ä½¿ç”¨ã—ã¾ã™ã? 444 * 445 * @return ã“ã?ã‚¯ãƒ©ã‚¹ã®æ–?—å?è¡¨ç¾ 446 */ 447 @Override 448 public String toString() { 449 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() ) 450 .println( "VERSION" ,VERSION ) 451 .println( "command" ,command ) 452 .println( "key" ,key ) 453 .println( "value" ,value ) 454 // .println( "isNullSet" ,isNullSet ) 455 .println( "dbid" ,dbid ) 456 .println( "sql" ,sql ) 457 .println( "save" ,save ) 458 .println( "COMMAND_LIST" ,COMMAND_LIST ) 459 .println( "Other..." ,getAttributes().getAttribute() ) 460 .fixForm().toString() ; 461 } 462 }