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.report2;
017
018 import java.io.File;
019
020 import org.opengion.hayabusa.db.DBTableModel;
021
022 /**
023 * 帳票処ç?¦æ±‚を管ç?™ã‚‹ã‚ューオブジェクトã§ã™ã?
024 * ã“ã?オブジェクトã§ã¯ã€å¸³ç¥¨ã®å®šç¾©åŠã?ãƒ??ã‚¿ã¨ã€å?ç?¸ã«ç™ºç”Ÿã—ãŸã‚¨ãƒ©ãƒ¼ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’管ç?—ã¾ã™ã?
025 * ã¾ãŸã?ã“ã?ã‚ューを生æˆã—ãŸã‚ªãƒ–ジェクトもã“ã?オブジェクトã«ã‚»ãƒ?ƒˆã•れã¾ã™ã?
026 *
027 * @og.group 帳票シスãƒ?ƒ
028 *
029 * @version 4.0
030 * @author Hiroki.Nakamura
031 * @since JDK1.6
032 */
033 public class ExecQueue {
034
035 /** 実行方�{@value} */
036 protected static final String OUT_ODS_ONLY = "1";
037 /** 実行方�{@value} */
038 protected static final String OUT_PRINT_ONLY = "2";
039 /** 実行方�{@value} */
040 protected static final String OUT_ODS_PRINT = "3";
041 /** 実行方�{@value} */
042 protected static final String OUT_ODS_PDF = "P";
043 /** 実行方�{@value} */
044 protected static final String OUT_ODS_PRINT_PDF = "Q";
045 /** 実行方�{@value} */
046 protected static final String OUT_ODS_EXCEL = "E";
047 /** 実行方�{@value} */
048 protected static final String OUT_ODS_ODS = "S"; // 4.3.3.4 (2008/11/01) 追�
049 /** 実行方�{@value} */
050 protected static final String IN_INPUT_ONLY = "5";
051 /** 実行方�{@value} */
052 protected static final String IN_EXEC_ONLY = "6";
053 /** 実行方�{@value} */
054 protected static final String IN_INPUT_EXEC = "7";
055 /** 実行方�{@value} */
056 protected static final String RFID_PRINT = "A";
057 /** 実行方�{@value} */
058 protected static final String RFID_ALLPRINT = "B";
059 /** 実行方�{@value} */
060 protected static final String RFID_ALLERASE = "C";
061 /** 実行方�{@value} */
062 protected static final String RFID_SEQERASE = "D";
063
064 /** æœ?¤§ã‚·ãƒ¼ãƒˆæ•° {@value} */
065 protected static final int MAX_SHEETS_PER_FILE = 256; // 5.1.2.0 (2010/01/01)
066
067 private String ykno = null;
068 private String systemId = null;
069 private DBTableModel body = null;
070 private DBTableModel header = null;
071 private DBTableModel footer = null;
072 // private String bsql = null; // 5.1.2.0 (2010/01/01)
073 // private String hsql = null; // 5.1.2.0 (2010/01/01)
074 // private String fsql = null; // 5.1.2.0 (2010/01/01)
075 private String listId = null;
076 private String pdfPasswd = null;
077 private String lang = null;
078 private String threadId = null;
079 private String templateName = null;
080 private String outputType = null;
081 private String printerName = null;
082 private String outputName = null;
083 private boolean fglocal = false;
084 // private boolean fgdirect = false;
085 private boolean fgcut = false;
086 private QueueManager manager = null;
087 private String prgdir = null; // 4.3.3.0 (2008/10/01) æ¿é‡‘RFID対応ã?
088 private String prgfile = null; // 4.3.3.0 (2008/10/01)
089 private String prtid = null; // 4.3.3.0 (2008/10/01)
090
091 private int pageCnt = 0; // 5.1.2.0 (2010/01/01) 処ç?—ãŸã?ージ数
092 private int rowCnt = 0; // 5.1.2.0 (2010/01/01) 処ç?—ãŸè¡Œæ•°
093 // private boolean isEnd = false; // 5.1.2.0 (2010/01/01) å…¨ãƒ??ã‚¿ãŒå?ç?•れãŸã?
094 private boolean isDataEnd = false; // 5.1.2.0 (2010/01/01) å…¨ãƒ??ã‚¿ãŒå?ç?•れãŸã?(メソãƒ?ƒ‰åã¨åŒã˜å¤‰æ•°å変更)
095
096 private final StringBuilder errMsg = new StringBuilder();
097
098 /**
099 * è¦æ±?Oã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
100 *
101 * @param ykno è¦æ±?O
102 */
103 public void setYkno( final String ykno ) {
104 this.ykno = ykno;
105 }
106
107 /**
108 * è¦æ±?Oã‚’å–å¾—ã—ã¾ã™ã?
109 *
110 * @return è¦æ±?O
111 */
112 public String getYkno() {
113 return ykno;
114 }
115
116 /**
117 * シスãƒ?ƒ IDã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
118 *
119 * @param systemId シスãƒ?ƒ ID
120 */
121 public void setSystemId( final String systemId ) {
122 this.systemId = systemId;
123 }
124
125 /**
126 * シスãƒ?ƒ IDã‚’å–å¾—ã—ã¾ã™ã?
127 *
128 * @return Stringシスãƒ?ƒ ID
129 */
130 public String getSystemId() {
131 return systemId;
132 }
133
134 /**
135 * ボディー部åˆ??DBTableModelã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
136 *
137 * @param body DBTableModelオブジェク�
138 */
139 public void setBody( final DBTableModel body ) {
140 this.body = body;
141 }
142
143 /**
144 * ボディー部åˆ??DBTableModelã‚’å–å¾—ã—ã¾ã™ã?
145 *
146 * @return ボディー部�?DBTableModelオブジェク�
147 */
148 public DBTableModel getBody() {
149 return body;
150 }
151
152 /**
153 * ヘッãƒ??部åˆ??DBTableModelã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
154 *
155 * @param header DBTableModelオブジェク�
156 */
157 public void setHeader( final DBTableModel header ) {
158 this.header = header;
159 }
160
161 /**
162 * ヘッãƒ??部åˆ??DBTableModelã‚’å–å¾—ã—ã¾ã™ã?
163 *
164 * @return ヘッ�?部�?DBTableModelオブジェク�
165 */
166 public DBTableModel getHeader() {
167 return header;
168 }
169
170 /**
171 * フッター部åˆ??DBTableModelã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
172 *
173 * @param footer DBTableModelオブジェク�
174 */
175 public void setFooter( final DBTableModel footer ) {
176 this.footer = footer;
177 }
178
179 /**
180 * フッター部åˆ??DBTableModelã‚’å–å¾—ã—ã¾ã™ã?
181 *
182 * @return フッター部�?DBTableModelオブジェク�
183 */
184 public DBTableModel getFooter() {
185 return footer;
186 }
187
188 /**
189 * ボディー部åˆ??DBTableModelを作æ?ã™ã‚‹ãŸã‚ã®SQLæ–?‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
190 *
191 * @og.rev 5.1.2.0 (2010/01/01) å»?¢(クラスå†?ƒ¨ã§ç›´æŽ¥åˆ?‰²)
192 *
193 * @see QueueManager_DB.DBTableModelCreator
194 * @param bsql
195 */
196 // public void setBsql( final String bsql ) {
197 // this.bsql = bsql;
198 // }
199
200 /**
201 * ボディー部åˆ??DBTableModelを作æ?ã™ã‚‹ãŸã‚ã®SQLæ–?‚’å–å¾—ã—ã¾ã™ã?
202 *
203 * @og.rev 5.1.2.0 (2010/01/01) å»?¢(クラスå†?ƒ¨ã§ç›´æŽ¥åˆ?‰²)
204 *
205 * @see QueueManager_DB.DBTableModelCreators
206 *
207 * @return ボディーSQL
208 */
209 // public String getBsql() {
210 // return bsql;
211 // }
212
213 /**
214 * ヘッãƒ??部åˆ??DBTableModelを作æ?ã™ã‚‹ãŸã‚ã®SQLæ–?‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
215 *
216 * @og.rev 5.1.2.0 (2010/01/01) å»?¢(クラスå†?ƒ¨ã§ç›´æŽ¥åˆ?‰²)
217 *
218 * @see QueueManager_DB.DBTableModelCreator
219 * @param hsql
220 */
221 // public void setHsql( final String hsql ) {
222 // this.hsql = hsql;
223 // }
224
225 /**
226 * ヘッãƒ??部åˆ??DBTableModelを作æ?ã™ã‚‹ãŸã‚ã®SQLæ–?‚’å–å¾—ã—ã¾ã™ã?
227 *
228 * @og.rev 5.1.2.0 (2010/01/01) å»?¢(クラスå†?ƒ¨ã§ç›´æŽ¥åˆ?‰²)
229 *
230 * @see QueueManager_DB.DBTableModelCreator
231 *
232 * @return ヘッ�?SQL
233 */
234 // public String getHsql() {
235 // return hsql;
236 // }
237
238 /**
239 * フッター部åˆ??DBTableModelを作æ?ã™ã‚‹ãŸã‚ã®SQLæ–?‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
240 *
241 * @og.rev 5.1.2.0 (2010/01/01) å»?¢(クラスå†?ƒ¨ã§ç›´æŽ¥åˆ?‰²)
242 *
243 * @see QueueManager_DB.DBTableModelCreator
244 * @param fsql
245 */
246 // public void setFsql( final String fsql ) {
247 // this.fsql = fsql;
248 // }
249
250 /**
251 * フッター部åˆ??DBTableModelを作æ?ã™ã‚‹ãŸã‚ã®SQLæ–?‚’å–å¾—ã—ã¾ã™ã?
252 *
253 * @og.rev 5.1.2.0 (2010/01/01) å»?¢(クラスå†?ƒ¨ã§ç›´æŽ¥åˆ?‰²)
254 *
255 * @see QueueManager_DB.DBTableModelCreator
256 *
257 * @return フッターSQL
258 */
259 // public String getFsql() {
260 // return fsql;
261 // }
262
263 /**
264 * 帳票IDã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
265 *
266 * @param listId 帳票ID
267 */
268 public void setListId( final String listId ) {
269 this.listId = listId;
270 }
271
272 /**
273 * 帳票IDã‚’å–å¾—ã—ã¾ã™ã?
274 *
275 * @return 帳票ID
276 */
277 public String getListId() {
278 return listId;
279 }
280
281 /**
282 * PDFパスワードをセãƒ?ƒˆã—ã¾ã™ã?
283 *
284 * @param pdfPasswd PDFパスワー�
285 */
286 public void setPdfPasswd( final String pdfPasswd ) {
287 this.pdfPasswd = pdfPasswd;
288 }
289
290 /**
291 * PDFパスワードをå–å¾—ã—ã¾ã™ã?
292 *
293 * @return PDFパスワー�
294 */
295 public String getPdfPasswd() {
296 return pdfPasswd;
297 }
298
299 /**
300 * è¨?ªžã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
301 *
302 * @param lang è¨?ª?
303 */
304 public void setLang( final String lang ) {
305 this.lang = lang;
306 }
307
308 /**
309 * è¨?ªžã‚’å–å¾—ã—ã¾ã™ã?
310 *
311 * @return è¨?ª?
312 */
313 public String getLang() {
314 return lang;
315 }
316
317 /**
318 * 雛形ファイルåã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
319 *
320 * @param templateName 雛形ファイルå?
321 */
322 public void setTemplateName( final String templateName ) {
323 this.templateName = templateName;
324 }
325
326 /**
327 * 雛形ファイルåã‚’å–å¾—ã—ã¾ã™ã?
328 *
329 * @return 帳票雛形ファイルå?
330 */
331 public String getTemplateName() {
332 return templateName;
333 }
334
335 /**
336 * 実行方法をセãƒ?ƒˆã—ã¾ã™ã?
337 *
338 * @param outputType 実行方�
339 */
340 public void setOutputType( final String outputType ) {
341 this.outputType = outputType;
342 }
343
344 /**
345 * 出力タイプをå–å¾—ã—ã¾ã™ã?
346 *
347 * @return 出力タイ�
348 */
349 public String getOutputType() {
350 return outputType;
351 }
352
353 /**
354 * プリンターåã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
355 *
356 * @param printerName プリンターå?
357 */
358 public void setPrinterName( final String printerName ) {
359 this.printerName = printerName;
360 }
361
362 /**
363 * プリンターåã‚’å–å¾—ã—ã¾ã™ã?
364 *
365 * @return プリンタå?
366 */
367 public String getPrinterName() {
368 return printerName;
369 }
370
371 /**
372 * 処ç?¦æ±‚を処ç?™ã‚‹ã‚¹ãƒ¬ãƒ?ƒ‰IDã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
373 *
374 * @param threadId スレãƒ?ƒ‰ID
375 */
376 public void setThreadId( final String threadId ) {
377 this.threadId = threadId;
378 }
379
380 /**
381 * 処ç?¦æ±‚を処ç?™ã‚‹ã‚¹ãƒ¬ãƒ?ƒ‰IDã‚’å–å¾—ã—ã¾ã™ã?
382 *
383 * @return スレãƒ?ƒ‰ID
384 */
385 public String getThreadId() {
386 return threadId;
387 }
388
389 /**
390 * 出力ファイルåã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
391 *
392 * @param outputName 出力ファイルå?
393 */
394 public void setOutputName( final String outputName ) {
395 this.outputName = outputName;
396 }
397
398 /**
399 * 出力ファイルåã‚’è¨å®šã—ã¾ã™ã?
400 * GE50ã«è¨å®šã•れã¦ã?ªã??åˆã?第四引数(è¦æ±‚番å·)を利用ã™ã‚‹ã€?
401 * ãã?å ´åˆã?タイプã«å¿œã˜ãŸæ‹¡å¼µåãŒè‡ªå‹•è¨å®šã•れるã€?
402 *
403 * ".xls" : OUT_ODS_EXCEL
404 * ".pdf" : OUT_ODS_PDF , OUT_ODS_PRINT_PDF
405 * ".ods" : OUT_ODS_ODS
406 * ".xml" : RFID_PRINT , RFID_ALLPRINT , RFID_ALLERASE , RFID_SEQERASE
407 *
408 * @og.rev 4.3.3.4 (2008/11/01) ODS出力対�
409 * @og.rev 5.4.3.0 (2011/12/26) RFIDãƒ?ƒ•ォルト対å¿?
410 * @og.rev 5.4.4.1 (2012/02/03) RFIDæ‹¡å¼µå変更
411 *
412 * @param outputDir 出力ディレクトリå?
413 * @param outputFile 出力ファイルå?
414 * @param type タイ�
415 * @param yokyu è¦æ±‚番å·(ファイルåãŒæŒ?®šã•れã¦ã?ªã??åˆã?ファイルå?
416 *
417 */
418 public void setOutputName( final String outputDir, final String outputFile, final String type, final String yokyu ){
419 StringBuilder filePath = new StringBuilder();
420 filePath.append( outputDir + File.separator );
421
422 if( outputFile == null || outputFile.length() == 0 ){ // ファイルåãŒæŒ?®šã•れã¦ã?ªã??åˆã?è¦æ±‚番å·ã‚’利用ã™ã‚‹ã€?
423 if( OUT_ODS_EXCEL.equals( type ) ){
424 filePath.append( yokyu );
425 filePath.append( ".xls" );
426 }
427 else if( OUT_ODS_PDF.equals( type ) || OUT_ODS_PRINT_PDF.equals( type ) ){
428 filePath.append( yokyu );
429 filePath.append( ".pdf" );
430 }
431 // 4.3.3.4 (2008/11/01) 追�
432 else if( OUT_ODS_ODS.equals ( type ) ){
433 filePath.append( yokyu );
434 filePath.append( ".ods" );
435 }
436 // 5.4.3.0 (2011/12/26) 追�
437 // 5.4.4.2 (2012/02/03) .txtã§ã¯ãªã?xml
438 else if( ExecQueue.RFID_PRINT.equals( type ) || ExecQueue.RFID_ALLPRINT.equals( type )
439 || ExecQueue.RFID_ALLERASE.equals( type ) || ExecQueue.RFID_SEQERASE.equals( type ) ) {
440 filePath.append( yokyu );
441 filePath.append( ".xml" ); //txt-xml
442 }
443 }
444 else {
445 filePath.append( outputFile );
446 }
447
448 this.outputName = filePath.toString();
449 }
450
451 /**
452 * 出力ファイルåã‚’å–å¾—ã—ã¾ã™ã?
453 *
454 * @og.rev 5.1.2.0 (2010/01/01) 256シートをè¶?ˆã‚‹å?åˆã«å¯¾å¿œã?2ファイル目以é™ã?ã€_1ã€_2?¥?¥?¥ã‚’ファイルåã?後ã‚ã«ã¤ã‘ã‚‹
455 *
456 * @return 出力å?ファイルå?
457 */
458 public String getOutputName() {
459 if( pageCnt <= MAX_SHEETS_PER_FILE ) {
460 return outputName;
461 }
462 else {
463 StringBuilder fileName = new StringBuilder();
464
465 int idx = outputName.lastIndexOf( '.' );
466 String name = outputName.substring( 0, idx );
467 String suffix = outputName.substring( idx );
468 int addNo = (int)Math.ceil( (double)pageCnt/(double)MAX_SHEETS_PER_FILE ) - 1;
469 // String addName = "_" + String.valueOf( addNo );
470
471 // fileName.append( name ).append( addName ).append( suffix );;
472 fileName.append( name ).append( "_" ).append( addNo ).append( suffix );
473
474 return fileName.toString();
475 }
476 }
477
478 /**
479 * 実行ファイルãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’指定ã—ã¾ã™ã?
480 *
481 * @og.rev 4.3.3.0 (2008/10/01) æ¿é‡‘RFID対å¿?
482 *
483 * @param dir ãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒª
484 */
485 public void setPrgDir( final String dir ) {
486 this.prgdir = dir;
487 }
488
489 /**
490 * 実行ファイルãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’å–å¾—ã—ã¾ã™ã?
491 *
492 * @og.rev 4.3.3.0 (2008/10/01) æ¿é‡‘RFID対å¿?
493 *
494 * @return プãƒã‚°ãƒ©ãƒ?ƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª
495 */
496 public String getPrgDir() {
497 return prgdir;
498 }
499
500 /**
501 * 実行ファイルåã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
502 *
503 * @og.rev 4.3.3.0 (2008/10/01) æ¿é‡‘RFID対å¿?
504 * @param file ファイルå?
505 */
506 public void setPrgFile( final String file ) {
507 this.prgfile = file;
508 }
509
510 /**
511 * 実行ファイルåã‚’å–å¾—ã—ã¾ã™ã?
512 *
513 * @og.rev 4.3.3.0 (2008/10/01) æ¿é‡‘RFID対å¿?
514 *
515 * @return プãƒã‚°ãƒ©ãƒ?ƒ•ァイルå?
516 */
517 public String getPrgFile() {
518 return prgfile;
519 }
520
521 /**
522 * プリンタIDã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
523 *
524 * @og.rev 4.3.3.0 (2008/10/01) æ¿é‡‘RFID対å¿?
525 * @param id プリンタID
526 */
527 public void setPrtId( final String id ) {
528 this.prtid = id;
529 }
530
531 /**
532 * プリンタIDã‚’å–å¾—ã—ã¾ã™ã?
533 *
534 * @og.rev 4.3.3.0 (2008/10/01) æ¿é‡‘RFID対å¿?
535 *
536 * @return プリンタID
537 */
538 public String getPrtId() {
539 return prtid;
540 }
541
542 /**
543 * ãƒãƒ¼ã‚«ãƒ«ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨ãƒ•ラグをセãƒ?ƒˆã—ã¾ã™ã?
544 *
545 * @param fglocal ãƒãƒ¼ã‚«ãƒ«ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨ãƒ•ラグ[true:使用ã™ã‚‹/false:使用ã—ãªã„]
546 */
547 public void setFglocal( final boolean fglocal ) {
548 this.fglocal = fglocal;
549 }
550
551 /**
552 * ãƒãƒ¼ã‚«ãƒ«ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨ãƒ•ラグをå–å¾—ã—ã¾ã™ã?
553 *
554 * @return ãƒãƒ¼ãƒ«ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨ãƒ•ラグ[true:使用ã™ã‚‹/false:使用ã—ãªã„]
555 */
556 public boolean isFglocal() {
557 return fglocal;
558 }
559
560 // /**
561 // * @param fgdirect
562 // */
563 // public void setFgdirect( final boolean fgdirect ) {
564 // this.fgdirect = fgdirect;
565 // }
566
567 // /**
568 // * @return ãƒ?‚¤ãƒ¬ã‚¯ãƒˆå?力フラグ
569 // */
570 // public boolean isFgdirect() {
571 // return fgdirect;
572 // }
573
574 /**
575 * ペã?ジエンドカãƒ?ƒˆãƒ•ラグをセãƒ?ƒˆã—ã¾ã™ã?
576 *
577 * @param fgcut ペã?ジエンドカãƒ?ƒˆã®ä½¿ç”¨å¯å¦[true:使用/false:通常]
578 */
579 public void setFgcut( final boolean fgcut ) {
580 this.fgcut = fgcut;
581 }
582
583 /**
584 * ペã?ジエンドカãƒ?ƒˆãƒ•ラグをå–å¾—ã—ã¾ã™ã?
585 *
586 * @return ペã?ジエンドカãƒ?ƒˆãƒ•ラグ
587 */
588 public boolean isFgcut() {
589 return fgcut;
590 }
591
592 /**
593 * ã‚ューマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
594 *
595 * @param manager ã‚ューマãƒãƒ¼ã‚¸ãƒ£ãƒ¼
596 */
597 public void setManager( final QueueManager manager ) {
598 this.manager = manager;
599 }
600
601 /**
602 * 帳票処ç?ƒ‡ãƒ¼ã‚¿ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
603 * æ—¢ã«ãƒ??ブルモãƒ?ƒ«ãŒã‚»ãƒ?ƒˆã•れã¦ã?‚‹å ´åˆã?ã€å?ã‚»ãƒ?ƒˆã—ã¾ã›ã‚“ã€?
604 *
605 */
606 public void setData() {
607 if( body == null && manager != null ) {
608 manager.set( this );
609 }
610 }
611
612 /**
613 * ã‚ューを実行ä¸ã®çŠ¶æ…‹ã«æ›´æ–°ã—ã¾ã™ã?
614 *
615 */
616 public void setExecute() {
617 if( manager != null ) {
618 manager.execute( this );
619 }
620 }
621
622 /**
623 * ã‚ューを完äº?¸ˆã?çŠ¶æ…‹ã«æ›´æ–°ã—ã¾ã™ã?
624 *
625 */
626 public void setComplete() {
627 if( manager != null ) {
628 manager.complete( this );
629 }
630 }
631
632 /**
633 * ã‚ューをエラーã®çŠ¶æ…‹ã«æ›´æ–°ã—ã¾ã™ã?
634 */
635 public void setError() {
636 if( manager != null ) {
637 manager.error( this );
638 }
639 }
640
641 /**
642 * エラーメãƒ?‚»ãƒ¼ã‚¸ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
643 *
644 * @param msg エラーメãƒ?‚»ãƒ¼ã‚¸
645 */
646 public void addMsg( final String msg ) {
647 // this.msg.append( msg );
648 errMsg.append( msg );
649 }
650
651 /**
652 * エラーメãƒ?‚»ãƒ¼ã‚¸ã‚’å–å¾—ã—ã¾ã™ã?
653 *
654 * @return エラーメãƒ?‚»ãƒ¼ã‚¸
655 */
656 public String getMsg() {
657 // return msg.toString();
658 return errMsg.toString();
659 }
660
661 /**
662 * 処ç?—ãŸã?ージ数を引数ã®åˆ? ã‘カウントアãƒ??ã—ã¾ã™ã?
663 *
664 * @og.rev 5.1.2.0 (2010/01/01) æ–°è¦è¿½åŠ?
665 *
666 * @param pgs カウントアãƒ??ã™ã‚‹ãƒšã?ジ数
667 */
668 public void addExecPageCnt( final int pgs ) {
669 pageCnt += pgs;
670 }
671
672 /**
673 * 処ç?—ãŸã?ージ数を返ã—ã¾ã™ã?
674 *
675 * @og.rev 5.1.2.0 (2010/01/01) æ–°è¦è¿½åŠ?
676 *
677 * @return 処ç?—ãŸã?ージ数
678 */
679 public int getExecPagesCnt() {
680 return pageCnt;
681 }
682
683 /**
684 * 処ç?—ãŸè¡Œæ•°ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
685 *
686 * @og.rev 5.1.2.0 (2010/01/01) æ–°è¦è¿½åŠ?
687 *
688 * @param rws 処ç?—ãŸè¡Œæ•°
689 */
690 public void setExecRowCnt( final int rws ) {
691 rowCnt = rws;
692 }
693
694 /**
695 * 処ç?—ãŸè¡Œæ•°ã‚’è¿”ã—ã¾ã™ã?
696 *
697 * @og.rev 5.1.2.0 (2010/01/01) æ–°è¦è¿½åŠ?
698 *
699 * @return 処ç?—ãŸè¡Œæ•°
700 */
701 public int getExecRowCnt() {
702 return rowCnt;
703 }
704
705 /**
706 * å…¨ã¦ã®è¡ŒãŒå‡¦ç?•れãŸã‹ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
707 *
708 * ã“れã¯ã€å?ç?µæžœãŒã?256シートをè¶?ˆã¦ã?Ÿå ´åˆã?å†åº¦æ®‹ã‚Šã®ãƒ??ã‚¿ã«ã¤ã?¦
709 * 処ç?‚’行ã†ã‹ã©ã?‹ã®åˆ¤å®šã™ã‚‹ãŸã‚ã«ã€åˆ©ç”¨ã—ã¾ã™ã?
710 *
711 * @og.rev 5.1.2.0 (2010/01/01) æ–°è¦è¿½åŠ?
712 *
713 * @param flag å…¨ã¦ã®è¡ŒãŒå‡¦ç?•れãŸã?
714 */
715 public void setEnd( final boolean flag ) {
716 isDataEnd = flag;
717 }
718
719 /**
720 * å…¨ã¦ã®è¡ŒãŒå‡¦ç?•れã¦ã?‚‹ã‹ã‚’è¿”ã—ã¾ã™ã?
721 *
722 * ã“れã¯ã€å?ç?µæžœãŒã?256シートをè¶?ˆã¦ã?Ÿå ´åˆã?å†åº¦æ®‹ã‚Šã®ãƒ??ã‚¿ã«ã¤ã?¦
723 * 処ç?‚’行ã†ã‹ã©ã?‹ã®åˆ¤å®šã™ã‚‹ãŸã‚ã«ã€åˆ©ç”¨ã—ã¾ã™ã?
724 *
725 * @og.rev 5.1.2.0 (2010/01/01) æ–°è¦è¿½åŠ?
726 *
727 * @return å…¨ã¦ã®è¡ŒãŒå‡¦ç?•れãŸã?
728 */
729 public boolean isEnd() {
730 return isDataEnd;
731 }
732 }