210. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/11/2019 10:54:14 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

210.1 Files compared

# Location File Last Modified
1 HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\report\data ReportDataIterator.java Wed May 29 15:26:18 2019 UTC
2 HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\report\data ReportDataIterator.java Mon Jun 10 19:27:47 2019 UTC

210.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 330
Changed 1 2
Inserted 0 0
Removed 0 0

210.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

210.4 Active regular expressions

No regular expressions were active.

210.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** *********
  2    * Copyrii ght 2004 V HA. All ri ghts reser ved
  3    ********* ********** ********** ********** ********** ********** *********/
  4   // Package
  5   package go v.va.med.f w.report.d ata;
  6  
  7   // Java cl asses
  8   import jav a.io.Seria lizable;
  9   import jav a.util.Arr ayList;
  10   import jav a.util.Lis t;
  11  
  12   import org .hibernate .Scrollabl eResults;
  13  
  14   import gov .va.med.fw .report.Re portConfig uration;
  15  
  16   /**
  17    * Provide s an inter face to it erate thro ugh a repo rt data's  result set
  18    * 
  19    * Project : Framewor k</br> Cre ated on: 5 :26:54 PM  </br>
  20    * 
  21    * @author   DN S
  22    */
  23   public cla ss ReportD ataIterato r implemen ts Seriali zable {
  24  
  25           /* *
  26            *  An instan ce of seri alVersionU ID
  27            * /
  28           pr ivate stat ic final l ong serial VersionUID  = -436569 6853678795 611L;
  29  
  30           /* *
  31            *  A default  size of a  result se t. 100 rec ords in a  list
  32            * /
  33           pr ivate stat ic final i nt PAGE_SI ZE = 100;
  34  
  35           /* *
  36            *  An instan ce of a re port crite ria encaps ulating qu ery parame ters
  37            * /
  38           pr ivate Repo rtConfigur ation repo rtConfig =  null;
  39  
  40           /* *
  41            *  An instan ce of repo rtDAO
  42            * /
  43           pr ivate Repo rtDataDAO  reportDAO  = null;
  44  
  45           pr ivate List  resultPag e = null;
  46  
  47           pr ivate int  pageStart  = Integer. MAX_VALUE;
  48           pr ivate int  pageEnd =  Integer.MI N_VALUE;
  49           pr ivate int  pageSize =  PAGE_SIZE ;
  50           //  private i nt resultP ageDelta =  0;
  51  
  52           pr ivate Scro llableResu lts scroll ableResult s = null;
  53  
  54           /* *
  55            *  A default  construct or
  56            *  
  57            *  @param pr ovider
  58            *  @param co nfig
  59            * /
  60           pu blic Repor tDataItera tor(Report DataDAO da o, ReportC onfigurati on config)  {
  61                    this (dao, conf ig, PAGE_S IZE);
  62           }
  63  
  64           /* *
  65            *  A default  construct or
  66            *  
  67            *  @param da o
  68            *  @param co nfig
  69            *  @param pa geSize
  70            * /
  71           pu blic Repor tDataItera tor(Report DataDAO da o, ReportC onfigurati on config,  int pageS ize) {
  72                    supe r();
  73                    this .reportDAO  = dao;
  74                    this .reportCon fig = conf ig;
  75                    this .pageSize  = pageSize ;
  76           }
  77  
  78           /* *
  79            *  @see gov. va.med.fw. report.dat a.DataIter ator#getRe cord(int)
  80            * /
  81           pu blic final  Object ge tRecord(in t index) t hrows Repo rtDataExce ption {
  82  
  83                    if ( this.resul tPage == n ull || ind ex < pageS tart || in dex > page End) {
  84                             this.r esultPage  = getRecor ds(index,  this.pageS ize);
  85                    }
  86  
  87                    Obje ct result  = null;
  88                    int  pos = inde x - pageSt art;
  89                    if ( this.resul tPage != n ull && thi s.resultPa ge.size()  > pos) {
  90                             result  = this.re sultPage.g et(pos);
  91                    } el se {
  92                             // clo se the scr ollable re sult set
  93                             if (sc rollableRe sults != n ull) {
  94                                      scrollab leResults. close();
  95                                      scrollab leResults  = null;
  96                             }
  97                    }
  98                    retu rn result;
  99           }
  100  
  101           /* *
  102            *  @see gov. va.med.fw. report.dat a.DataIter ator#getRe cords(int,  int)
  103            * /
  104           pu blic List  getRecords (int first Record, in t maxRecor ds) throws  ReportDat aException  {
  105  
  106                    if ( scrollable Results ==  null) {
  107                             scroll ableResult s = getRep ortDAO().g etResults( this.getRe portConfig uration()) ;
  108                    }
  109                    if ( resultPage  == null)  {
  110                             result Page = new  ArrayList (maxRecord s);
  111                    }
  112  
  113                    resu ltPage.cle ar();
  114  
  115                    if ( scrollable Results !=  null) {
  116                             int to tal = 0;
  117                             while  (scrollabl eResults.n ext()) {
  118                                      total++;
  119                                      resultPa ge.add((sc rollableRe sults.get( )));
  120                                      if (tota l == maxRe cords) {
  121                                               break;
  122                                      }
  123                             }
  124                    }
  125  
  126                    // t his.result PageDelta  = queryRes ults insta nceof Post ProcessedL ist ?
  127                    // ( (PostProce ssedList)q ueryResult s).getDelt aInSize()  : 0;
  128                    this .pageStart  = firstRe cord;
  129                    this .pageEnd =  firstReco rd + resul tPage.size () - 1;
  130                    retu rn resultP age;
  131           }
  132  
  133           /* *
  134            *  @return R eturns the  reportDAO .
  135            * /
  136           pu blic Repor tDataDAO g etReportDA O() {
  137                    retu rn reportD AO;
  138           }
  139  
  140           /* *
  141            *  @return R eturns the  report co nfiguratio n
  142            * /
  143           pu blic Repor tConfigura tion getRe portConfig uration()  {
  144                    retu rn this.re portConfig ;
  145           }
  146  
  147           /* *
  148            *  @return R eturns the  pageSize.
  149            * /
  150           pu blic int g etPageSize () {
  151                    retu rn pageSiz e;
  152           }
  153  
  154           @O verride
  155           pr otected vo id finaliz e() throws  Throwable  {
  156                    // T ODO Auto-g enerated m ethod stub
  157                    supe r.finalize ();
  158                    repo rtConfig =  null;
  159                    repo rtDAO = nu ll;
  160                    resu ltPage = n ull;
  161                    if ( scrollable Results !=  null) {
  162                             scroll ableResult s.close();
  163                             scroll ableResult s = null;
  164                    }
  165           }
  166   }