139. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/13/2018 10:35:23 AM Eastern Standard 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.

139.1 Files compared

# Location File Last Modified
1 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\ccht\persistent\hibernate AbstractStandardReportDataDAOImpl.java Fri Dec 7 17:36:32 2018 UTC
2 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\ccht\persistent\hibernate AbstractStandardReportDataDAOImpl.java Wed Dec 12 19:46:44 2018 UTC

139.2 Comparison summary

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

139.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

139.4 Active regular expressions

No regular expressions were active.

139.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** *********
  2    * Copyrig ht � 2010  VHA. All r ights rese rved
  3    ********* ********** ********** ********** ********** ********** *********/
  4   package go v.va.med.c cht.persis tent.hiber nate;
  5  
  6   import jav a.util.Arr ays;
  7   import jav a.util.Col lection;
  8   import jav a.util.Dat e;
  9   import jav a.util.Has hMap;
  10   import jav a.util.Lis t;
  11   import jav a.util.Map ;
  12   import jav a.util.Tim eZone;
  13  
  14   import gov .va.med.cc ht.model.r eport.Repo rtParamete rs;
  15   import gov .va.med.cc ht.model.r eport.Repo rtSetup;
  16   import gov .va.med.cc ht.service .report.St andardRepo rtCriteria ;
  17   import gov .va.med.fw .report.Re portConfig uration;
  18   import gov .va.med.fw .report.Re portNameRe solver;
  19   import gov .va.med.fw .report.da ta.QueryCr iteria;
  20   import gov .va.med.fw .report.da ta.ReportD ataExcepti on;
  21   import gov .va.med.fw .util.Stri ngUtils;
  22   import gov .va.med.fw .util.date .TimeZoneU tils;
  23  
  24   /**
  25    * Project : Common</ br> Class:  AbstractS tandardRep ortDataDAO Impl</br>  Created
  26    * on: Apr  12, 2010< /br>
  27    * 
  28    * @author   DN S
  29    * 
  30    */
  31   public abs tract clas s Abstract StandardRe portDataDA OImpl  {
  32           
  33           /* *
  34            *  A seriali zation key
  35            * /
  36           pr ivate stat ic final l ong serial VersionUID  = 1178123 9486245327 38L;
  37  
  38           pr otected st atic final  List<Long > EMPTY_LI ST = Array s.asList(0 L);
  39  
  40           /* *
  41            *  An instan ce of name  resolver
  42            * /
  43           pr otected Re portNameRe solver nam eResolver  = null;
  44  
  45           /* *
  46            *  A default  construct or
  47            * /
  48           pr otected Ab stractStan dardReport DataDAOImp l() {
  49                    supe r();
  50           }
  51  
  52           /* *
  53            *  @return R eturns the  nameResol ver.
  54            * /
  55           pu blic Repor tNameResol ver getNam eResolver( ) {
  56                    retu rn this.na meResolver ;
  57           }
  58  
  59           /* *
  60            *  @param na meResolver
  61            *              The name Resolver t o set.
  62            * /
  63           pu blic void  setNameRes olver(Repo rtNameReso lver nameR esolver) {
  64                    this .nameResol ver = name Resolver;
  65           }
  66  
  67           /* *
  68            *  @see gov. va.med.fw. report.dat a.ReportDa taDAO#preD ataRetriev al(gov.va. med.fw.rep ort.Report Configurat ion)
  69            * /
  70           pu blic void  preDataRet rieval(Rep ortConfigu ration con fig) throw s ReportDa taExceptio n {
  71  
  72                    Quer yCriteria  reportCrit eria = con fig.getQue ryCriteria ();
  73  
  74                    if ( reportCrit eria insta nceof Stan dardReport Criteria)  {
  75                             Standa rdReportCr iteria cri teria = (S tandardRep ortCriteri a) reportC riteria;
  76                             Report Setup setu p = criter ia.getRepo rtSetup();
  77                             Report Parameters  reportPar ameters =  setup.getR eportParam eters();
  78                             TimeZo ne userTim eZone = nu ll;
  79  
  80                             // Set  Report Pa rameters
  81                             if (re portParame ters != nu ll) {
  82                                      userTime Zone = rep ortParamet ers.getUse rTimeZone( );
  83                                      Map<Stri ng, Object > map = re portParame ters.getPa rameterMap ();
  84                                      for (Str ing key :  map.keySet ()) {
  85                                               criteria.a ddCriterio n(key, map .get(key)) ;
  86                                      }
  87                             }
  88                             // Set  report ge neration t ime
  89                             Date r unDate = n ew Date();
  90                             // cri teria.setR unDate(run Date);
  91                             criter ia.addCrit erion("run DateStr",  TimeZoneUt ils.conver tDateToTim eZone(runD ate,
  92                                               userTimeZo ne));
  93  
  94                             // Set  output fi le type
  95                             if (se tup.getFil eType() !=  null) {
  96                                      criteria .setFileTy pe(setup.g etFileType ().getCode ());
  97                             }
  98                    }
  99           }
  100  
  101   //      /* *
  102   //       *  @see gov. va.med.fw. report.dat a.hibernat e.Configur ableReport DataDAO#in itDao()
  103   //       * /
  104   //      pr otected vo id initDao () throws  Exception  {
  105   //               supe r.initDao( );
  106   //      }
  107  
  108           pr otected Ma p<String,  Object> ge tQueryPara meters(Rep ortSetup r eportSetup ) {
  109                    retu rn new Has hMap<Strin g, Object> ();
  110           }
  111  
  112           /* *
  113            *  Helper me thod when  adding a s ingle Stri ng value a nd the ite mSpecified
  114            *  criteria  is simply  whether th e String i s not blan k. See mai n addToMap
  115            *  method.
  116            * /
  117           pr otected vo id addStri ngToParams IfNotBlank (Map<Strin g, Object>  paramMap,  String al lParamName ,
  118                             String  specificP aramName,  String spe cificValue ) {
  119                    addV alueObject ToParams(p aramMap, a llParamNam e, specifi cParamName , StringUt ils
  120                                      .isNotBl ank(specif icValue),  specificVa lue);
  121           }
  122  
  123           /* *
  124            *  Adds two  items to t he paramMa p.
  125            *  <p>
  126            *  If itemSp ecified is  true, the  items add ed are <al lParamName , "No"> (t o
  127            *  signify t hat all av ailable it ems should  not be us ed) and
  128            *  <specific ParamName,  specificV alues> whi ch can be  used in th e query.
  129            *  <p>
  130            *  <p>
  131            *  If itemSp ecified is  false, th e items ad ded are 1)  <allParam Name,
  132            *  allParamN ame> (to s ignify tha t all avai lable item s should b e used in  the
  133            *  query; i. e. not fil tered on t his item)  and 2) eit her <speci ficParamNa me,
  134            *  EMPTY_LIS T> if the  specificVa lue is any  subclass  of Collect ion, or
  135            *  <specific ParamName,  null> oth erwise.
  136            *  
  137            *  @param pa ramMap
  138            *              The map  to which w e're addin g the two  items
  139            *  @param al lParamName
  140            *              The para meter name  signifyin g all avai lable item s
  141            *  @param sp ecificPara mName
  142            *              The para meter sign ifying a s pecific it em
  143            *  @param it emSpecifie d
  144            *              Whether  to use the  specific  parameter  value or a llow all
  145            *              values
  146            *  @param sp ecificValu e
  147            *              The spec ific value  we are fi ltering on ; can be a  collectio n or
  148            *              a single  value. It  can be nu ll in any  case.
  149            * /
  150           pr otected vo id addValu eObjectToP arams(Map< String, Ob ject> para mMap, Stri ng allPara mName,
  151                             String  specificP aramName,  boolean it emSpecifie d, Object  specificVa lues) {
  152                    if ( itemSpecif ied) {
  153                             paramM ap.put(all ParamName,  "No");
  154                             paramM ap.put(spe cificParam Name, spec ificValues );
  155                    } el se {
  156                             paramM ap.put(all ParamName,  allParamN ame);
  157                             paramM ap.put(spe cificParam Name, spec ificValues  != null
  158                                               && Collect ion.class. isAssignab leFrom(spe cificValue s.getClass ()) ? EMPT Y_LIST
  159                                               : null);
  160                    }
  161           }
  162   }