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="../../../../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 * åˆæœŸå€¤ã¯ã€æŒ‡å®šãªã—ã§ã™ã?
866 *
867 * @og.rev 3.5.4.2 (2003/12/15) æ–°è¦è¿½åŠ?
868 *
869 * @param sheet EXCELファイルã®ã‚·ãƒ¼ãƒˆå
870 * @see #setSheetNos( String )
871 */
872 public void setSheetName( final String sheet ) {
873 sheetName = nval( getRequestParameter( sheet ),sheetName );
874 }
875
876 /**
877 * ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シート番å·ã‚’指定ã—ã¾ã?åˆæœŸå€¤:0)ã€?
878 *
879 * @og.tag
880 * EXCELèªã¿è¾¼ã¿æ™‚ã«è¤?•°ã‚·ãƒ¼ãƒˆã‚’マã?ジã—ã¦å–り込ã¿ã¾ã™ã?
881 * シート番å·ã¯ã€? ã‹ã‚‰å§‹ã¾ã‚‹æ•°å—ã§è¡¨ã—ã¾ã™ã?
882 * ヘッãƒ??ã¯ã€æœ€åˆã?シートã?カラãƒ?½ç½®ã«åˆã‚ã›ã¾ã™ã??ˆã?ãƒ?ƒ€ãƒ¼ã‚¿ã‚¤ãƒˆãƒ«ã®è‡ªå‹•èªè˜ã?ã‚りã¾ã›ã‚“。ï¼?
883 * よã£ã¦ã€æŒ‡å®šã™ã‚‹ã‚·ãƒ¼ãƒˆã?ã€ã™ã¹ã¦åŒä¸?ƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã§ãªã?¨å–ã‚Šè¾¼ã¿æ™‚ã«ã‚«ãƒ©ãƒ??ãšã‚ŒãŒç™ºç”Ÿã—ã¾ã™ã?
884 *
885 * シート番å·ã®æŒ?®šã?ã€ã‚«ãƒ³ãƒžåŒºåˆ?‚Šã§ã€è¤?•°æŒ?®šã§ãã¾ã™ã?ã¾ãŸã?N-M ã®æ§˜ã«ãƒã‚¤ãƒ•ンã§ç¹‹ã’ã‚‹ã“ã¨ã§ã€?
886 * N 番ã‹ã‚‰ã€M 番ã®ã‚·ãƒ¼ãƒˆç¯?›²ã‚’ä¸?‹¬æŒ?®šå¯èƒ½ã§ã™ã?ã¾ãŸã?"*" ã«ã‚ˆã‚‹ã€å?シート指定ãŒå¯èƒ½ã§ã™ã?
887 * ã“れらã?çµ?¿åˆã‚ã›ã‚‚å¯èƒ½ã§ã™ã???0,1,3,5-8,10-* ??
888 * ãŸã ã—ã?"*" ã«é–¢ã—ã¦ã¯ä¾‹å¤–çš„ã«ã€ä¸?–‡å—ã ã‘ã§ã€ã™ã¹ã¦ã®ã‚·ãƒ¼ãƒˆã‚’表ã™ã‹ã€N-* ã‚’æœ€å¾Œã«æŒ?®šã™ã‚‹ã‹ã®
889 * ã©ã¡ã‚‰ã‹ã§ã™ã?途ä¸ã«ã¯ã€?*" ã¯ã€ç¾ã‚Œã¾ã›ã‚“ã€?
890 * シート番å·ã¯ã€?‡è¤?1,1,2,2)ã€??転(3,2,1) ã§ã®æŒ?®šãŒå¯èƒ½ã§ã™ã?ã“れã¯ã€ãã®æŒ?®šé?ã§ã€èªã¿è¾¼ã¾ã‚Œã¾ã™ã?
891 * sheetNos 㨠sheetName ãŒåŒæ™‚ã«æŒ?®šã•れãŸå ´åˆã?ã€sheetNos ãŒå„ªå…ˆã•れã¾ã™ã?エラーã«ã¯ãªã‚‰ãªã??ã§ã”注æ„ãã?•ã??
892 *
893 * åˆæœŸå€¤ã¯ã€??ˆç¬¬ä¸?‚·ãƒ¼ãƒˆï¼?ã§ã™ã?
894 *
895 * @og.rev 5.5.7.2 (2012/10/09) æ–°è¦è¿½åŠ?
896 *
897 * @param sheet EXCELファイルã®ã‚·ãƒ¼ãƒˆç•ªå·??ã‹ã‚‰å§‹ã¾ã‚‹ï¼?
898 * @see #setSheetName( String )
899 */
900 public void setSheetNos( final String sheet ) {
901 sheetNos = nval( getRequestParameter( sheet ),sheetNos );
902 if( sheetNos != null && sheetNos.length() > 0 ) {
903 boolean errFlag = false;
904 for( int i=0; i<sheetNos.length(); i++ ) {
905 char ch = sheetNos.charAt(i);
906 if( ch == '-' || ch == ',' ) { continue; }
907 if( ch == '*' && ( i==0 || i==sheetNos.length()-1 ) ) { continue; }
908 if( ch < '0' || ch > '9' ) { errFlag = true; break; }
909 }
910 if( errFlag ) {
911 String errMsg = "sheetNos ã®æŒ?®šã‚’見直ã—ã¦ãã ã•ã„。sheetNos=[" + sheetNos + "]";
912 throw new HybsSystemException( errMsg );
913 }
914 }
915 }
916
917 /**
918 * ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シートå˜ä½ã?固定å?ã‚’è¨å®šã™ã‚‹ãŸã‚ã?カラãƒ?を指定ã—ã¾ã™ã?
919 *
920 * @og.tag
921 * カラãƒ?ã¯ã€ã‚«ãƒ³ãƒžåŒºåˆ?‚Šã§æŒ?®šã—ã¾ã™ã?
922 * ã“れã«ã‚ˆã‚Šã€ã‚·ãƒ¼ãƒˆã?ä¸?‹æ‰?«æ›¸ã‹ã‚Œã¦ã?‚‹æƒ??ã‚’ã?DBTableModel ã®ã‚«ãƒ©ãƒ?«å›ºå®šå?ã¨ã—ã¦
923 * è¨å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã?
924 * 例ã¨ã—ã¦ã€DB定義書ã§ã€ãƒ†ãƒ¼ãƒ–ルåをシートã?全レコードã«è¨å®šã—ãŸã„å ´åˆãªã©ã«ä½¿ã?¾ã™ã?
925 * ã“ã?メソãƒ?ƒ‰ã¯ã€isExcel() == true ã®å ´åˆã?ã¿åˆ©ç”¨ã•れã¾ã™ã?
926 *
927 * @og.rev 5.5.8.2 (2012/11/09) æ–°è¦è¿½åŠ?
928 *
929 * @param constKeys 固定å?ã¨ãªã‚‹ã‚«ãƒ©ãƒ?(CSVå½¢å¼?
930 * @see #setSheetConstAdrs( String )
931 */
932 public void setSheetConstKeys( final String constKeys ) {
933 sheetConstKeys = nval( getRequestParameter( constKeys ),null );
934 }
935
936 /**
937 * ã€TAG】EXCELファイルをèªã¿è¾¼ã‚?¨ãã?シートå˜ä½ã?固定å?ã‚’è¨å®šã™ã‚‹ãŸã‚ã?カラãƒ?ã«å¯¾å¿œã™ã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã—ã¾ã™ã?
938 *
939 * @og.tag
940 * アドレスã¯ã€EXCEL上ã?è¡?列をカンマ区åˆ?‚Šã§æŒ?®šã—ã¾ã™ã?
941 * 行å?ã¯ã€EXCELã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æº–æ‹ ã™ã‚‹ãŸã‚ã€?¼ã‹ã‚‰å§‹ã¾ã‚‹æ•´æ•°ã§ã™ã?
942 * ã“れã«ã‚ˆã‚Šã€ã‚·ãƒ¼ãƒˆã?ä¸?‹æ‰?«æ›¸ã‹ã‚Œã¦ã?‚‹æƒ??ã‚’ã?DBTableModel ã®ã‚«ãƒ©ãƒ?«å›ºå®šå?ã¨ã—ã¦
943 * è¨å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã?
944 * 例ã¨ã—ã¦ã€DB定義書ã§ã€ãƒ†ãƒ¼ãƒ–ルåをシートã?全レコードã«è¨å®šã—ãŸã„å ´åˆãªã©ã«ä½¿ã?¾ã™ã?
945 * ã“ã?メソãƒ?ƒ‰ã¯ã€isExcel() == true ã®å ´åˆã?ã¿åˆ©ç”¨ã•れã¾ã™ã?
946 *
947 * @og.rev 5.5.8.2 (2012/11/09) æ–°è¦è¿½åŠ?
948 *
949 * @param constAdrs 固定å?ã¨ãªã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹(è¡?åˆ?è¡?åˆ?・・・)
950 * @see #setSheetConstKeys( String )
951 */
952 public void setSheetConstAdrs( final String constAdrs ) {
953 sheetConstAdrs = nval( getRequestParameter( constAdrs ),null );
954 }
955
956 /**
957 * ã€TAG】ã“ã“ã«æŒ?®šã•れãŸã‚«ãƒ©ãƒ??ã« NULL ãŒç¾ã‚ŒãŸæ™‚点ã§èªã¿å–ã‚Šã‚’ä¸æ¢ã—ã¾ã™ã?
958 *
959 * @og.tag
960 * ã“れã¯ã€æŒ‡å®šã?カラãƒ??å¿??ã¨ã?†äº‹ã‚’æ¡ä»¶ã«ã€ãã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã ã‘ã‚’èªã¿å–る処ç?‚’行ã„ã¾ã™ã?
961 * è¤?•°Sheetã®å ´åˆã?ã€æ¬¡ã®Sheetã‚’èªã¿ã¾ã™ã?
962 * ç¾æ™‚点ã§ã¯ã€Excel ã®å ´åˆã?ã¿æœ‰åйã§ã™ã?
963 *
964 * @og.rev 5.5.8.2 (2012/11/09) æ–°è¦è¿½åŠ?
965 *
966 * @param clm カラ�?
967 */
968 public void setNullBreakClm( final String clm ) {
969 nullBreakClm = nval( getRequestParameter( clm ),null );
970 }
971
972 /**
973 * ã€TAG】èªã¿å–りå…?ƒ•ァイルã®ã‚«ãƒ©ãƒ??ã‚’ã?外部(ã‚¿ã‚°)よりæŒ?®šã—ã¾ã™ã?
974 *
975 * @og.tag
976 * èªã¿å–りå…?ƒ•ァイルã®ã‚«ãƒ©ãƒ??ã‚’ã?外部(ã‚¿ã‚°)よりæŒ?®šã—ã¾ã™ã?
977 * ファイルã«è¨˜è¿°ã•れã?#NAME より優先ã—ã¦ä½¿ç”¨ã•れã¾ã™ã?
978 * ã“れã¯ã€å?ファイルã®ã‚«ãƒ©ãƒ?‚’é ?•ªã«æŒ?®šã?カラãƒ?ã«å‰²ã‚Šå½“ã¦ã‚‹æ©Ÿè?ã§
979 * ファイルã®ç‰¹å®šã?カラãƒ??を抜ãå?ã—ã¦å–り込ã‚?©Ÿè?ã§ã¯ã‚りã¾ã›ã‚“ã€?
980 *
981 * @og.rev 3.5.4.5 (2004/01/23) æ–°è¦ä½œæ?
982 *
983 * @param clms èªã¿å–りå…?ƒ•ァイルã®ã‚«ãƒ©ãƒ??(カンマ区åˆ?‚Šæ–??
984 */
985 public void setColumns( final String clms ) {
986 columns = nval( getRequestParameter( clms ),columns );
987 }
988
989 /**
990 * ã€TAG】èªã¿å–りå…?ƒ•ã‚¡ã‚¤ãƒ«ã®æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã†ã‚«ãƒ©ãƒ??をカンマ指定ã—ã¾ã™ã?
991 *
992 * @og.tag
993 * カラãƒ?‚ªãƒ–ジェクトã?DBType属æ?ã«å¯¾å¿œã—ãŸãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
994 * æŒ?®šã?カラãƒ?をカンマ区åˆ?‚Š(CSV)ã§è¤?•°æŒ?®šã§ãã¾ã™ã?
995 * å…¨ã¦ã®ã‚«ãƒ©ãƒ??ãƒã‚§ãƒ?‚¯ã‚’行ã†å ´åˆã?ã€allColumnCheck = "true" ã‚?
996 * æŒ?®šã—ã¦ä¸‹ã•ã??
997 * åˆ?§£æ–¹æ³•ã?ã€??常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã—ã¾ã™ã?
998 *
999 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦è¿½åŠ?å–ã‚Šè¾¼ã¿æ™‚ãƒã‚§ãƒ?‚¯ç”¨
1000 * @og.rev 3.8.8.5 (2007/03/09) 通常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã«æˆ»ã—ã¾ã™ã?
1001 *
1002 * @param clms æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã†ã‚«ãƒ©ãƒ??(カンマ区åˆ?‚Šæ–??
1003 */
1004 public void setCheckColumns( final String clms ) {
1005 checkColumns = nval( getRequestParameter( clms ),checkColumns );
1006
1007 // checkColumns = StringUtil.csv2Array( getRequestParameter( clms ) );
1008 // if( checkColumns.length == 0 ) { checkColumns = null; }
1009 }
1010
1011 /**
1012 * ã€TAG】èªã¿å–りå…?ƒ•ァイルã®ãƒ??タ変æ›ã‚’行ã†ã‚«ãƒ©ãƒ??をカンマ指定ã—ã¾ã™ã?
1013 *
1014 * @og.tag
1015 * カラãƒ?‚ªãƒ–ジェクトã?DBType属æ?ã«å¯¾å¿œã—ãŸãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’行ã„ã¾ã™ã?
1016 * æŒ?®šã?カラãƒ?をカンマ区åˆ?‚Š(CSV)ã§è¤?•°æŒ?®šã§ãã¾ã™ã?
1017 * åˆ?§£æ–¹æ³•ã?ã€??常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã—ã¾ã™ã?
1018 *
1019 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦è¿½åŠ?å–ã‚Šè¾¼ã¿æ™‚データ変æ›
1020 * @og.rev 3.8.8.5 (2007/03/09) 通常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã«æˆ»ã—ã¾ã™ã?
1021 *
1022 * @param clms ãƒ??タ変æ›ã‚’行ã†ã‚«ãƒ©ãƒ??(カンマ区åˆ?‚Šæ–??
1023 */
1024 public void setAdjustColumns( final String clms ) {
1025 adjustColumns = nval( getRequestParameter( clms ),adjustColumns );
1026
1027 // adjustColumns = StringUtil.csv2Array( getRequestParameter( clms ) );
1028 // if( adjustColumns.length == 0 ) { adjustColumns = null; }
1029 }
1030
1031 /**
1032 * ã€TAG】å?カラãƒ?ƒã‚§ãƒ?‚¯ã‚’行ã†ã‹ã©ã?‹ã‚’è¨å®šã—ã¾ã?åˆæœŸå€¤:false)ã€?
1033 *
1034 * @og.tag
1035 * カラãƒ??æ•´åˆæ?ãƒã‚§ãƒ?‚¯ã‚’行ã†å ´åˆã?カラãƒ?を指定ã›ãšã?全カラãƒ??
1036 * ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã“ã¨ãŒå?æ¥ã¾ã™ã?(allColumnCheck="true")
1037 * åˆæœŸå€¤ã¯ã€è¡Œã‚ãªã?false)ã§ã™ã?
1038 * 全カラãƒ?ƒã‚§ãƒ?‚¯ã‚’行ã†å ´åˆã?ã€checkColumns ã®æŒ?®šã?ã€ç„¡è¦–ã•れã¾ã™ã?
1039 *
1040 * @og.rev 3.6.0.2 (2004/10/04) æ–°è¦è¿½åŠ?å–ã‚Šè¾¼ã¿æ™‚å?ãƒã‚§ãƒ?‚¯
1041 *
1042 * @param flag å…¨ãƒã‚§ãƒ?‚¯ã‚’行ã†ã‹ã©ã?‹(true:行ã†/false:行ã‚ãªã?
1043 * @see #setCheckColumns( String )
1044 */
1045 // public void setAllColumnCheck( final String flag ) {
1046 // allColumnCheck = nval( getRequestParameter( flag ),allColumnCheck );
1047 // }
1048
1049 /**
1050 * ã€TAG】NULL ãƒã‚§ãƒ?‚¯ã™ã¹ãカラãƒ??をカンマ区åˆ?‚Š(CVSå½¢å¼?ã§æŒ?®šã—ã¾ã™ã?
1051 *
1052 * @og.tag nullCheck="AAA,BBB,CCC,DDD"
1053 * åˆ?§£æ–¹æ³•ã?ã€??常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã—ã¾ã™ã?
1054 *
1055 * @og.rev 3.8.0.2 (2005/06/30) æ–°è¦è¿½åŠ?
1056 * @og.rev 3.8.8.5 (2007/03/09) 通常ã®ãƒ‘ラメータå–得後ã«ã€CSVåˆ?§£ã«æˆ»ã—ã¾ã™ã?
1057 *
1058 * @param clms カラ�?(CVS形�
1059 */
1060 public void setNullCheck( final String clms ) {
1061 nullCheck = nval( getRequestParameter( clms ),nullCheck );
1062
1063 // nullCheck = StringUtil.csv2Array( getRequestParameter( clms ) );
1064 // if( nullCheck.length == 0 ) { nullCheck = null; }
1065 }
1066
1067 /**
1068 * ã€TAGã€‘è¡Œç•ªå·æƒ??ã‚’ã?使用ã—ã¦ã?‚‹/ã—ã¦ã?ªã„[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:true)ã€?
1069 *
1070 * @og.tag
1071 * 通常ã®ãƒ•ォーマットã§ã¯ã€å„行ã?å…ˆé?ã«è¡Œç•ªå·ãŒå?力ã•れã¦ã?¾ã™ã?
1072 * èªã¿å–り時ã«ã€?NAME 属æ?を使用ã™ã‚‹å ´åˆã?ã€ã“ã®è¡Œç•ªå·ã‚’無視ã—ã¦ã?¾ã™ã?
1073 * #NAME 属æ?を使用ã›ãšã€columns 属æ?ã§ã‚«ãƒ©ãƒ?を指定ã™ã‚‹å?å?他シスãƒ?ƒ ã®
1074 * 出力ファイルをèªã¿å–るケースç?ã§ã¯ã€è¡Œç•ªå·ã‚‚å˜åœ¨ã—ãªã?‚±ãƒ¼ã‚¹ãŒã‚りã?
1075 * ãã?様ãªå ´åˆã«ã€useNumber="false" を指定ã™ã‚Œã?ã€ãƒ‡ãƒ¼ã‚¿ã®æœ??ã‹ã‚‰èªã¿å–り始ã‚ã¾ã™ã?
1076 * ã“ã?å ´åˆã?出力データã®ã‚«ãƒ©ãƒ??並ã³é ?Œå¤‰æ›´ã•れãŸå?åˆã?columns 属æ?ã‚?
1077 * æŒ?®šã—ãªãŠã™å¿?¦ãŒã‚りã¾ã™ã?ã§ã€ã§ãã‚‹ã?‘ã€?NAME 属æ?を使用ã™ã‚‹ã‚ˆã†ã«
1078 * ã—ã¦ãã ã•ã„ã€?
1079 * ãªãŠã?EXCEL 入力ã«ã¯ã€ã“ã®è¨å®šã?é©ç”¨ã•れã¾ã›ã‚“ã€?暫定対å¿?
1080 * åˆæœŸå€¤ã¯ã€true(使用ã™ã‚‹) ã§ã™ã?
1081 *
1082 * @og.rev 3.7.0.5 (2005/04/11) æ–°è¦è¿½åŠ?
1083 *
1084 * @param useNo è¡Œç•ªå·æƒ?? [true:使用ã™ã‚‹/false:使用ã—ãªã„]
1085 */
1086 public void setUseNumber( final String useNo ) {
1087 useNumber = nval( getRequestParameter( useNo ),useNumber );
1088 }
1089
1090 /**
1091 * ã€TAG】èªè¾¼ä»¶æ•°ãŒï¼ä»¶ã®ã¨ãå?ç?‚’続行ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false[続行ã™ã‚‹])ã€?
1092 *
1093 * @og.tag
1094 * åˆæœŸå€¤ã¯ã€false(続行ã™ã‚?ã§ã™ã?
1095 *
1096 * @og.rev 4.3.7.0 (2009/06/01) æ–°è¦è¿½åŠ?
1097 *
1098 * @param cmd èªè¾¼ä»¶æ•°ãŒï¼ä»¶ã®ã¨ãã?処ç?‚’ [true:䏿¢ã™ã‚‹/false:続行ã™ã‚‹]
1099 */
1100 public void setStopZero( final String cmd ) {
1101 stopZero = nval( getRequestParameter( cmd ), stopZero );
1102 }
1103
1104 /**
1105 * ã€TAGã€?通常使ã?¾ã›ã‚“)ã‚¿ã‚°ã§å‡¦ç?•れる処ç?Œãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç?‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:false)ã€?
1106 *
1107 * @og.tag
1108 * ã“ã?値ã¯ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰å?ç?«å½±éŸ¿ã—ã¾ã™ã?ã“ã?値ãŒtrueã«æŒ?®šã•ã‚ŒãŸæ™‚ã«commitã•れãŸDBTableModelã?
1109 * ファイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰ã?対象ã®è¡¨ã«ãªã‚Šã¾ã™ã?
1110 *
1111 * ã“ã?パラメーターã¯ã€??常ã€å„ã‚¿ã‚°ã«ã‚ˆã‚Šå®Ÿè£?•れã?ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæŒ‡å®šã™ã‚‹å¿?¦ã?ã‚りã¾ã›ã‚“ã€?
1112 * ä½?—ã€?ã¤ã®JSPå†?§DBTableModelãŒè¤?•°ç”Ÿæ?ã•れるå?åˆã«ã€å‰ã«å‡¦ç?—ãŸDBTableModelã«ã¤ã?¦ãƒ•ァイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰ã‚’ã•ã›ãŸã„
1113 * å ´åˆã?ã€å¾Œã‚ã§DBTableModelを生æˆã™ã‚‹ã‚¿ã‚°ã§ã€æ?示çš?«ã“ã?値をfalseã«æŒ?®šã™ã‚‹ã“ã¨ã§ã€ãƒ•ァイルãƒ?‚¦ãƒ³ãƒãƒ¼ãƒ‰å?ç??対象ã‹ã‚‰
1114 * 除外ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã?
1115 *
1116 * @og.rev 5.1.6.0 (2010/05/01) æ–°è¦ä½œæ?
1117 *
1118 * @param flag メイントランザクションã‹ã©ã?‹
1119 */
1120 public void setMainTrans( final String flag ) {
1121 isMainTrans = nval( getRequestParameter( flag ),isMainTrans );
1122 }
1123
1124 /**
1125 * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)ãƒ??ã‚¿ã®èªã¿é£›ã?ã—ä»¶æ•°ã‚’è¨å®šã—ã¾ã™ã?
1126 *
1127 * @og.tag
1128 * TAB区åˆ?‚Šãƒ?‚ストやEXCELç‰ã?ãƒ??ã‚¿ã®èªã¿å§‹ã‚ã®åˆæœŸå€¤ã‚’指定ã—ã¾ã™ã?
1129 * ファイルã®å…ˆé?行ãŒã€?¼è¡Œã¨ã—ã¦ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã?ã§ã€è¨å®šå?ã¯ã€èªã¿é£›ã?ã?
1130 * ä»¶æ•°ã«ãªã‚Šã¾ã™ã?(?‘ã¨æŒ?®šã™ã‚‹ã¨ã€?¼‘ä»¶èªã¿é£›ã?ã—ã??’行目ã‹ã‚‰èªã¿è¾¼ã¿ã¾ã™ã?)
1131 * èªã¿é£›ã?ã—ã?ã€ã‚³ãƒ¡ãƒ³ãƒˆè¡Œãªã©ã¯ã€ç„¡è¦–ã—ã¾ã™ã?ã§ã€å®Ÿéš›ã®è¡Œæ•°åˆ?ªã¿é£›ã?ã—ã¾ã™ã?
1132 * ?ƒNAME属æ?ã‚??columns 属æ?ã¯ã€æœ‰åйã§ã™ã?
1133 *
1134 * @og.rev 5.1.6.0 (2010/05/01) æ–°è¦ä½œæ?
1135 *
1136 * @param count èªã¿å§‹ã‚ã®åˆæœŸå€¤
1137 */
1138 public void setSkipRowCount( final String count ) {
1139 skipRowCount = nval( getRequestParameter( count ),skipRowCount );
1140 }
1141
1142 /**
1143 * ã€TAG】èªå–å?ç?§ãƒ©ãƒ™ãƒ«ã‚’コードリソースã«é€?¤‰æ›ã‚’行ã†ã‹ã©ã?‹ã‚’指定ã—ã¾ã?
1144 * (åˆæœŸå€¤:USE_TABLE_READER_RENDERER[={@og.value org.opengion.hayabusa.common.SystemData#USE_TABLE_READER_RENDERER}])ã€?
1145 *
1146 * @og.tag
1147 * TableWriter_Renderer ç³»ã®ã‚¯ãƒ©ã‚¹ã§å‡ºåŠ›ã—ãŸå?åˆã?ã€ã‚³ãƒ¼ãƒ‰ãƒªã‚½ãƒ¼ã‚¹ãŒãƒ©ãƒ™ãƒ«ã§å‡ºåŠ›ã•れã¾ã™ã?
1148 * ãã?ファイルをèªã¿å–ã‚‹ã¨ã€å½“ç„¶ã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ã?
1149 * ã“ã“ã§ã¯ã€ã‚³ãƒ¼ãƒ‰ãƒªã‚½ãƒ¼ã‚¹ã®ã‚«ãƒ©ãƒ?«å¯¾ã—ã¦ã€ãƒ©ãƒ™ãƒ«ã‹ã‚‰ã‚³ãƒ¼ãƒ‰ã‚’求ã‚ã‚‹é?変æ›ã‚’行ã†ã“ã¨ã§ã€?
1150 * Renderer ç³»ã§å‡ºåŠ›ã—ãŸãƒ•ァイルをå–り込ã‚?“ã¨ãŒã§ãるよã†ã«ã—ã¾ã™ã?
1151 *
1152 * ã“ã“ã§ã¯ã€TableWriter ç³»ã¨åŒæ§˜ã«ã€TableReader_Renderer ç³»ã®ã‚¯ãƒ©ã‚¹ã‚’作るã®ã§ã¯ãªãã?
1153 * 属æ?値ã®ãƒ•ラグã§ã€åˆ¶å¾¡ã—ã¾ã™ã?
1154 * å°?¥çš?«ã¯ã€TableWriter 系もå»?¢ã—ã¦ã€åŒæ§˜ã?フラグã§åˆ¶å¾¡ã™ã‚‹ã‚ˆã†ã«å¤‰æ›´ã™ã‚‹äºˆå®šã§ã™ã?
1155 * (åˆæœŸå€¤:シスãƒ?ƒ 定数ã®USE_TABLE_READER_RENDERER[={@og.value org.opengion.hayabusa.common.SystemData#USE_TABLE_READER_RENDERER}])ã€?
1156 *
1157 * @og.rev 5.2.1.0 (2010/10/01) æ–°è¦ä½œæ?
1158 *
1159 * @param flag コードリソースã®ãƒ©ãƒ™ãƒ«é€?¤‰æ›ã‚’行ã†ã‹ã©ã?‹
1160 * @see org.opengion.hayabusa.common.SystemData#USE_TABLE_READER_RENDERER
1161 */
1162 public void setUseRenderer( final String flag ) {
1163 useRenderer = nval( getRequestParameter( flag ),useRenderer );
1164 }
1165
1166 /**
1167 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºæ›¸ãè¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
1168 *
1169 * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ?
1170 * @serialData ä¸?ƒ¨ã®ã‚ªãƒ–ジェクトã?ã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れã¾ã›ã‚“ã€?
1171 *
1172 * @param strm ObjectOutputStreamオブジェク�
1173 * @throws IOException 入出力エラーãŒç™ºç”Ÿã—ãŸå?å?
1174 */
1175 private void writeObject( final ObjectOutputStream strm ) throws IOException {
1176 strm.defaultWriteObject();
1177 }
1178
1179 /**
1180 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºèªã¿è¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
1181 *
1182 * ã“ã“ã§ã¯ã€transient 宣è¨?•れãŸå†?ƒ¨å¤‰æ•°ã®å†??åˆæœŸåŒ–ãŒå¿?¦ãªãƒ•ィールドã?ã¿è¨å®šã—ã¾ã™ã?
1183 *
1184 * @og.rev 4.0.0.0 (2006/09/31) æ–°è¦è¿½åŠ?
1185 * @serialData ä¸?ƒ¨ã®ã‚ªãƒ–ジェクトã?ã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れã¾ã›ã‚“ã€?
1186 *
1187 * @param strm ObjectInputStreamオブジェク�
1188 * @see #release2()
1189 * @throws IOException シリアライズã«é–¢ã™ã‚‹å…¥å‡ºåŠ›ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå?å?
1190 * @throws ClassNotFoundException クラスを見ã¤ã‘ã‚‹ã“ã¨ãŒã§ããªã‹ã£ãŸå?å?
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 }