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.DBColumn; 022 import org.opengion.hayabusa.io.TableReader; 023 import org.opengion.fukurou.util.ErrorMessage; 024 import org.opengion.fukurou.util.FileUtil; 025 import org.opengion.fukurou.util.Closer ; 026 import org.opengion.fukurou.util.StringUtil ; 027 import static org.opengion.fukurou.util.StringUtil.nval ; 028 029 import java.io.File; 030 import java.io.BufferedReader; 031 import java.util.Locale ; 032 import java.io.ObjectOutputStream; 033 import java.io.ObjectInputStream; 034 import java.io.IOException; 035 036 /** 037 * æŒ?®šã?ファイルã‚?DBTableModelオブジェクトã«èªã¿å–るファイル入力タグã§ã™ã? 038 * 039 * ãƒ??ã‚¿(DBTableModel)ã¨ã€ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ©(ReadTableã‚¿ã‚°)を与ãˆã¦ã€å¤–部ã‹ã‚‰ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã§ã€? 040 * å?¨®å½¢å¼ã§ ãƒ??ã‚¿(DBTableModel)を表示ã•ã›ã‚‹ã“ã¨ã?ã§ãã¾ã™ã? 041 * ReadTableã‚¿ã‚° ã«å¯¾ã—ã¦ã€ã‚³ãƒžãƒ³ãƒ‰ã‚’与ãˆã‚‹ã“ã¨ã«ã‚ˆã‚Šã€å?部ã®ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ©ã®å®Ÿè£?«å¯¾å¿œã—ã? 042 * å½¢å¼ã§ãƒ??タを作æ?ã—ã¾ã™ã? 043 * ã™ã¹ã¦ã®èªå–ã?åˆæœŸã‚¯ãƒ©ã‚¹åã‚’ リソースファイル㮠TABLE_READER_DEFAULT_CLASS ã§æŒ?®šå¯èƒ½ã§ã™ã? 044 * ãã?å ´åˆã?AutoReader を指定ã™ã‚‹ã¨ã€Excel 㨠Default(ãƒ?‚スãƒ? ã‚’é?番ã«è©¦ã—ã¾ã™ã? 045 * 046 * 入力件数ã‚?DB.COUNT" ã‚ーã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚»ãƒ?ƒˆã—ã¦ã?¾ã™ã? 047 * 048 * @og.formSample 049 * â—å½¢å¼ï¼? 050 * <og:readTable 051 * command = "NEW" 052 * fileURL = "{@USER.ID}" èªã¿å–りå…?ƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå? 053 * filename = "{@filename}" èªã¿å–りå…?ƒ•ァイルå? 054 * encode = "UnicodeLittle" èªã¿å–りå…?ƒ•ァイルエンコードå 055 * maxRowCount = "10000" èªå–最大件数(0:[無制é™]) 056 * /> 057 * â—body?šãªã? 058 * 059 * â—Tag定義?? 060 * <og:readTable 061 * readerClass ã€TAG】実際ã«èªã¿å‡ºã™ã‚¯ãƒ©ã‚¹åã?略称(TableReader_**** ã® ****)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?{@og.doc03Link readerClass åˆæœŸå€¤:Default}) 062 * fileURL ã€TAG】èªã¿å–りå…?ƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåã‚’æŒ?®šã—ã¾ã?åˆæœŸå€¤:FILE_URL) 063 * filename ã€TAG】ファイルを作æ?ã™ã‚‹ã¨ãã?ファイルåã‚’ã‚»ãƒ?ƒˆã—ã¾ã?(åˆæœŸå€¤:FILE_FILENAME[=file.xls]) 064 * encode ã€TAG】ファイルを作æ?ã™ã‚‹ã¨ãã?ファイルエンコーãƒ?‚£ãƒ³ã‚°åã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:FILE_ENCODE) 065 * maxRowCount ã€TAG】èªå–æ™‚ã®æœ?¤§å–り込ã¿ä»¶æ•°ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?(åˆæœŸå€¤:DB_MAX_ROW_COUNT[=1000])(0:[無制é™]) 066 * separator ã€TAG】å¯å¤‰é•·ãƒ•ァイルを作æ?ã™ã‚‹ã¨ãã?é ?›®åŒºåˆ?‚Šæ–?—ã‚’ã‚»ãƒ?ƒˆã—ã¾ã? 067 * tableId ã€TAGã€?通常使ã?¾ã›ã‚“)sessionã‹ã‚‰æ‰?¾—ã™ã‚?DBTableModelオブジェクトã? ID 068 * command ã€TAG】コマンãƒ?NEW,RENEW)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:NEW) 069 * modifyType ã€TAG】ファイルå–ã‚Šè¾¼ã¿æ™‚ã? モãƒ?‚£ãƒ•ァイタイãƒ?A(追åŠ?,C(æ›´æ–°),D(削除))を指定ã—ã¾ã? 070 * displayMsg ã€TAG】query ã®çµæžœã‚’ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0033[ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸ]) 071 * notfoundMsg ã€TAGã€‘æ¤œç´¢çµæžœãŒã‚¼ãƒä»¶ã®å ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ]) 072 * sheetName ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シートåã‚’è¨å®šã—ã¾ã?åˆæœŸå€¤:æŒ?®šãªã? 073 * sheetNos ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シート番å·ã‚’è¤?•°è¨å®šã§ãã¾ã?åˆæœŸå€¤:0) 074 * sheetConstKeys ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?(CSVå½¢å¼? 075 * sheetConstAdrs ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?固定å?ã¨ãªã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹(è¡?åˆ?è¡?åˆ?・・・) 076 * nullBreakClm ã€TAG】カラãƒ??ã« NULL ãŒç¾ã‚ŒãŸæ™‚点ã§èªã¿å–ã‚Šã‚’ä¸æ¢ã—ã¾ã?è¤?•°Sheetã®å ´åˆã?ã€æ¬¡ã®Sheetã‚’èªã¿ã¾ã?ã€? 077 * columns ã€TAG】èªã¿å–りå…?ƒ•ァイルã®ã‚«ãƒ©ãƒ??ã‚’ã?外部(ã‚¿ã‚°)よりæŒ?®šã—ã¾ã? 078 * useNumber ã€TAGã€‘è¡Œç•ªå·æƒ??ã‚’ã?使用ã—ã¦ã?‚‹/ã—ã¦ã?ªã„[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:true) 079 * adjustColumns ã€TAG】èªã¿å–りå…?ƒ•ァイルã®ãƒ??タ変æ›ã‚’行ã†ã‚«ãƒ©ãƒ??をカンマ指定ã—ã¾ã? 080 * checkColumns ã€TAG】èªã¿å–りå…?ƒ•ã‚¡ã‚¤ãƒ«ã®æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã†ã‚«ãƒ©ãƒ??をカンマ指定ã—ã¾ã? 081 * nullCheck ã€TAG】NULL ãƒã‚§ãƒ?‚¯ã™ã¹ãカラãƒ??をカンマ区åˆ?‚Š(CVSå½¢å¼?ã§æŒ?®šã—ã¾ã? 082 * language ã€TAG】タグå†?ƒ¨ã§ä½¿ç”¨ã™ã‚‹è¨?ªžã‚³ãƒ¼ãƒ‰[ja/en/zh/…]を指定ã—ã¾ã? 083 * stopZero ã€TAG】èªè¾¼ä»¶æ•°ãŒï¼ä»¶ã®ã¨ãå?ç?‚’続行ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false[続行ã™ã‚‹]) 084 * scope ã€TAG】ã‚ャãƒ?‚·ãƒ¥ã™ã‚‹å ´åˆã?スコープ[request/page/session/applicaton]を指定ã—ã¾ã?åˆæœŸå€¤:session) 085 * mainTrans ã€TAGã€?通常使ã?¾ã›ã‚“)ã‚¿ã‚°ã§å‡¦ç?•れる処ç?Œãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç?‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:false) 086 * skipRowCount ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)ãƒ??ã‚¿ã®èªã¿é£›ã?ã—ä»¶æ•°ã‚’è¨å®šã—ã¾ã? 087 * useRenderer ã€TAG】èªå–å?ç?§ãƒ©ãƒ™ãƒ«ã‚’コードリソースã«é€?¤‰æ›ã‚’行ã†ã‹ã©ã?‹ã‚’指定ã—ã¾ã?(åˆæœŸå€¤:USE_TABLE_READER_RENDERER[=false]) 088 * debug ã€TAG】デãƒãƒƒã‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false) 089 * /> 090 * 091 * â—使用ä¾? 092 * 093 * <og:readTable 094 * command = "NEW" 095 * readerClass = "Fixed" 固定長ãƒ??ã‚¿ã®èªã¿å–り 096 * modifyType = "{@modifyType}" èªå–時ã®ãƒ¢ãƒ?‚£ãƒ•ァイタイãƒ?A,Cç? 097 * fileURL = "{@USER.ID}" èªã¿å–りå…?ƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå? 098 * filename = "{@filename}" èªã¿å–りå…?ƒ•ァイルå? 099 * encode = "Shift_JIS" èªã¿å–りå…?ƒ•ァイルエンコードå 100 * maxRowCount = "10000" èªå–最大件数(0:[無制é™]) 101 * columns = "OYA,KO,HJO,SU,DYSTR,DYEND" #NAME ã«å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ?? 102 * useNumber = "false" 行番å·ã®å˜åœ¨ã—ãªã?ƒ‡ãƒ¼ã‚¿ã‚’èªã¿å–りã¾ã™ã? 103 * adjustColumns = "OYA,KO,HJO,SU" ãƒ??タ変æ›ã™ã‚‹ã‚«ãƒ©ãƒ??("*" ã§å…¨ã‚«ãƒ©ãƒ? 104 * checkColumns = "OYA,KO,HJO,SU" æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã™ã‚‹ã‚«ãƒ©ãƒ??("*" ã§å…¨ã‚«ãƒ©ãƒ? 105 * nullCheck = "OYA,KO,SU" NULLãƒã‚§ãƒ?‚¯ã‚’実行ã—ã¾ã?"*" ã§å…¨ã‚«ãƒ©ãƒ? 106 * stopZero = "true" å–å¾?ä»¶ã®å ´åˆã«ä»¥é™ã?処ç?‚’åœæ¢ã—ã¾ã? 107 * skipRowCount = "4" ãƒ??ã‚¿ã®èªã¿é£›ã?ã—ä»¶æ•°(èªã¿è¾¼ã¿é–‹å§‹ã?ã€ã“ã®æ•°å—+1行目ã‹ã‚‰) 108 * /> 109 * 110 * @og.group ファイル入åŠ? 111 * 112 * @version 4.0 113 * @author Kazuhiko Hasegawa 114 * @since JDK5.0, 115 */ 116 public class ReadTableTag extends CommonTagSupport { 117 //* ã“ã?プãƒã‚°ãƒ©ãƒ??VERSIONæ–?—å?ã‚’è¨å®šã—ã¾ã™ã? {@value} */ 118 private static final String VERSION = "5.7.1.2 (2013/12/20)" ; 119 120 private static final long serialVersionUID = 571220131220L ; 121 122 private static final int ERROR_ROW_COUNT = 200 ; // 4.0.0 (2007/05/25) 123 124 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? æ–°è¦ä½œæ? {@value} */ 125 public static final String CMD_NEW = "NEW" ; 126 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? 冿¤œç´¢ {@value} */ 127 public static final String CMD_RENEW = "RENEW" ; 128 129 private static final String[] COMMAND_LIST = new String[] { CMD_NEW , CMD_RENEW }; 130 131 private String separator = TableReader.TAB_SEPARATOR; // é ?›®åŒºåˆ?‚Šæ–?? 132 private String fileURL = HybsSystem.sys( "FILE_URL" ); 133 private String filename = HybsSystem.sys( "FILE_FILENAME" ); // ファイルå? 134 private String encode = HybsSystem.sys( "FILE_ENCODE" ); // ファイルエンコーãƒ?‚£ãƒ³ã‚° "JISAutoDetect" ,"JIS", "EUC_JP", "MS932", "SJIS" , "Windows-31J" , "Shift_JIS" 135 private String readerClass = HybsSystem.sys( "TABLE_READER_DEFAULT_CLASS" ); // 3.8.5.3 (2006/08/07) 136 private int maxRowCount = -1; 137 // private String displayMsg = "MSG0033"; // ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€? 138 private String displayMsg = HybsSystem.sys( "VIEW_DISPLAY_MSG" ); 139 private String notfoundMsg = "MSG0077"; // 対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸã€? 140 private int executeCount = -1; // 検索/実行件数 141 private String modifyType = null; 142 // private String[] checkColumns = null; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 143 // private String[] adjustColumns = null; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 144 // private String[] nullCheck = null; // 3.8.0.2 (2005/06/30) nullãƒã‚§ãƒ?‚¯ç¢ºèª? 145 private String adjustColumns = null; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 146 private String checkColumns = null; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 147 private String nullCheck = null; // 3.8.0.2 (2005/06/30) nullãƒã‚§ãƒ?‚¯ç¢ºèª? 148 // private boolean allColumnCheck = false; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 149 150 private transient DBTableModel table = null; 151 private String command = CMD_NEW; 152 private String tableId = HybsSystem.TBL_MDL_KEY ; 153 private String sheetName = null ; // 3.5.4.2 (2003/12/15) 154 private String sheetNos = null ; // 5.5.7.2 (2012/10/09) è¤?•°ã‚·ãƒ¼ãƒˆã‚’æŒ?®šã§ãるよã†ã«ã‚·ãƒ¼ãƒˆç•ªå·ã‚’指定ã§ãるよã†ã«ã™ã‚‹ã€? 155 private String sheetConstKeys = null ; // 5.5.8.2 (2012/11/09) 固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?(CSVå½¢å¼? 156 private String sheetConstAdrs = null ; // 5.5.8.2 (2012/11/09) 固定å?ã¨ãªã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹(è¡?åˆ?è¡?åˆ?・・・) 157 private String nullBreakClm = null; // 5.5.8.2 (2012/11/09) å–è¾¼ã¿æ¡ä»¶/Sheet BREAKæ¡ä»¶ 158 159 // 3.5.4.5 (2004/01/23) 外部よりカラãƒ??(カンマ区åˆ?‚Š)を指定ã§ãるよã†ã«ã™ã‚‹ã€? 160 private String columns = null; 161 private boolean useNumber = true; // 3.7.0.5 (2005/04/11) 162 163 private boolean stopZero = false; // 4.3.7.0 (2009/06/01) stopZero属æ?追åŠ? 164 165 // 5.1.8.0 (2010/07/01) AutoReaderã®Calc対å¿? 166 // private static final String[] AUTO_READER_CLASS = new String[] { "Excel","Default" ,"Default" }; 167 // private static final String[] AUTO_READER_ENCODE = new String[] { null ,"UnicodeLittle","Windows-31J" }; 168 private static final String[] AUTO_READER_CLASS = new String[] { "Excel","Calc","Default" ,"Default" }; 169 private static final String[] AUTO_READER_ENCODE = new String[] { null ,null ,"UnicodeLittle","Windows-31J" }; 170 171 private boolean isMainTrans = true; // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã? 172 private int skipRowCount = 0; // 5.1.6.0 (2010/05/01) ãƒ??ã‚¿ã®èªã¿é£›ã?ã—è¨å®? 173 174 // 5.2.1.0 (2010/10/01) èªå–å?ç?§ã‚³ãƒ¼ãƒ‰ãƒªã‚½ãƒ¼ã‚¹ã®ãƒ©ãƒ™ãƒ«å¤‰æ›ã‚’行ã†ã‹ã©ã?‹ 175 private boolean useRenderer = HybsSystem.sysBool( "USE_TABLE_READER_RENDERER" ); // 5.2.1.0 (2010/10/01) 176 177 /** 178 * Taglibã®çµ‚äº?‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doEndTag() ã‚?オーãƒã?ライドã—ã¾ã™ã? 179 * 180 * @og.rev 3.0.1.4 (2003/03/17) displayMsg ã??Byteã®å ´åˆã?ã€ä»¶æ•°ã‚‚表示ã—ãªã?‚ˆã?«å¤‰æ›´ã€? 181 * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€? 182 * @og.rev 3.5.4.1 (2003/12/01) 引数㮠BufferedReader ã‚’ã?InputStream ã«å¤‰æ›´ã€? 183 * @og.rev 3.5.4.3 (2004/01/05) 引数㮠InputStream ã‚’ã? BufferedReader ã«æˆ»ã™ã? 184 * @og.rev 3.5.6.5 (2004/08/09) 暫定的ã«ã€DBTableModelã‚’å?行削除ã—ã¾ã™ã? 185 * @og.rev 3.6.0.0 (2004/09/24) DBTableModel ã®å…ˆè¡Œå‰Šé™¤ã¯ã€scope="session" ã®å ´åˆã?ã¿ã€? 186 * @og.rev 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ç”¨ã«ã€checkColumns,adjustColumns 属æ?追åŠ? 187 * @og.rev 3.6.0.8 (2004/11/19) DBTableModel をセーブã™ã‚‹æ™‚ã«ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã? 188 * @og.rev 3.8.5.3 (2006/08/07) readerClassã?"Excel"ã§ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸã¨ãã?ã‚‚ã†ä¸?º¦Defaultã§å†èªå–を行ã„ã¾ã™ã? 189 * @og.rev 4.0.0.0 (2007/10/12) checkTableColumn å‰ã«ã€modifyType è¨å®šã‚’行ã„ã¾ã™ã? 190 * @og.rev 4.0.0.0 (2007/10/18) メãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹çµ±å? getResource().getMessage > getResource().getLabel ) 191 * @og.rev 4.3.1.1 (2008/10/08) columnsãŒæŒ‡å®šã•れã¦ã?‚‹å ´åˆã?ã€AutoReaderç¦æ¢ 192 * @og.rev 4.3.7.0 (2009/06/01) stopZero機è?,DB.COUNTリクエストã‚ーã¸èªè¾¼ä»¶æ•°ã‚»ãƒ?ƒˆã‚’追åŠ? 193 * @og.rev 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??ã€DBTableModelãŒæ–°è¦ä½œæ?ã•れãŸå?ç?§ã®ã¿è¡Œã†ã€? 194 * @og.rev 5.1.8.0 (2010/07/01) AutoReaderã®Calc対å¿? 195 * @og.rev 5.1.9.0 (2010/08/01) AutoReaderã§ã®Exceptionã®åˆ¤å®šã‚’Throwableã«å¤‰æ›´ 196 * @og.rev 5.7.1.2 (2013/12/20) tempMsg.toString() â‡?errMsg 変更 197 * 198 * @return 後続å?ç??æŒ?¤º 199 */ 200 @Override 201 public int doEndTag() { 202 debugPrint(); // 4.0.0 (2005/02/28) 203 if( check( command, COMMAND_LIST ) ) { 204 useMainTrans( isMainTrans ); // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã? 205 startQueryTransaction( tableId ); // 3.6.0.8 (2004/11/19) 206 207 // 3.5.6.5 (2004/08/09) 削除ã™ã‚‹ã®ã¯ã€ã‚»ãƒ?‚·ãƒ§ãƒ³ã®ã‚ªãƒ–ジェクトã§ã‚ˆã„ã€? 208 // 3.6.0.0 (2004/09/24) 削除ã™ã‚‹ã®ã¯ã€scope="session" ã®å ´åˆã?ã¿ã€? 209 if( "session".equals( getScope() ) ) { 210 removeSessionAttribute( tableId ); 211 removeSessionAttribute( HybsSystem.VIEWFORM_KEY ); 212 } 213 214 if( maxRowCount < 0 ) { 215 maxRowCount = sysInt( "DB_MAX_ROW_COUNT" ); 216 } 217 218 // ファイル ã®èªã¿è¾¼ã¿?šAutoReader 処ç? 219 BufferedReader pw = null; 220 final String[] READER_CLASS ; 221 final String[] READER_ENCODE ; 222 if( "AutoReader".equalsIgnoreCase( readerClass ) ) { 223 // 4.3.1.1 (2008/10/08) 224 if( columns != null && columns.length() > 0 ) { 225 String errMsg = "columnsãŒæŒ‡å®šã•れã¦ã?‚‹å ´åˆã?ã€readerClass=\"AutoReader\"ã¯ä½¿ãˆã¾ã›ã‚“"; 226 throw new HybsSystemException( errMsg ); // 4.3.4.4 (2009/01/01) 227 } 228 READER_CLASS = AUTO_READER_CLASS ; 229 READER_ENCODE = AUTO_READER_ENCODE; 230 } 231 else { 232 READER_CLASS = new String[] { readerClass }; 233 READER_ENCODE = new String[] { encode }; 234 } 235 236 StringBuilder tempMsg = new StringBuilder(); 237 for( int i=0; i<READER_CLASS.length; i++ ) { 238 readerClass = READER_CLASS[i]; 239 encode = READER_ENCODE[i]; 240 241 try { 242 // 5.1.8.0 (2010/07/01) AutoReaderã®Calc対å¿? 243 // if( "Excel".equalsIgnoreCase( readerClass ) ) { 244 if( "Excel".equalsIgnoreCase( readerClass ) || "Calc".equalsIgnoreCase( readerClass ) ) { 245 create( null ); 246 } 247 else { 248 pw = getBufferedReader(); 249 create( pw ); 250 } 251 // æˆåŠŸã™ã‚Œã°ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’クリアã—ã¦ã€ãã®å ´ã§æŠœã‘ã‚‹ã? 252 tempMsg = null; 253 break; 254 } 255 // 3.8.5.3 (2006/08/07) readerClassã?"Excel"ã§ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸã¨ãã?ã‚‚ã†ä¸?º¦Defaultã§å†èªå–を行ã„ã¾ã™ã? 256 // 5.1.9.0 (2010/08/01) RuntimeExceptionç³»ã®ExceptionãŒã‚ャãƒ?ƒã§ããªã?Ÿã‚ã?Throwableã§å—ã‘ã‚? 257 // catch( HybsSystemException ex ) { catch( HybsSystemException ex ) { 258 catch( Throwable th ) { 259 tempMsg.append( "readerClass=[" ).append( readerClass ) 260 .append( "],encode=[" ).append( encode ) 261 .append( "] Error!" ).append( HybsSystem.CR ) 262 .append( th.getMessage() ).append( HybsSystem.CR ) ; 263 264 // String tmp = "readerClass=[" + readerClass + "],encode=[" + encode + "] Error!" 265 // + HybsSystem.CR 266 // + ex.getMessage() 267 // + HybsSystem.CR ; 268 // System.err.print( tmp ); 269 // tempMsg += tmp ; 270 } 271 finally { 272 Closer.ioClose( pw ); // 4.0.0 (2006/01/31) close 処ç?™‚ã® IOException ã‚’ç„¡è¦? 273 } 274 } 275 276 if( tempMsg != null ) { // æœ?¾Œã¾ã§ã‚¨ãƒ©ãƒ¼ãŒã‚れã?ã€ä¾‹å¤–å?ç?‚’発行ã—ã¾ã™ã? 277 // System.err.print( tempMsg.toString() ); 278 // throw new HybsSystemException( tempMsg.toString() ); 279 String errMsg = tempMsg.toString(); 280 System.err.print( errMsg ); 281 throw new HybsSystemException( errMsg ); // 5.7.1.2 (2013/12/20) msg â‡?errMsg 変更 282 } 283 284 if( table != null ) { 285 // 3.6.0.2 (2004/10/04) 286 // table = setAdjustTable( table ); 287 288 // 4.0.0.0 (2007/10/12) checkTableColumn å‰ã«ã€modifyType è¨å®šã‚’行ã„ã¾ã™ã? 289 executeCount = table.getRowCount(); 290 if( modifyType != null ) { 291 for( int row=0; row<executeCount; row++ ) { 292 table.setModifyType( row,modifyType ); 293 } 294 } 295 296 ErrorMessage errMsg = checkTableColumn( table ); 297 if( errMsg != null && ! errMsg.isOK()) { 298 jspPrint( TaglibUtil.makeHTMLErrorTable( errMsg,getResource() ) ); 299 return SKIP_PAGE ; 300 } 301 302 } 303 // 3.6.0.8 (2004/11/19) トランザクションãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã? 304 if( ! commitTableObject( tableId, table ) ) { 305 jspPrint( "ReadTableTag Query処ç?Œå‰²ã‚Šè¾¼ã¾ã‚Œã¾ã—ãŸã€?BTableModel ã¯ç™»éŒ²ã—ã¾ã›ã‚“ã€? ); 306 return (SKIP_PAGE); 307 } 308 309 StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_SMALL ); 310 311 // 実行件数ã®è¡¨ç¤º command="NEW" ã®ã¨ãã?ã¿ã€displayMsg を表示ã•ã›ã¾ã™ã? 312 // 4.0.0 (2005/11/30) 出力é?ã®å¤‰æ›´ã€‚ä¸?•ªæœ??ã«å‡ºåŠ›ã—ã¾ã™ã? 313 // boolean useStatusBar = HybsSystem.sysBool( "VIEW_USE_DISPLAY_MSG" ); 314 if( CMD_NEW.equals( command ) ) { 315 // if( useStatusBar && executeCount > 0 && displayMsg != null && displayMsg.length() > 0 ) { 316 if( executeCount > 0 && displayMsg != null && displayMsg.length() > 0 ) { 317 buf.append( executeCount ); 318 // buf.append( getResource().getMessage( displayMsg ) ); 319 buf.append( getResource().getLabel( displayMsg ) ); 320 buf.append( HybsSystem.BR ); 321 } 322 else if( executeCount == 0 && notfoundMsg != null && notfoundMsg.length() > 0 ) { 323 // buf.append( getResource().getMessage( notfoundMsg ) ); 324 buf.append( getResource().getLabel( notfoundMsg ) ); 325 buf.append( HybsSystem.BR ); 326 } 327 } 328 329 // 4.3.7.0 (2009/06/01) èªè¾¼ä»¶æ•°ã‚’ã?"DB.COUNT" ã‚ーã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚»ãƒ?ƒˆã™ã‚‹ã€? 330 setRequestAttribute( "DB.COUNT" , String.valueOf( executeCount ) ); 331 332 jspPrint( buf.toString() ); 333 } 334 335 // 4.3.7.0 (2009/06/01) stopZero機è?を追åŠ? 336 final int rtnCode ; 337 if( executeCount == 0 && stopZero ) { 338 rtnCode = SKIP_PAGE; 339 } 340 else { 341 rtnCode = EVAL_PAGE; 342 } 343 344 // return(EVAL_PAGE); 345 return ( rtnCode ); 346 } 347 348 /** 349 * タグリブオブジェクトをリリースã—ã¾ã™ã? 350 * ã‚ャãƒ?‚·ãƒ¥ã•れã¦å†åˆ©ç”¨ã•れるã?ã§ã€ãƒ•ィールドã?åˆæœŸè¨å®šã‚’行ã„ã¾ã™ã? 351 * 352 * @og.rev 2.0.0.4 (2002/09/27) カスタãƒ?‚¿ã‚°ã® release() メソãƒ?ƒ‰ã‚’ã?追åŠ? 353 * @og.rev 3.1.1.2 (2003/04/04) Tomcat4.1 対応ã?release2() ã‚?doEndTag()ã§å‘¼ã¶ã€? 354 * @og.rev 3.1.3.0 (2003/04/10) FILE_ENCODE ã‹ã‚‰ã€ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰æƒ…å ±ã‚’å–å¾—ã™ã‚‹ã? 355 * @og.rev 3.1.4.0 (2003/04/18) command 属æ?ã«ã€å?期å?(NEW)ã‚’è¨å®šã™ã‚‹ã? 356 * @og.rev 3.5.4.2 (2003/12/15) EXCELã®ã‚·ãƒ¼ãƒˆåを指定ã§ãるよã†ã«å¤‰æ›´ã€? 357 * @og.rev 3.5.4.5 (2004/01/23) 外部よりカラãƒ??(カンマ区åˆ?‚Š)を指定ã§ãるよã†ã«ã™ã‚‹ã€? 358 * @og.rev 3.6.0.2 (2004/10/04) checkColumns,adjustColumns,allColumnCheck 属æ?追åŠ? 359 * @og.rev 3.7.0.5 (2005/04/11) useNumber 属æ?を追åŠ?—ã¾ã™ã? 360 * @og.rev 3.8.0.2 (2005/06/30) nullCheck 属æ?追åŠ? 361 * @og.rev 3.8.5.3 (2006/08/07) readerClass 属æ?ã®åˆæœŸå€¤ã‚’シスãƒ?ƒ リソースよりå–å¾—ã—ã¾ã™ã? 362 * @og.rev 4.3.7.0 (2009/06/01) stopZero属æ?追åŠ? 363 * @og.rev 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??ã€DBTableModelãŒæ–°è¦ä½œæ?ã•れãŸå?ç?§ã®ã¿è¡Œã†ã€? 364 * @og.rev 5.1.6.0 (2010/05/01) ãƒ??ã‚¿ã®èªã¿é£›ã?ã—è¨å®?skipRowCount 属æ?追åŠ? 365 * @og.rev 5.2.1.0 (2010/10/01) èªå–å?ç?§ã‚³ãƒ¼ãƒ‰ãƒªã‚½ãƒ¼ã‚¹ã®ãƒ©ãƒ™ãƒ«å¤‰æ›ã‚’行ã†ã‹ã©ã?‹ useRenderer 属æ?追åŠ? 366 * @og.rev 5.5.7.2 (2012/10/09) è¤?•°ã‚·ãƒ¼ãƒˆã‚’æŒ?®šã§ãるよã†ã«ã‚·ãƒ¼ãƒˆç•ªå·ã‚’指定ã§ãるよã†ã«ã€sheetNos属æ?追åŠ? 367 * @og.rev 5.5.8.2 (2012/11/09) 固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ã®æŒ?®šã?ãŸã‚ã®ã€sheetConstKeysã€sheetConstAdrs属æ?追åŠ? 368 * @og.rev 5.5.8.2 (2012/11/09) カラãƒ??ã« NULL ãŒç¾ã‚ŒãŸæ™‚点ã§èªã¿å–ã‚Šã‚’ä¸æ¢ã™ã‚‹ã€nullBreakClm属æ?追åŠ? 369 */ 370 @Override 371 protected void release2() { 372 super.release2(); 373 separator = TableReader.TAB_SEPARATOR; // é ?›®åŒºåˆ?‚Šæ–?? 374 fileURL = HybsSystem.sys( "FILE_URL" ); 375 filename = HybsSystem.sys( "FILE_FILENAME" ); // ファイルå? 376 encode = HybsSystem.sys( "FILE_ENCODE" ); // ファイルエンコーãƒ?‚£ãƒ³ã‚° "JISAutoDetect" ,"JIS", "EUC_JP", "MS932", "SJIS" , "Windows-31J" , "Shift_JIS" 377 readerClass = HybsSystem.sys( "TABLE_READER_DEFAULT_CLASS" ); // 3.8.5.3 (2006/08/07) 378 maxRowCount = -1; 379 // displayMsg = "MSG0033"; // ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€? 380 displayMsg = HybsSystem.sys( "VIEW_DISPLAY_MSG" ); 381 notfoundMsg = "MSG0077"; // 対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸã€? 382 executeCount = -1; // 検索/実行件数 383 modifyType = null; 384 command = CMD_NEW; 385 table = null; 386 tableId = HybsSystem.TBL_MDL_KEY ; 387 sheetName = null; // 3.5.4.2 (2003/12/15) 388 sheetNos = null ; // 5.5.7.2 (2012/10/09) è¤?•°ã‚·ãƒ¼ãƒˆã‚’æŒ?®šã§ãるよã†ã«ã‚·ãƒ¼ãƒˆç•ªå·ã‚’指定ã§ãるよã†ã«ã™ã‚‹ã€? 389 sheetConstKeys = null ; // 5.5.8.2 (2012/11/09) 固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?(CSVå½¢å¼? 390 sheetConstAdrs = null ; // 5.5.8.2 (2012/11/09) 固定å?ã¨ãªã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹(è¡?åˆ?è¡?åˆ?・・・) 391 nullBreakClm = null; // 5.5.8.2 (2012/11/09) å–è¾¼ã¿æ¡ä»¶/Sheet BREAKæ¡ä»¶ 392 columns = null; // 3.5.4.5 (2004/01/23) 393 useNumber = true; // 3.7.0.5 (2005/04/11) 394 adjustColumns = null; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 395 checkColumns = null; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 396 nullCheck = null; // 3.8.0.2 (2005/06/30) 397 // allColumnCheck = false; // 3.6.0.2 (2004/10/04) å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ 398 stopZero = false; // 4.3.7.0 (2009/06/01) soptZero追åŠ? 399 isMainTrans = true; // 5.1.6.0 (2010/05/01) DBLastSqlã®å‡¦ç??見直ã? 400 skipRowCount = 0; // 5.1.6.0 (2010/05/01) ãƒ??ã‚¿ã®èªã¿é£›ã?ã—è¨å®? 401 useRenderer = HybsSystem.sysBool( "USE_TABLE_READER_RENDERER" ); // 5.2.1.0 (2010/10/01) 402 } 403 404 /** 405 * TableReader ã®å®Ÿã‚ªãƒ–ジェクトを生æ?ã—ã¦?ŒBufferedReader ã«æ›¸ãè¾¼ã¿ã¾ã™ã? 406 * 407 * @og.rev 3.5.4.1 (2003/12/01) 引数㮠BufferedReader ã‚’ã?InputStream ã«å¤‰æ›´ã€? 408 * @og.rev 3.5.4.2 (2003/12/15) TableReader ã®ã‚µãƒ–クラスå変更ã€? 409 * @og.rev 3.5.4.2 (2003/12/15) EXCELã®ã‚·ãƒ¼ãƒˆåを指定ã§ãるよã†ã«å¤‰æ›´ã€? 410 * @og.rev 3.5.4.3 (2004/01/05) 引数㮠InputStream ã‚’ã? BufferedReader ã«æˆ»ã™ã? 411 * @og.rev 3.5.4.5 (2004/01/23) TableReader ã«ã€encode を渡ã™ã‚ˆã?«å¤‰æ›´ã€? 412 * @og.rev 3.5.6.0 (2004/06/18) å?¨®ãƒ—ラグイン関連付ã‘è¨å®šã‚’ã€ã‚·ã‚¹ãƒ?ƒ パラメータ ã«è¨˜è¿°ã—ã¾ã™ã? 413 * @og.rev 3.7.0.5 (2005/04/11) useNumber 属æ?を追åŠ?—ã¾ã™ã? 414 * @og.rev 4.0.0.0 (2005/01/31) ã‚ãƒ¼ã®æŒ?®šã‚’ã€TableReader. ã‹ã‚‰ã€TableReader_ ã«å¤‰æ›´ã—ã¾ã™ã? 415 * @og.rev 4.0.0.0 (2005/01/31) lang â‡?ResourceManager ã¸å¤‰æ›´ 416 * @og.rev 5.1.6.0 (2010/05/01) ãƒ??ã‚¿ã®èªã¿é£›ã?ã—è¨å®?skipRowCount 属æ?追åŠ? 417 * @og.rev 5.2.1.0 (2010/10/01) èªå–å?ç?§ã‚³ãƒ¼ãƒ‰ãƒªã‚½ãƒ¼ã‚¹ã®ãƒ©ãƒ™ãƒ«å¤‰æ›ã‚’行ã†ã‹ã©ã?‹è¨å®?useRenderer 属æ?追åŠ? 418 * @og.rev 5.5.7.2 (2012/10/09) è¤?•°ã‚·ãƒ¼ãƒˆã‚’æŒ?®šã§ãるよã†ã«ã‚·ãƒ¼ãƒˆç•ªå·ã‚’指定ã§ãるよã†ã«ã€sheetNos属æ?追åŠ? 419 * @og.rev 5.5.8.2 (2012/11/09) 固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ã®æŒ?®šã?ãŸã‚ã®ã€sheetConstKeysã€sheetConstAdrs属æ?追åŠ? 420 * @og.rev 5.5.8.2 (2012/11/09) カラãƒ??ã« NULL ãŒç¾ã‚ŒãŸæ™‚点ã§èªã¿å–ã‚Šã‚’ä¸æ¢ã™ã‚‹ã€nullBreakClm属æ?追åŠ? 421 * 422 * @param out 出力ã™ã‚‹BufferedReaderオブジェクãƒ? 423 */ 424 protected void create( final BufferedReader out ) { 425 426 String className = HybsSystem.sys( "TableReader_" + readerClass ) ; // 4.0.0 (2005/01/31) 427 TableReader reader = (TableReader)HybsSystem.newInstance( className ); // 3.5.5.3 (2004/04/09) 428 429 reader.setResourceManager( getResource() ); // 4.0.0 (2005/01/31) 430 reader.setSeparator( separator ); 431 reader.setEncode( encode ); // 3.5.4.5 (2004/01/23) 432 reader.setColumns( columns ); // 3.5.4.5 (2004/01/23) 433 reader.setUseNumber( useNumber ); // 3.7.0.5 (2005/04/11) 434 reader.setMaxRowCount( maxRowCount ); 435 reader.setSkipRowCount( skipRowCount ); // 5.1.6.0 (2010/05/01) 436 reader.setUseRenderer( useRenderer ); // 5.2.1.0 (2010/10/01) 437 reader.setDebug( isDebug() ); // 5.5.7.2 (2012/10/09) ãƒ?ƒãƒ?‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹ã‚’指å®? 438 if( reader.isExcel() ) { // 3.5.4.3 (2004/01/05) 439 reader.setFilename( HybsSystem.url2dir( StringUtil.urlAppend( fileURL,filename ))); 440 reader.setSheetName( sheetName ); // 3.5.4.2 (2003/12/15) 441 reader.setSheetNos( sheetNos ); // 5.5.7.2 (2012/10/09) è¤?•°ã‚·ãƒ¼ãƒˆã‚’æŒ?®šã§ãるよã†ã«ã‚·ãƒ¼ãƒˆç•ªå·ã‚’指定ã§ãるよã†ã«ã™ã‚‹ã€? 442 reader.setSheetConstData( sheetConstKeys,sheetConstAdrs ) ; // 5.5.8.2 (2012/11/09) 固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ã®æŒ?®? 443 reader.setNullBreakClm( nullBreakClm ) ; // 5.5.8.2 (2012/11/09) å–è¾¼ã¿æ¡ä»¶/Sheet BREAKæ¡ä»¶ 444 reader.readDBTable(); 445 } 446 else { 447 reader.readDBTable( out ); 448 } 449 table = reader.getDBTableModel(); 450 } 451 452 /** 453 * BufferedReader ã‚’å–å¾—ã—ã¾ã™ã? 454 * 455 * ã“ã“ã§ã¯ã€ä¸?ˆ¬çš?ªãƒ•ァイル出力をè€??ã—㟠BufferedReader を作æ?ã—ã¾ã™ã? 456 * 457 * @og.rev 2.2.0.0 (2002/12/17) ä¸å›½èª?国際化)対å¿?エンコードã?å–得方法変更 458 * @og.rev 3.1.3.0 (2003/04/10) FILE_ENCODE ã‹ã‚‰ã€ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰æƒ…å ±ã‚’å–å¾—ã™ã‚‹ã? 459 * @og.rev 3.5.4.1 (2003/12/01) 引数㮠BufferedReader ã‚’ã?InputStream ã«å¤‰æ›´ã€? 460 * @og.rev 3.5.4.3 (2004/01/05) 引数㮠InputStream ã‚’ã? BufferedReader ã«æˆ»ã™ã? 461 * @og.rev 3.5.5.9 (2004/06/07) FileUtil.getBufferedReader を使用 462 * 463 * @return ファイルèªå–BufferedReaderオブジェクãƒ? 464 */ 465 private BufferedReader getBufferedReader() { 466 if( filename == null ) { 467 String errMsg = "ファイルåãŒã‚»ãƒ?ƒˆã•れã¦ã?¾ã›ã‚“ã€?; 468 throw new HybsSystemException( errMsg ); 469 } 470 String directory = HybsSystem.url2dir( fileURL ); 471 File file = new File( StringUtil.urlAppend( directory,filename ) ); 472 473 BufferedReader out = FileUtil.getBufferedReader( file,encode ); 474 475 return out ; 476 } 477 478 /** 479 * adjustColumns ã«æŒ?®šã•れãŸã‚«ãƒ©ãƒ?‚’å†ç™»éŒ²ã—ã¾ã™ã? 480 * カラãƒ?‚ªãƒ–ジェクトã?DBType属æ?ã«å¯¾å¿œã—ãŸå¤‰æ›ã‚’行ã„ã€å?è¨å®šã—ã¾ã™ã? 481 * 482 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦ä½œæ? 483 * 484 * @param table DBTableModel 登録å‰ã?DBTableModel 485 * 486 * @return DBTableModel 登録後ã?DBTableModel 487 */ 488 // private DBTableModel setAdjustTable( final DBTableModel table ) { 489 // if( adjustColumns != null && adjustColumns.length > 0 ) { 490 // int rowCnt = table.getRowCount(); 491 // int[] clmNo = new int[adjustColumns.length]; 492 // for( int i=0; i<clmNo.length; i++ ) { 493 // clmNo[i] = table.getColumnNo( adjustColumns[i] ); 494 // } 495 // 496 // for( int row=0; row<rowCnt; row++ ) { 497 // String[] vals = table.getValues( row ); 498 // for( int i=0; i<clmNo.length; i++ ) { 499 // int clm = clmNo[i]; 500 // DBColumn dbClm = table.getDBColumn( clm ); 501 // vals[clm] = dbClm.valueSet( vals[clm] ); 502 // } 503 // table.setValues( vals,row ); 504 // } 505 // } 506 // return table ; 507 // } 508 509 /** 510 * カラãƒ?–‡å—å?(CSVå½¢å¼?ã‹ã‚‰ã€ã‚«ãƒ©ãƒ?•ªå·é…å?を作æ?ã—ã¾ã™ã? 511 * 簡易メソãƒ?ƒ‰ã§ã™ã? 512 * 引数ãŒã?"*" ã®å ´åˆã?ã€å?カラãƒ?‚’æŒ?®šã—ãŸã“ã¨ã«ãªã‚Šã¾ã™ã? 513 * null ã®å ´åˆã?ã€ã‚µã‚¤ã‚ºã???ã®é…å?ã‚’è¿”ã—ã¾ã™ã? 514 * 515 * @og.rev 4.0.0.0 (2007/05/25) æ–°è¦ä½œæ? 516 * 517 * @param clms カラãƒ?–‡å—å?(CSVå½¢å¼? 518 * @param table DBTableModelオブジェクãƒ? 519 * 520 * @return カラãƒ?•ªå·é…å?(ç„¡ã??åˆã?ã€?•·ã•ï¼ã?é…å?) 521 */ 522 private int[] makeClmNos( final String clms,final DBTableModel table ) { 523 final int[] clmNo; 524 525 if( clms == null ) { 526 clmNo = new int[0]; 527 } 528 else if( "*".equals( clms ) ) { 529 int size = table.getColumnCount(); 530 clmNo = new int[size]; 531 for( int i=0; i<size; i++ ) { 532 clmNo[i] = i; 533 } 534 } 535 else { 536 String[] clmStr = StringUtil.csv2Array( clms ); 537 int size = clmStr.length; 538 clmNo = new int[size]; 539 for( int i=0; i<size; i++ ) { 540 clmNo[i] = table.getColumnNo( clmStr[i] ); 541 } 542 } 543 544 return clmNo; 545 } 546 547 /** 548 * checkColumns ã«æŒ?®šã•れãŸã‚«ãƒ©ãƒ?‚’ãƒã‚§ãƒ?‚¯ã—ã¾ã™ã? 549 * カラãƒ?‚ªãƒ–ジェクトã?DBType属æ?ã«å¯¾å¿œã—ãŸãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã? 550 * ãƒã‚§ãƒ?‚¯çµæžœã§ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå?åˆã?ã€ErrorMessage オブジェクトを 551 * è¿”ã—ã¾ã™ã? 552 * DBColumn#valueCheck( String ) ã®çµæžœã®ErrorMessageã‚’ã™ã¹ã¦ append 553 * ã—ã¦ã?ã¾ã™ã? 554 * useAdjust==true ã§ã€ã‹ã¤ã€ã‚¨ãƒ©ãƒ¼ãŒãªã??åˆã?ã€adjustColumns 処ç?µæžœã‚? 555 * DBTableModel ã«åæ˜ ã•ã›ã¾ã™ã? 556 * debug=true ã§ã€ã‚¨ãƒ©ãƒ¼æ™‚ã?詳細ãªãƒ??ã‚¿ã‚’å?力ã—ã¾ã™ã? 557 * 558 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦ä½œæ? 559 * @og.rev 3.8.0.2 (2005/06/30) nullãƒã‚§ãƒ?‚¯ç¢ºèª? 560 * @og.rev 4.0.0.0 (2007/05/25) 処ç??åºæ›¸ãæ›ã? 561 * 562 * @param table DBTableModelオブジェクãƒ? 563 * 564 * @return カラãƒ?‚ー ??値 ã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚ªãƒ–ジェクãƒ? 565 */ 566 private ErrorMessage checkTableColumn( final DBTableModel table ) { 567 ErrorMessage errMsg = new ErrorMessage( "Check Columns Error!" ); 568 569 int rowCnt = table.getRowCount(); 570 int[] adjClmNo = makeClmNos( adjustColumns,table ); 571 int[] chkClmNo = makeClmNos( checkColumns,table ); 572 int[] nllclmNo = makeClmNos( nullCheck,table ); 573 574 boolean useAdjust = (adjClmNo.length > 0) ; 575 576 for( int row=0; row<rowCnt; row++ ) { 577 String[] vals = table.getValues( row ); 578 DBColumn[] dbClms = table.getDBColumns(); 579 boolean isError = false; // 5.5.7.2 (2012/10/09) エラー時ã?フラグ。ループã§ã‚¯ãƒªã‚¢ã™ã‚‹ã€? 580 581 // adjustColumns 処ç? 582 for( int i=0; i<adjClmNo.length; i++ ) { 583 int no = adjClmNo[i]; 584 vals[no] = dbClms[no].valueSet( vals[no] ); 585 } 586 587 // checkColumns 処ç? 588 for( int i=0; i<chkClmNo.length; i++ ) { 589 int no = chkClmNo[i]; 590 // errMsg.append( row+1,dbClms[no].valueCheck( vals[no] ) ); 591 ErrorMessage msg = dbClms[no].valueCheck( vals[no] ); 592 if( msg.getKekka() > ErrorMessage.OK ) { 593 isError = true; 594 errMsg.append( row+1,dbClms[no].valueCheck( vals[no] ) ); 595 } 596 } 597 598 // nullCheck 処ç? 599 for( int i=0; i<nllclmNo.length; i++ ) { 600 int no = nllclmNo[i]; 601 if( vals[no] == null || vals[no].length() == 0 ) { 602 isError = true; 603 String label = dbClms[no].getLabel(); 604 // ERR0012 : æŒ?®šã?ãƒ??ã‚¿ãŒã‚»ãƒ?ƒˆã•れã¦ã?¾ã›ã‚“ã€?NULLエラー)。key={0} 605 errMsg.addMessage( row+1,ErrorMessage.NG,"ERR0012",label ); 606 } 607 } 608 609 // 5.5.7.2 (2012/10/09) エラー時ã?ãƒ?ƒãƒ?‚°å‡ºåŠ? 610 if( isDebug() && isError ) { 611 errMsg.addMessage( row+1,ErrorMessage.OK,"Debug Info",java.util.Arrays.toString(table.getValues(row) ) ); 612 } 613 614 // adjustColumns 処ç?µæžœã‚’åæ˜?•ã›ã¾ã™ã? 615 // if( useAdjust && errMsg.isOK() ) { table.setValues( vals,row ); } 616 if( useAdjust && !isError ) { table.setValues( vals,row ); } 617 if( errMsg.size() > ERROR_ROW_COUNT ) { break; } 618 } 619 620 return errMsg; 621 } 622 623 // private ErrorMessage checkTableColumn( final DBTableModel table ) { 624 // ErrorMessage errMsg = new ErrorMessage( "Check Columns Error!" ); 625 // 626 // if( allColumnCheck ) { 627 // checkColumns = table.getNames(); 628 // } 629 // 630 // int rowCnt = table.getRowCount(); 631 // if( checkColumns != null && checkColumns.length > 0 ) { 632 // int[] clmNo = new int[checkColumns.length]; 633 // for( int i=0; i<clmNo.length; i++ ) { 634 // clmNo[i] = table.getColumnNo( checkColumns[i] ); 635 // } 636 // 637 // for( int row=0; row<rowCnt; row++ ) { 638 // String[] vals = table.getValues( row ); 639 // for( int i=0; i<clmNo.length; i++ ) { 640 // int clm = clmNo[i]; 641 // DBColumn dbClm = table.getDBColumn( clm ); 642 // errMsg.append( row+1,dbClm.valueCheck( vals[clm] ) ); 643 // } 644 // } 645 // } 646 // 647 // // 3.8.0.2 (2005/06/30) nullãƒã‚§ãƒ?‚¯ç¢ºèª? 648 // if( nullCheck != null && nullCheck.length > 0 ) { 649 // int[] clmNo = new int[nullCheck.length]; 650 // for( int i=0; i<clmNo.length; i++ ) { 651 // clmNo[i] = table.getColumnNo( nullCheck[i] ); 652 // } 653 // 654 // for( int row=0; row<rowCnt; row++ ) { 655 // String[] vals = table.getValues( row ); 656 // for( int i=0; i<clmNo.length; i++ ) { 657 // int clm = clmNo[i]; 658 // if( vals[clm] == null || vals[clm].length() == 0 ) { 659 // String label = getResource().getLabel( nullCheck[i] ); 660 // // ERR0012 : æŒ?®šã?ãƒ??ã‚¿ãŒã‚»ãƒ?ƒˆã•れã¦ã?¾ã›ã‚“ã€?NULLエラー)。key={0} 661 // errMsg.addMessage( row+1,ErrorMessage.NG,"ERR0012",label ); 662 // } 663 // } 664 // } 665 // } 666 // 667 // return errMsg; 668 // } 669 670 /** 671 * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)çµæžœã®DBTableModelã‚’ã?sessionã«ç™»éŒ²ã™ã‚‹ã¨ãã?ã‚ーを指定ã—ã¾ã? 672 * (åˆæœŸå€¤:HybsSystem#TBL_MDL_KEY[={@og.value org.opengion.hayabusa.common.HybsSystem#TBL_MDL_KEY}])ã€? 673 * 674 * @og.tag 675 * æ¤œç´¢çµæžœã‚ˆã‚Šã€DBTableModelオブジェクトを作æ?ã—ã¾ã™ã?ã“れをã?下æµã?viewã‚¿ã‚°ç‰ã« 676 * 渡ã™å?åˆã«ã€??常ã¯ã€session を利用ã—ã¾ã™ã?ãã?å ´åˆã?登録ã‚ーã§ã™ã? 677 * query ã‚¿ã‚°ã‚’åŒæ™‚ã«å®Ÿè¡Œã—ã¦ã€çµæžœã‚’求ã‚ã‚‹å?åˆã?åŒä¸?ƒ¡ãƒ¢ãƒªã«é…ç½®ã•れる為ã€? 678 * ã“ã? tableId 属æ?を利用ã—ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã‚’åˆ?‘ã¾ã™ã? 679 * (åˆæœŸå€¤:HybsSystem#TBL_MDL_KEY[={@og.value org.opengion.hayabusa.common.HybsSystem#TBL_MDL_KEY}])ã€? 680 * 681 * @param id sessionã«ç™»éŒ²ã™ã‚‹æ™‚ã? ID 682 */ 683 public void setTableId( final String id ) { 684 tableId = nval( getRequestParameter( id ), tableId ); 685 } 686 687 /** 688 * ã€TAG】å¯å¤‰é•·ãƒ•ァイルを作æ?ã™ã‚‹ã¨ãã?é ?›®åŒºåˆ?‚Šæ–?—ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã? 689 * 690 * @og.tag å¯å¤‰é•·ãƒ•ァイルを作æ?ã™ã‚‹ã¨ãã?é ?›®åŒºåˆ?‚Šæ–?—ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã? 691 * 692 * @param separator é ?›®åŒºåˆ?‚Šæ–?? 693 */ 694 public void setSeparator( final String separator ) { 695 this.separator = nval( getRequestParameter( separator ),this.separator ); 696 } 697 698 /** 699 * ã€TAG】èªã¿å–りå…?ƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåã‚’æŒ?®šã—ã¾ã? 700 * (åˆæœŸå€¤:FILE_URL[={@og.value org.opengion.hayabusa.common.SystemData#FILE_URL}])ã€? 701 * 702 * @og.tag 703 * ã“ã?属æ?ã§æŒ?®šã•れるãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒªã‚ˆã‚Šã€ãƒ•ァイルをèªã¿å–りã¾ã™ã? 704 * æŒ?®šæ–¹æ³•ã?ã€??常㮠fileURL 属æ?ã¨åŒæ§˜ã«ã€å?é ãŒã?'/' (UNIX) ã¾ãŸã?ã€?¼’æ–‡å—ç›®ãŒã? 705 * ":" (Windows)ã®å ´åˆã?ã€æŒ‡å®šã?URLãã?ã¾ã¾ã®ãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã€ãã?§ãªã??åˆã?ã€? 706 * fileURL = "{@USER.ID}" ã¨æŒ?®šã™ã‚‹ã¨ã€FILE_URL 属æ?ã§æŒ?®šã?フォルãƒ??下ã«ã€? 707 * ã•らã«ã€å„個人ID別ã®ãƒ•ォルãƒ?‚’作æ?ã—ã¦ã€ãã“ã‚’æ“作ã—ã¾ã™ã? 708 * (åˆæœŸå€¤:シスãƒ?ƒ 定数ã®FILE_URL[={@og.value org.opengion.hayabusa.common.SystemData#FILE_URL}])ã€? 709 * 710 * @og.rev 4.0.0.0 (2005/01/31) StringUtil.urlAppend メソãƒ?ƒ‰ã®åˆ©ç”¨ 711 * @og.rev 4.0.0.0 (2007/11/20) æŒ?®šã•れãŸãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒªåã?æœ?¾ŒãŒ"\"or"/"ã§çµ‚ã‚ã£ã¦ã?ªã??åˆã«ã€?/"ã‚’ä»˜åŠ ã™ã‚‹ã€? 712 * 713 * @param url èªã¿å–りå…?ƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå? 714 * @see org.opengion.hayabusa.common.SystemData#FILE_URL 715 */ 716 public void setFileURL( final String url ) { 717 String furl = nval( getRequestParameter( url ),null ); 718 if( furl != null ) { 719 char ch = furl.charAt( furl.length()-1 ); 720 if( ch != '/' && ch != '\\' ) { furl = furl + "/"; } 721 fileURL = StringUtil.urlAppend( fileURL,furl ); 722 } 723 } 724 725 /** 726 * ã€TAG】ファイルを作æ?ã™ã‚‹ã¨ãã?ファイルåã‚’ã‚»ãƒ?ƒˆã—ã¾ã? 727 * (åˆæœŸå€¤:FILE_FILENAME[={@og.value org.opengion.hayabusa.common.SystemData#FILE_FILENAME}])ã€? 728 * 729 * @og.tag ファイルを作æ?ã™ã‚‹ã¨ãã?ファイルåã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã? 730 * (åˆæœŸå€¤:シスãƒ?ƒ 定数ã®FILE_FILENAME[={@og.value org.opengion.hayabusa.common.SystemData#FILE_FILENAME}])ã€? 731 * 732 * @param filename ファイルå? 733 * @see org.opengion.hayabusa.common.SystemData#USE_SQL_INJECTION_CHECK 734 */ 735 public void setFilename( final String filename ) { 736 this.filename = nval( getRequestParameter( filename ),this.filename ); 737 } 738 739 /** 740 * ã€TAG】ファイルを作æ?ã™ã‚‹ã¨ãã?ファイルエンコーãƒ?‚£ãƒ³ã‚°åã‚’ã‚»ãƒ?ƒˆã—ã¾ã? 741 * (åˆæœŸå€¤:FILE_ENCODE[={@og.value org.opengion.hayabusa.common.SystemData#FILE_ENCODE}])ã€? 742 * 743 * @og.tag 744 * Shift_JIS,MS932,Windows-31J,UTF-8,ISO-8859-1,UnicodeLittle 745 * (åˆæœŸå€¤:シスãƒ?ƒ 定数ã®FILE_ENCODE[={@og.value org.opengion.hayabusa.common.SystemData#FILE_ENCODE}])ã€? 746 * 747 * @og.rev 2.2.0.0 (2002/12/17) ä¸å›½èª?国際化)対å¿?エンコードã?å–得方法変更 748 * @og.rev 3.1.3.0 (2003/04/10) FILE_ENCODE ã‹ã‚‰ã€ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰æƒ…å ±ã‚’å–å¾—ã™ã‚‹ã? 749 * 750 * @param enc ファイルエンコーãƒ?‚£ãƒ³ã‚°å? 751 * @see <a href="http://www.iana.org/assignments/character-sets">IANA Charset Registry</a> 752 * @see org.opengion.hayabusa.common.SystemData#FILE_ENCODE 753 */ 754 public void setEncode( final String enc ) { 755 encode = nval( getRequestParameter( enc ),encode ); 756 } 757 758 /** 759 * ã€TAG】実際ã«èªã¿å‡ºã™ã‚¯ãƒ©ã‚¹åã?略称(TableReader_**** ã® ****)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?{@og.doc03Link readerClass åˆæœŸå€¤:Default})ã€? 760 * 761 * @og.tag 762 * 実際ã«èªã¿å‡ºã™ã‚¯ãƒ©ã‚¹å?ã®ç•¥ç§°)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã? 763 * ã“れã¯ã€org.opengion.hayabusa.io 以下ã? TableReader_**** クラス㮠**** ã‚? 764 * 与ãˆã¾ã™ã?ã“れらã?ã€TableReader インターフェースを継承ã—ãŸã‚µãƒ–クラスã§ã™ã? 765 * 属æ?クラス定義㮠{@link org.opengion.hayabusa.io.TableReader TableReader} ã‚’å‚照願ã„ã¾ã™ã? 766 * {@og.doc03Link readerClass TableReader_**** クラス} 767 * 768 * @param readerClass クラスå?ã®ç•¥ç§°) 769 * @see org.opengion.hayabusa.io.TableReader TableReaderã®ã‚µãƒ–クラス 770 */ 771 public void setReaderClass( final String readerClass ) { 772 this.readerClass = nval( getRequestParameter( readerClass ),this.readerClass ); 773 } 774 775 /** 776 * ã€TAG】èªå–æ™‚ã®æœ?¤§å–り込ã¿ä»¶æ•°ã‚’ã‚»ãƒ?ƒˆã—ã¾ã? 777 * (åˆæœŸå€¤:DB_MAX_ROW_COUNT[={@og.value org.opengion.hayabusa.common.SystemData#DB_MAX_ROW_COUNT}])ã€? 778 * 779 * @og.tag 780 * DBTableModelã®ãƒ??ã‚¿ã¨ã—ã¦ç™»éŒ²ã™ã‚‹æœ?¤§ä»¶æ•°ã‚’ã“ã®å€¤ã«è¨å®šã—ã¾ã™ã? 781 * サーãƒã?ã®ãƒ¡ãƒ¢ãƒªè³?ºã¨å¿œç”時間ã?確ä¿ã?為ã§ã™ã? 782 * 0 ã‚’ã‚»ãƒ?ƒˆã™ã‚‹ã¨ã€ç„¡åˆ¶é™?Integer.MAX_VALUE)ã«ãªã‚Šã¾ã™ã? 783 * (åˆæœŸå€¤:ユーザー定数ã®DB_MAX_ROW_COUNT[={@og.value org.opengion.hayabusa.common.SystemData#DB_MAX_ROW_COUNT}])ã€? 784 * 785 * @og.rev 5.5.8.5 (2012/11/27) 0を無制é™ã¨ã—ã¦å‡¦ç?—ã¾ã™ã? 786 * 787 * @param count èªå–æ™‚ã®æœ?¤§å–り込ã¿ä»¶æ•° 788 * @see org.opengion.hayabusa.common.SystemData#DB_MAX_ROW_COUNT 789 */ 790 public void setMaxRowCount( final String count ) { 791 maxRowCount = nval( getRequestParameter( count ),maxRowCount ); 792 if( maxRowCount == 0 ) { maxRowCount = Integer.MAX_VALUE ; } // 5.5.8.5 (2012/11/27) 793 } 794 795 /** 796 * ã€TAG】コマンãƒ?NEW,RENEW)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:NEW)ã€? 797 * 798 * @og.tag 799 * コマンドã?,HTMLã‹ã‚‰(get/post)æŒ?®šã•れã¾ã™ã?ã§,CMD_xxx ã§è¨å®šã•れる 800 * フィールド定数値ã®ã?¥ã‚Œã‹ã‚’ã?æŒ?®šã§ãã¾ã™ã? 801 * 何もè¨å®šã•れãªã??ã¾ãŸã?ã€null ã®å ´åˆã?ã€?NEW" ãŒå?期å?ã«ã‚»ãƒ?ƒˆã•れã¾ã™ã? 802 * 803 * @param cmd コマンãƒ?public static final 宣è¨?•れã¦ã?‚‹æ–?—å?) 804 * @see <a href="{@docRoot}/constant-values.html#org.opengion.hayabusa.taglib.ReadTableTag.CMD_NEW">コマンド定数</a> 805 */ 806 public void setCommand( final String cmd ) { 807 String cmd2 = getRequestParameter( cmd ); 808 if( cmd2 != null && cmd2.length() > 0 ) { command = cmd2.toUpperCase(Locale.JAPAN); } 809 } 810 811 /** 812 * ã€TAG】query ã®çµæžœã‚’ç”»é¢ä¸Šã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0033[ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸ])ã€? 813 * 814 * @og.tag 815 * ã“ã“ã§ã¯ã€æ¤œç´¢çµæžœã®ä»¶æ•°ã‚?™»éŒ²ã•れãŸä»¶æ•°ã‚’ã¾ãšå?力ã—ã€? 816 * ãã?次ã«ã€ã“ã“ã§æŒ?®šã—ãŸãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’リソースã‹ã‚‰å–å¾—ã—㦠817 * 表示ã—ã¾ã™ã? 818 * 表示ã•ã›ãŸããªã??åˆã?, displayMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€? 819 * åˆæœŸå€¤ã¯ã€æ¤œç´¢ä»¶æ•°ã‚’表示ã—ã¾ã™ã? 820 * 821 * @param id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID 822 */ 823 public void setDisplayMsg( final String id ) { 824 if( id != null ) { displayMsg = id; } 825 } 826 827 /** 828 * ã€TAGã€‘æ¤œç´¢çµæžœãŒã‚¼ãƒä»¶ã®å ´åˆã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹IDを指定ã—ã¾ã?åˆæœŸå€¤:MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ])ã€? 829 * 830 * @og.tag 831 * ã“ã“ã§ã¯ã€æ¤œç´¢çµæžœãŒã‚¼ãƒä»¶ã®å ´åˆã?ã¿ã€ç‰¹åˆ¥ãªãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’表示ã•ã›ã¾ã™ã? 832 * 従æ¥ã¯ã€displayMsg ã¨å…¼ç”¨ã§ã€ã?0ã€?»¶æ¤œç´¢ã—ã¾ã—ãŸã€ã¨ã?†è¡¨ç¤ºã§ã—ãŸãŒã? 833 * displayMsg ã®åˆæœŸè¡¨ç¤ºã¯ã€OFF ã«ãªã‚Šã¾ã—ãŸã®ã§ã€ã‚¼ãƒä»¶ã®å ´åˆã?ã¿åˆ¥ã«è¡¨ç¤ºã•ã›ã¾ã™ã? 834 * 表示ã•ã›ãŸããªã??åˆã?, notfoundMsg = "" ã‚’ã‚»ãƒ?ƒˆã—ã¦ãã ã•ã„ã€? 835 * åˆæœŸå€¤ã¯ã€MSG0077[対象ãƒ??ã‚¿ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ]ã§ã™ã? 836 * 837 * @param id ãƒ?‚£ã‚¹ãƒ—レイã«è¡¨ç¤ºã•ã›ã‚‹ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ ID 838 */ 839 public void setNotfoundMsg( final String id ) { 840 String ids = getRequestParameter( id ); 841 if( ids != null ) { notfoundMsg = ids; } 842 } 843 844 /** 845 * ã€TAG】ファイルå–ã‚Šè¾¼ã¿æ™‚ã? モãƒ?‚£ãƒ•ァイタイãƒ?A(追åŠ?,C(æ›´æ–°),D(削除))を指定ã—ã¾ã™ã? 846 * 847 * @og.tag 848 * ファイルèªã¿è¾¼ã¿æ™‚ã«ã€ãã®ãƒ??ã‚¿ã‚’A(追åŠ?ã€C(æ›´æ–°)ã€D(削除)ã® 849 * モãƒ?‚£ãƒ•ァイタイプをã¤ã‘ãŸçŠ¶æ…‹ã«ã—ã¾ã™ã? 850 * ãã?状態ã§ã€ãã®ã¾ã¾ã€update ã™ã‚‹äº‹ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã? 851 * 852 * @param type ファイルå–ã‚Šè¾¼ã¿æ™‚ã? モãƒ?‚£ãƒ•ァイタイãƒ?A,C,D属æ?) 853 */ 854 public void setModifyType( final String type ) { 855 modifyType = getRequestParameter( type ); 856 } 857 858 /** 859 * ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シートåã‚’è¨å®šã—ã¾ã?åˆæœŸå€¤:æŒ?®šãªã?ã€? 860 * 861 * @og.tag 862 * EXCELファイルをèªã¿è¾¼ã‚?™‚ã«ã€ã‚·ãƒ¼ãƒˆåを指定ã—ã¾ã™ã?ã“れã«ã‚ˆã‚Šã€è¤?•°ã®å½¢å¼ã? 863 * ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’é?次èªã¿è¾¼ã‚?“ã¨ã‚??シートをæŒ?®šã—ã¦èªã¿å–ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã? 864 * sheetNos 㨠sheetName ãŒåŒæ™‚ã«æŒ?®šã•れãŸå ´åˆã?ã€sheetNos ãŒå„ªå…ˆã•れã¾ã™ã?エラーã«ã¯ãªã‚‰ãªã??ã§ã”注æ„ãã?•ã?? 865 * <del>åˆæœŸå€¤ã¯ã€ç¬¬ä¸?‚·ãƒ¼ãƒˆã§ã™ã?</del> 866 * åˆæœŸå€¤ã¯ã€æŒ‡å®šãªã—ã§ã™ã? 867 * 868 * @og.rev 3.5.4.2 (2003/12/15) æ–°è¦è¿½åŠ? 869 * 870 * @param sheet EXCELファイルã®ã‚·ãƒ¼ãƒˆå 871 * @see #setSheetNos( String ) 872 */ 873 public void setSheetName( final String sheet ) { 874 sheetName = nval( getRequestParameter( sheet ),sheetName ); 875 } 876 877 /** 878 * ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シート番å·ã‚’指定ã—ã¾ã?åˆæœŸå€¤:0)ã€? 879 * 880 * @og.tag 881 * EXCELèªã¿è¾¼ã¿æ™‚ã«è¤?•°ã‚·ãƒ¼ãƒˆã‚’マã?ジã—ã¦å–り込ã¿ã¾ã™ã? 882 * シート番å·ã¯ã€? ã‹ã‚‰å§‹ã¾ã‚‹æ•°å—ã§è¡¨ã—ã¾ã™ã? 883 * ヘッãƒ??ã¯ã€æœ€åˆã?シートã?カラãƒ?½ç½®ã«åˆã‚ã›ã¾ã™ã??ˆã?ãƒ?ƒ€ãƒ¼ã‚¿ã‚¤ãƒˆãƒ«ã®è‡ªå‹•èªè˜ã?ã‚りã¾ã›ã‚“。ï¼? 884 * よã£ã¦ã€æŒ‡å®šã™ã‚‹ã‚·ãƒ¼ãƒˆã?ã€ã™ã¹ã¦åŒä¸?ƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã§ãªã?¨å–ã‚Šè¾¼ã¿æ™‚ã«ã‚«ãƒ©ãƒ??ãšã‚ŒãŒç™ºç”Ÿã—ã¾ã™ã? 885 * 886 * シート番å·ã®æŒ?®šã?ã€ã‚«ãƒ³ãƒžåŒºåˆ?‚Šã§ã€è¤?•°æŒ?®šã§ãã¾ã™ã?ã¾ãŸã?N-M ã®æ§˜ã«ãƒã‚¤ãƒ•ンã§ç¹‹ã’ã‚‹ã“ã¨ã§ã€? 887 * N 番ã‹ã‚‰ã€M 番ã®ã‚·ãƒ¼ãƒˆç¯?›²ã‚’ä¸?‹¬æŒ?®šå¯èƒ½ã§ã™ã?ã¾ãŸã?"*" ã«ã‚ˆã‚‹ã€å?シート指定ãŒå¯èƒ½ã§ã™ã? 888 * ã“れらã?çµ?¿åˆã‚ã›ã‚‚å¯èƒ½ã§ã™ã???0,1,3,5-8,10-* ?? 889 * ãŸã ã—ã?"*" ã«é–¢ã—ã¦ã¯ä¾‹å¤–çš„ã«ã€ä¸?–‡å—ã ã‘ã§ã€ã™ã¹ã¦ã®ã‚·ãƒ¼ãƒˆã‚’表ã™ã‹ã€N-* ã‚’æœ€å¾Œã«æŒ?®šã™ã‚‹ã‹ã® 890 * ã©ã¡ã‚‰ã‹ã§ã™ã?途ä¸ã«ã¯ã€?*" ã¯ã€ç¾ã‚Œã¾ã›ã‚“ã€? 891 * シート番å·ã¯ã€?‡è¤?1,1,2,2)ã€??転(3,2,1) ã§ã®æŒ?®šãŒå¯èƒ½ã§ã™ã?ã“れã¯ã€ãã®æŒ?®šé?ã§ã€èªã¿è¾¼ã¾ã‚Œã¾ã™ã? 892 * sheetNos 㨠sheetName ãŒåŒæ™‚ã«æŒ?®šã•れãŸå ´åˆã?ã€sheetNos ãŒå„ªå…ˆã•れã¾ã™ã?エラーã«ã¯ãªã‚‰ãªã??ã§ã”注æ„ãã?•ã?? 893 * 894 * åˆæœŸå€¤ã¯ã€??ˆç¬¬ä¸?‚·ãƒ¼ãƒˆï¼?ã§ã™ã? 895 * 896 * @og.rev 5.5.7.2 (2012/10/09) æ–°è¦è¿½åŠ? 897 * 898 * @param sheet EXCELファイルã®ã‚·ãƒ¼ãƒˆç•ªå·??ã‹ã‚‰å§‹ã¾ã‚‹ï¼? 899 * @see #setSheetName( String ) 900 */ 901 public void setSheetNos( final String sheet ) { 902 sheetNos = nval( getRequestParameter( sheet ),sheetNos ); 903 if( sheetNos != null && sheetNos.length() > 0 ) { 904 boolean errFlag = false; 905 for( int i=0; i<sheetNos.length(); i++ ) { 906 char ch = sheetNos.charAt(i); 907 if( ch == '-' || ch == ',' ) { continue; } 908 if( ch == '*' && ( i==0 || i==sheetNos.length()-1 ) ) { continue; } 909 if( ch < '0' || ch > '9' ) { errFlag = true; break; } 910 } 911 if( errFlag ) { 912 String errMsg = "sheetNos ã®æŒ?®šã‚’見直ã—ã¦ãã ã•ã„。sheetNos=[" + sheetNos + "]"; 913 throw new HybsSystemException( errMsg ); 914 } 915 } 916 } 917 918 /** 919 * ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シートå˜ä½ã?固定å?ã‚’è¨å®šã™ã‚‹ãŸã‚ã?カラãƒ?を指定ã—ã¾ã™ã? 920 * 921 * @og.tag 922 * カラãƒ?ã¯ã€ã‚«ãƒ³ãƒžåŒºåˆ?‚Šã§æŒ?®šã—ã¾ã™ã? 923 * ã“れã«ã‚ˆã‚Šã€ã‚·ãƒ¼ãƒˆã?ä¸?‹æ‰?«æ›¸ã‹ã‚Œã¦ã?‚‹æƒ??ã‚’ã?DBTableModel ã®ã‚«ãƒ©ãƒ?«å›ºå®šå?ã¨ã—㦠924 * è¨å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã? 925 * 例ã¨ã—ã¦ã€DB定義書ã§ã€ãƒ†ãƒ¼ãƒ–ルåをシートã?全レコードã«è¨å®šã—ãŸã„å ´åˆãªã©ã«ä½¿ã?¾ã™ã? 926 * ã“ã?メソãƒ?ƒ‰ã¯ã€isExcel() == true ã®å ´åˆã?ã¿åˆ©ç”¨ã•れã¾ã™ã? 927 * 928 * @og.rev 5.5.8.2 (2012/11/09) æ–°è¦è¿½åŠ? 929 * 930 * @param constKeys 固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?(CSVå½¢å¼? 931 * @see #setSheetConstAdrs( String ) 932 */ 933 public void setSheetConstKeys( final String constKeys ) { 934 sheetConstKeys = nval( getRequestParameter( constKeys ),null ); 935 } 936 937 /** 938 * ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シートå˜ä½ã?固定å?ã‚’è¨å®šã™ã‚‹ãŸã‚ã?カラãƒ?ã«å¯¾å¿œã™ã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã—ã¾ã™ã? 939 * 940 * @og.tag 941 * アドレスã¯ã€EXCEL上ã?è¡?列をカンマ区åˆ?‚Šã§æŒ?®šã—ã¾ã™ã? 942 * 行å?ã¯ã€EXCELã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æº–æ‹ ã™ã‚‹ãŸã‚ã€?¼ã‹ã‚‰å§‹ã¾ã‚‹æ•´æ•°ã§ã™ã? 943 * ã“れã«ã‚ˆã‚Šã€ã‚·ãƒ¼ãƒˆã?ä¸?‹æ‰?«æ›¸ã‹ã‚Œã¦ã?‚‹æƒ??ã‚’ã?DBTableModel ã®ã‚«ãƒ©ãƒ?«å›ºå®šå?ã¨ã—㦠944 * è¨å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã? 945 * 例ã¨ã—ã¦ã€DB定義書ã§ã€ãƒ†ãƒ¼ãƒ–ルåをシートã?全レコードã«è¨å®šã—ãŸã„å ´åˆãªã©ã«ä½¿ã?¾ã™ã? 946 * ã“ã?メソãƒ?ƒ‰ã¯ã€isExcel() == true ã®å ´åˆã?ã¿åˆ©ç”¨ã•れã¾ã™ã? 947 * 948 * @og.rev 5.5.8.2 (2012/11/09) æ–°è¦è¿½åŠ? 949 * 950 * @param constAdrs 固定å?ã¨ãªã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹(è¡?åˆ?è¡?åˆ?・・・) 951 * @see #setSheetConstKeys( String ) 952 */ 953 public void setSheetConstAdrs( final String constAdrs ) { 954 sheetConstAdrs = nval( getRequestParameter( constAdrs ),null ); 955 } 956 957 /** 958 * ã€TAG】ã“ã“ã«æŒ?®šã•れãŸã‚«ãƒ©ãƒ??ã« NULL ãŒç¾ã‚ŒãŸæ™‚点ã§èªã¿å–ã‚Šã‚’ä¸æ¢ã—ã¾ã™ã? 959 * 960 * @og.tag 961 * ã“れã¯ã€æŒ‡å®šã?カラãƒ??å¿??ã¨ã?†äº‹ã‚’æ¡ä»¶ã«ã€ãã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã ã‘ã‚’èªã¿å–る処ç?‚’行ã„ã¾ã™ã? 962 * è¤?•°Sheetã®å ´åˆã?ã€æ¬¡ã®Sheetã‚’èªã¿ã¾ã™ã? 963 * ç¾æ™‚点ã§ã¯ã€Excel ã®å ´åˆã?ã¿æœ‰åйã§ã™ã? 964 * 965 * @og.rev 5.5.8.2 (2012/11/09) æ–°è¦è¿½åŠ? 966 * 967 * @param clm カラãƒ?? 968 */ 969 public void setNullBreakClm( final String clm ) { 970 nullBreakClm = nval( getRequestParameter( clm ),null ); 971 } 972 973 /** 974 * ã€TAG】èªã¿å–りå…?ƒ•ァイルã®ã‚«ãƒ©ãƒ??ã‚’ã?外部(ã‚¿ã‚°)よりæŒ?®šã—ã¾ã™ã? 975 * 976 * @og.tag 977 * èªã¿å–りå…?ƒ•ァイルã®ã‚«ãƒ©ãƒ??ã‚’ã?外部(ã‚¿ã‚°)よりæŒ?®šã—ã¾ã™ã? 978 * ファイルã«è¨˜è¿°ã•れã?#NAME より優先ã—ã¦ä½¿ç”¨ã•れã¾ã™ã? 979 * ã“れã¯ã€å?ファイルã®ã‚«ãƒ©ãƒ?‚’é ?•ªã«æŒ?®šã?カラãƒ?ã«å‰²ã‚Šå½“ã¦ã‚‹æ©Ÿè?ã§ 980 * ファイルã®ç‰¹å®šã?カラãƒ??を抜ãå?ã—ã¦å–り込ã‚?©Ÿè?ã§ã¯ã‚りã¾ã›ã‚“ã€? 981 * 982 * @og.rev 3.5.4.5 (2004/01/23) æ–°è¦ä½œæ? 983 * 984 * @param clms èªã¿å–りå…?ƒ•ァイルã®ã‚«ãƒ©ãƒ??(カンマ区åˆ?‚Šæ–?? 985 */ 986 public void setColumns( final String clms ) { 987 columns = nval( getRequestParameter( clms ),columns ); 988 } 989 990 /** 991 * ã€TAG】èªã¿å–りå…?ƒ•ã‚¡ã‚¤ãƒ«ã®æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã†ã‚«ãƒ©ãƒ??をカンマ指定ã—ã¾ã™ã? 992 * 993 * @og.tag 994 * カラãƒ?‚ªãƒ–ジェクトã?DBType属æ?ã«å¯¾å¿œã—ãŸãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã? 995 * æŒ?®šã?カラãƒ?をカンマ区åˆ?‚Š(CSV)ã§è¤?•°æŒ?®šã§ãã¾ã™ã? 996 * å…¨ã¦ã®ã‚«ãƒ©ãƒ??ãƒã‚§ãƒ?‚¯ã‚’行ã†å ´åˆã?ã€allColumnCheck = "true" ã‚? 997 * æŒ?®šã—ã¦ä¸‹ã•ã?? 998 * åˆ?§£æ–¹æ³•ã?ã€??常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã—ã¾ã™ã? 999 * 1000 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦è¿½åŠ?å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ç”¨ 1001 * @og.rev 3.8.8.5 (2007/03/09) 通常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã«æˆ»ã—ã¾ã™ã? 1002 * 1003 * @param clms æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã†ã‚«ãƒ©ãƒ??(カンマ区åˆ?‚Šæ–?? 1004 */ 1005 public void setCheckColumns( final String clms ) { 1006 checkColumns = nval( getRequestParameter( clms ),checkColumns ); 1007 1008 // checkColumns = StringUtil.csv2Array( getRequestParameter( clms ) ); 1009 // if( checkColumns.length == 0 ) { checkColumns = null; } 1010 } 1011 1012 /** 1013 * ã€TAG】èªã¿å–りå…?ƒ•ァイルã®ãƒ??タ変æ›ã‚’行ã†ã‚«ãƒ©ãƒ??をカンマ指定ã—ã¾ã™ã? 1014 * 1015 * @og.tag 1016 * カラãƒ?‚ªãƒ–ジェクトã?DBType属æ?ã«å¯¾å¿œã—ãŸãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’行ã„ã¾ã™ã? 1017 * æŒ?®šã?カラãƒ?をカンマ区åˆ?‚Š(CSV)ã§è¤?•°æŒ?®šã§ãã¾ã™ã? 1018 * åˆ?§£æ–¹æ³•ã?ã€??常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã—ã¾ã™ã? 1019 * 1020 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦è¿½åŠ?å–ã‚Šè¾¼ã¿æ™‚ãƒ‡ãƒ¼ã‚¿å¤‰æ› 1021 * @og.rev 3.8.8.5 (2007/03/09) 通常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã«æˆ»ã—ã¾ã™ã? 1022 * 1023 * @param clms ãƒ??タ変æ›ã‚’行ã†ã‚«ãƒ©ãƒ??(カンマ区åˆ?‚Šæ–?? 1024 */ 1025 public void setAdjustColumns( final String clms ) { 1026 adjustColumns = nval( getRequestParameter( clms ),adjustColumns ); 1027 1028 // adjustColumns = StringUtil.csv2Array( getRequestParameter( clms ) ); 1029 // if( adjustColumns.length == 0 ) { adjustColumns = null; } 1030 } 1031 1032 /** 1033 * ã€TAG】å?カラãƒ?ƒã‚§ãƒ?‚¯ã‚’行ã†ã‹ã©ã?‹ã‚’è¨å®šã—ã¾ã?åˆæœŸå€¤:false)ã€? 1034 * 1035 * @og.tag 1036 * カラãƒ??æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã†å ´åˆã?カラãƒ?を指定ã›ãšã?全カラãƒ?? 1037 * ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã“ã¨ãŒå?æ¥ã¾ã™ã?(allColumnCheck="true") 1038 * åˆæœŸå€¤ã¯ã€è¡Œã‚ãªã?false)ã§ã™ã? 1039 * 全カラãƒ?ƒã‚§ãƒ?‚¯ã‚’行ã†å ´åˆã?ã€checkColumns ã®æŒ?®šã?ã€ç„¡è¦–ã•れã¾ã™ã? 1040 * 1041 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦è¿½åŠ?å–ã‚Šè¾¼ã¿æ™‚å?ãƒã‚§ãƒ?‚¯ 1042 * 1043 * @param flag å…¨ãƒã‚§ãƒ?‚¯ã‚’行ã†ã‹ã©ã?‹(true:行ã†/false:行ã‚ãªã? 1044 * @see #setCheckColumns( String ) 1045 */ 1046 // public void setAllColumnCheck( final String flag ) { 1047 // allColumnCheck = nval( getRequestParameter( flag ),allColumnCheck ); 1048 // } 1049 1050 /** 1051 * ã€TAG】NULL ãƒã‚§ãƒ?‚¯ã™ã¹ãカラãƒ??をカンマ区åˆ?‚Š(CVSå½¢å¼?ã§æŒ?®šã—ã¾ã™ã? 1052 * 1053 * @og.tag nullCheck="AAA,BBB,CCC,DDD" 1054 * <del>å…ˆã«é…å?ã«åˆ?§£ã—ã¦ã‹ã‚‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•°ã®å€¤ã‚’å–å¾—ã™ã‚‹ã‚ˆã?«ã—ã¾ã™ã? 1055 * ã“ã†ã™ã‚‹äº‹ã§ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚«ãƒ³ãƒžåŒºåˆ?‚Šã®å€¤ã‚’è¨å®šã§ãるよã†ã«ãªã‚Šã¾ã™ã?</del> 1056 * åˆ?§£æ–¹æ³•ã?ã€??常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã—ã¾ã™ã? 1057 * 1058 * @og.rev 3.8.0.2 (2005/06/30) æ–°è¦è¿½åŠ? 1059 * @og.rev 3.8.8.5 (2007/03/09) 通常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã«æˆ»ã—ã¾ã™ã? 1060 * 1061 * @param clms カラãƒ??(CVSå½¢å¼? 1062 */ 1063 public void setNullCheck( final String clms ) { 1064 nullCheck = nval( getRequestParameter( clms ),nullCheck ); 1065 1066 // nullCheck = StringUtil.csv2Array( getRequestParameter( clms ) ); 1067 // if( nullCheck.length == 0 ) { nullCheck = null; } 1068 } 1069 1070 /** 1071 * ã€TAGã€‘è¡Œç•ªå·æƒ??ã‚’ã?使用ã—ã¦ã?‚‹/ã—ã¦ã?ªã„[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:true)ã€? 1072 * 1073 * @og.tag 1074 * 通常ã®ãƒ•ォーマットã§ã¯ã€å„行ã?å…ˆé?ã«è¡Œç•ªå·ãŒå?力ã•れã¦ã?¾ã™ã? 1075 * èªã¿å–り時ã«ã€?NAME 属æ?を使用ã™ã‚‹å ´åˆã?ã€ã“ã®è¡Œç•ªå·ã‚’無視ã—ã¦ã?¾ã™ã? 1076 * #NAME 属æ?を使用ã›ãšã€columns 属æ?ã§ã‚«ãƒ©ãƒ?を指定ã™ã‚‹å?å?他シスãƒ?ƒ ã® 1077 * 出力ファイルをèªã¿å–るケースç?ã§ã¯ã€è¡Œç•ªå·ã‚‚å˜åœ¨ã—ãªã?‚±ãƒ¼ã‚¹ãŒã‚りã? 1078 * ãã?様ãªå ´åˆã«ã€useNumber="false" を指定ã™ã‚Œã?ã€ãƒ‡ãƒ¼ã‚¿ã®æœ??ã‹ã‚‰èªã¿å–り始ã‚ã¾ã™ã? 1079 * ã“ã?å ´åˆã?出力データã®ã‚«ãƒ©ãƒ??並ã³é ?Œå¤‰æ›´ã•れãŸå?åˆã?columns 属æ?ã‚? 1080 * æŒ?®šã—ãªãŠã™å¿?¦ãŒã‚りã¾ã™ã?ã§ã€ã§ãã‚‹ã?‘ã€?NAME 属æ?を使用ã™ã‚‹ã‚ˆã†ã« 1081 * ã—ã¦ãã ã•ã„ã€? 1082 * ãªãŠã?EXCEL 入力ã«ã¯ã€ã“ã®è¨å®šã?é©ç”¨ã•れã¾ã›ã‚“ã€?暫定対å¿? 1083 * åˆæœŸå€¤ã¯ã€true(使用ã™ã‚‹) ã§ã™ã? 1084 * 1085 * @og.rev 3.7.0.5 (2005/04/11) æ–°è¦è¿½åŠ? 1086 * 1087 * @param useNo è¡Œç•ªå·æƒ?? [true:使用ã™ã‚‹/false:使用ã—ãªã„] 1088 */ 1089 public void setUseNumber( final String useNo ) { 1090 useNumber = nval( getRequestParameter( useNo ),useNumber ); 1091 } 1092 1093 /** 1094 * ã€TAG】èªè¾¼ä»¶æ•°ãŒï¼ä»¶ã®ã¨ãå?ç?‚’続行ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false[続行ã™ã‚‹])ã€? 1095 * 1096 * @og.tag 1097 * åˆæœŸå€¤ã¯ã€false(続行ã™ã‚?ã§ã™ã? 1098 * 1099 * @og.rev 4.3.7.0 (2009/06/01) æ–°è¦è¿½åŠ? 1100 * 1101 * @param cmd èªè¾¼ä»¶æ•°ãŒï¼ä»¶ã®ã¨ãã?処ç?‚’ [true:䏿¢ã™ã‚‹/false:続行ã™ã‚‹] 1102 */ 1103 public void setStopZero( final String cmd ) { 1104 stopZero = nval( getRequestParameter( cmd ), stopZero ); 1105 } 1106 1107 /** 1108 * ã€TAGã€?通常使ã?¾ã›ã‚“)ã‚¿ã‚°ã§å‡¦ç?•れる処ç?Œãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç?‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:false)ã€? 1109 * 1110 * @og.tag 1111 * ã“ã?値ã¯ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰å?ç?«å½±éŸ¿ã—ã¾ã™ã?ã“ã?値ãŒtrueã«æŒ?®šã•ã‚ŒãŸæ™‚ã«commitã•れãŸDBTableModelã? 1112 * ファイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰ã?対象ã®è¡¨ã«ãªã‚Šã¾ã™ã? 1113 * 1114 * ã“ã?パラメーターã¯ã€??常ã€å„ã‚¿ã‚°ã«ã‚ˆã‚Šå®Ÿè£?•れã?ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæŒ‡å®šã™ã‚‹å¿?¦ã?ã‚りã¾ã›ã‚“ã€? 1115 * ä½?—ã€?ã¤ã®JSPå†?§DBTableModelãŒè¤?•°ç”Ÿæ?ã•れるå?åˆã«ã€å‰ã«å‡¦ç?—ãŸDBTableModelã«ã¤ã?¦ãƒ•ァイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰ã‚’ã•ã›ãŸã„ 1116 * å ´åˆã?ã€å¾Œã‚ã§DBTableModelを生æˆã™ã‚‹ã‚¿ã‚°ã§ã€æ?示çš?«ã“ã?値をfalseã«æŒ?®šã™ã‚‹ã“ã¨ã§ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰å?ç??対象ã‹ã‚‰ 1117 * 除外ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã? 1118 * 1119 * @og.rev 5.1.6.0 (2010/05/01) æ–°è¦ä½œæ? 1120 * 1121 * @param flag メイントランザクションã‹ã©ã?‹ 1122 */ 1123 public void setMainTrans( final String flag ) { 1124 isMainTrans = nval( getRequestParameter( flag ),isMainTrans ); 1125 } 1126 1127 /** 1128 * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)ãƒ??ã‚¿ã®èªã¿é£›ã?ã—ä»¶æ•°ã‚’è¨å®šã—ã¾ã™ã? 1129 * 1130 * @og.tag 1131 * TAB区åˆ?‚Šãƒ?‚ストやEXCELç‰ã?ãƒ??ã‚¿ã®èªã¿å§‹ã‚ã®åˆæœŸå€¤ã‚’指定ã—ã¾ã™ã? 1132 * ファイルã®å…ˆé?行ãŒã€?¼è¡Œã¨ã—ã¦ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã?ã§ã€è¨å®šå?ã¯ã€èªã¿é£›ã?ã? 1133 * ä»¶æ•°ã«ãªã‚Šã¾ã™ã?(?‘ã¨æŒ?®šã™ã‚‹ã¨ã€?¼‘ä»¶èªã¿é£›ã?ã—ã??’行目ã‹ã‚‰èªã¿è¾¼ã¿ã¾ã™ã?) 1134 * èªã¿é£›ã?ã—ã?ã€ã‚³ãƒ¡ãƒ³ãƒˆè¡Œãªã©ã¯ã€ç„¡è¦–ã—ã¾ã™ã?ã§ã€å®Ÿéš›ã®è¡Œæ•°åˆ?ªã¿é£›ã?ã—ã¾ã™ã? 1135 * ?ƒNAME属æ?ã‚??columns 属æ?ã¯ã€æœ‰åйã§ã™ã? 1136 * 1137 * @og.rev 5.1.6.0 (2010/05/01) æ–°è¦ä½œæ? 1138 * 1139 * @param count èªã¿å§‹ã‚ã®åˆæœŸå€¤ 1140 */ 1141 public void setSkipRowCount( final String count ) { 1142 skipRowCount = nval( getRequestParameter( count ),skipRowCount ); 1143 } 1144 1145 /** 1146 * ã€TAG】èªå–å?ç?§ãƒ©ãƒ™ãƒ«ã‚’コードリソースã«é€?¤‰æ›ã‚’行ã†ã‹ã©ã?‹ã‚’指定ã—ã¾ã? 1147 * (åˆæœŸå€¤:USE_TABLE_READER_RENDERER[={@og.value org.opengion.hayabusa.common.SystemData#USE_TABLE_READER_RENDERER}])ã€? 1148 * 1149 * @og.tag 1150 * TableWriter_Renderer ç³»ã®ã‚¯ãƒ©ã‚¹ã§å‡ºåŠ›ã—ãŸå?åˆã?ã€ã‚³ãƒ¼ãƒ‰ãƒªã‚½ãƒ¼ã‚¹ãŒãƒ©ãƒ™ãƒ«ã§å‡ºåŠ›ã•れã¾ã™ã? 1151 * ãã?ファイルをèªã¿å–ã‚‹ã¨ã€å½“ç„¶ã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ã? 1152 * ã“ã“ã§ã¯ã€ã‚³ãƒ¼ãƒ‰ãƒªã‚½ãƒ¼ã‚¹ã®ã‚«ãƒ©ãƒ?«å¯¾ã—ã¦ã€ãƒ©ãƒ™ãƒ«ã‹ã‚‰ã‚³ãƒ¼ãƒ‰ã‚’求ã‚ã‚‹é?変æ›ã‚’行ã†ã“ã¨ã§ã€? 1153 * Renderer ç³»ã§å‡ºåŠ›ã—ãŸãƒ•ァイルをå–り込ã‚?“ã¨ãŒã§ãるよã†ã«ã—ã¾ã™ã? 1154 * 1155 * ã“ã“ã§ã¯ã€TableWriter ç³»ã¨åŒæ§˜ã«ã€TableReader_Renderer ç³»ã®ã‚¯ãƒ©ã‚¹ã‚’作るã®ã§ã¯ãªãã? 1156 * 属æ?値ã®ãƒ•ラグã§ã€åˆ¶å¾¡ã—ã¾ã™ã? 1157 * å°?¥çš?«ã¯ã€TableWriter 系もå»?¢ã—ã¦ã€åŒæ§˜ã?フラグã§åˆ¶å¾¡ã™ã‚‹ã‚ˆã†ã«å¤‰æ›´ã™ã‚‹äºˆå®šã§ã™ã? 1158 * (åˆæœŸå€¤:シスãƒ?ƒ 定数ã®USE_TABLE_READER_RENDERER[={@og.value org.opengion.hayabusa.common.SystemData#USE_TABLE_READER_RENDERER}])ã€? 1159 * 1160 * @og.rev 5.2.1.0 (2010/10/01) æ–°è¦ä½œæ? 1161 * 1162 * @param flag コードリソースã®ãƒ©ãƒ™ãƒ«é€?¤‰æ›ã‚’行ã†ã‹ã©ã?‹ 1163 * @see org.opengion.hayabusa.common.SystemData#USE_TABLE_READER_RENDERER 1164 */ 1165 public void setUseRenderer( final String flag ) { 1166 useRenderer = nval( getRequestParameter( flag ),useRenderer ); 1167 } 1168 1169 /** 1170 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºæ›¸ãè¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰ 1171 * 1172 * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ? 1173 * @serialData 1174 * 1175 * @param strm ObjectOutputStreamオブジェクãƒ? 1176 */ 1177 private void writeObject( final ObjectOutputStream strm ) throws IOException { 1178 strm.defaultWriteObject(); 1179 } 1180 1181 /** 1182 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºèªã¿è¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰ 1183 * 1184 * ã“ã“ã§ã¯ã€transient 宣è¨?•れãŸå†?ƒ¨å¤‰æ•°ã®å†??åˆæœŸåŒ–ãŒå¿?¦ãªãƒ•ィールドã?ã¿è¨å®šã—ã¾ã™ã? 1185 * 1186 * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ? 1187 * @serialData 1188 * 1189 * @param strm ObjectInputStreamオブジェクãƒ? 1190 * @see #release2() 1191 */ 1192 private void readObject( final ObjectInputStream strm ) throws IOException , ClassNotFoundException { 1193 strm.defaultReadObject(); 1194 } 1195 1196 /** 1197 * ã“ã?オブジェクトã?æ–?—å?表ç¾ã‚’è¿”ã—ã¾ã™ã? 1198 * 基本çš?«ãƒ?ƒãƒ?‚°ç›®çš?«ä½¿ç”¨ã—ã¾ã™ã? 1199 * 1200 * @return ã“ã?ã‚¯ãƒ©ã‚¹ã®æ–?—å?è¡¨ç¾ 1201 */ 1202 @Override 1203 public String toString() { 1204 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() ) 1205 .println( "VERSION" ,VERSION ) 1206 .println( "separator" ,separator ) 1207 .println( "fileURL" ,fileURL ) 1208 .println( "filename" ,filename ) 1209 .println( "encode" ,encode ) 1210 .println( "readerClass" ,readerClass ) 1211 .println( "maxRowCount" ,maxRowCount ) 1212 .println( "displayMsg" ,displayMsg ) 1213 .println( "executeCount" ,executeCount ) 1214 .println( "modifyType" ,modifyType ) 1215 .println( "checkColumns" ,checkColumns ) 1216 .println( "adjustColumns" ,adjustColumns ) 1217 .println( "nullCheck" ,nullCheck ) 1218 // .println( "allColumnCheck" ,allColumnCheck ) 1219 .println( "command" ,command ) 1220 .println( "tableId" ,tableId ) 1221 .println( "sheetName" ,sheetName ) 1222 .println( "sheetNos" ,sheetNos ) // 5.5.7.2 (2012/10/09) 1223 .println( "columns" ,columns ) 1224 .println( "useNumber" ,useNumber ) 1225 .println( "Other..." ,getAttributes().getAttribute() ) 1226 .fixForm().toString() ; 1227 } 1228 }