Produced by Araxis Merge on 6/11/2019 10:54:11 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\batchprocess | AbstractDataQueryProcess.java | Wed May 29 15:26:02 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\batchprocess | AbstractDataQueryProcess.java | Mon Jun 10 19:30:04 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 298 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | /********* ********** ********** ********** ********** ********** ********* | |
| 2 | * Copyrii ght 2005 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | ||
| 5 | package go v.va.med.f w.batchpro cess; | |
| 6 | ||
| 7 | import jav a.util.Lis t; | |
| 8 | ||
| 9 | import org .apache.co mmons.lang .Validate; | |
| 10 | ||
| 11 | import gov .va.med.fw .persisten t.DAOOpera tions; | |
| 12 | ||
| 13 | /** | |
| 14 | * Abstrac t base cla ss for bat ch process ing of bul k data whe re the inp ut source | |
| 15 | * is a da tabase que ry. | |
| 16 | * | |
| 17 | * Created Feb 1, 20 06 2:41:40 PM | |
| 18 | * | |
| 19 | * @author DNS DN S
|
|
| 20 | */ | |
| 21 | public abs tract clas s Abstract DataQueryP rocess ext ends Abstr actDataPro cess { | |
| 22 | pr ivate Data QueryDetai l queryDet ail = new DataQueryD etail(); | |
| 23 | ||
| 24 | pr ivate DAOO perations dao; | |
| 25 | ||
| 26 | pr otected Da taProcessE xecutionCo ntext crea teDataProc essExecuti onContext( ) { | |
| 27 | Data QueryProce ssExecutio nContext c ontext = n ew DataQue ryProcessE xecutionCo ntext(); | |
| 28 | cont ext.setPro cessStatis tics(creat eProcessSt atistics() ); | |
| 29 | retu rn context ; | |
| 30 | } | |
| 31 | ||
| 32 | pr otected Pr ocessStati stics crea teProcessS tatistics( ) { | |
| 33 | retu rn new Dat aQueryProc essStatist ics(); | |
| 34 | } | |
| 35 | ||
| 36 | // not marke d final fo r framewor k override s | |
| 37 | pr otected Li st acquire Data(DataP rocessExec utionConte xt context ) throws E xception { | |
| 38 | Data QueryProce ssExecutio nContext q ueryContex t = (DataQ ueryProces sExecution Context) c ontext; | |
| 39 | quer yContext.s etCurrentD ataQuery(q ueryDetail ); | |
| 40 | ||
| 41 | List acquiredD ata = doAc quireData( queryConte xt); | |
| 42 | // l et this ha ppen indir ectly by i mplementat ion use of | |
| 43 | // i ncrementNu mberOf*Rec ords | |
| 44 | // c ontext.get ProcessSta tistics(). setNumberO fTotalReco rds(acquir edData.siz e()); | |
| 45 | if ( logger.isI nfoEnabled () && acqu iredData ! = null) | |
| 46 | logger .info("Abs tractDataQ ueryProces s acquired " + acqui redData.si ze() | |
| 47 | + " data r ecords"); | |
| 48 | retu rn acquire dData; | |
| 49 | } | |
| 50 | ||
| 51 | // not marke d final fo r subclass es | |
| 52 | pr otected Li st doAcqui reData(Dat aQueryProc essExecuti onContext context) t hrows Exce ption { | |
| 53 | retu rn execute Query(cont ext); | |
| 54 | } | |
| 55 | ||
| 56 | // subclasse s can over ride | |
| 57 | pr otected Li st execute Query(Data QueryProce ssExecutio nContext c ontext) th rows Excep tion { | |
| 58 | Data QueryDetai l currentQ uery = con text.getCu rrentDataQ uery(); | |
| 59 | retu rn getDao( ).findByNa medQueryAn dNamedPara m(currentQ uery.getQu ery().getQ uery(), | |
| 60 | currentQ uery.getQu ery().getP aramNames( ), current Query.getQ uery().get ParamValue s()); | |
| 61 | } | |
| 62 | ||
| 63 | /* * | |
| 64 | * @return R eturns the dao. | |
| 65 | * / | |
| 66 | pu blic DAOOp erations g etDao() { | |
| 67 | retu rn dao; | |
| 68 | } | |
| 69 | ||
| 70 | /* * | |
| 71 | * @param da o | |
| 72 | * The dao to set. | |
| 73 | * / | |
| 74 | pu blic void setDao(DAO Operations dao) { | |
| 75 | this .dao = dao ; | |
| 76 | } | |
| 77 | ||
| 78 | /* * | |
| 79 | * @return R eturns the queryName . | |
| 80 | * / | |
| 81 | pu blic Strin g getQuery Name() { | |
| 82 | retu rn queryDe tail.getQu ery().getQ uery(); | |
| 83 | } | |
| 84 | ||
| 85 | /* * | |
| 86 | * @param qu eryName | |
| 87 | * The quer yName to s et. | |
| 88 | * / | |
| 89 | pu blic void setQueryNa me(String queryName) { | |
| 90 | quer yDetail.ge tQuery().s etQuery(qu eryName); | |
| 91 | } | |
| 92 | ||
| 93 | pu blic void afterPrope rtiesSet() { | |
| 94 | supe r.afterPro pertiesSet (); | |
| 95 | Vali date.notNu ll(dao, "A dao is ne eded to ac quire data "); | |
| 96 | vali dateQuery( ); | |
| 97 | } | |
| 98 | ||
| 99 | // not marke d final fo r framewor k override s | |
| 100 | pr otected vo id validat eQuery() { | |
| 101 | Vali date.notNu ll(queryDe tail, "A D ataQueryDe tail is ne eded to ac quire data "); | |
| 102 | Vali date.notNu ll(queryDe tail.getQu ery().getQ uery(), | |
| 103 | "A query name is n eeded to a cquire dat a"); | |
| 104 | } | |
| 105 | ||
| 106 | /* * | |
| 107 | * @return R eturns the paramName s. | |
| 108 | * / | |
| 109 | pu blic Strin g[] getPar amNames() { | |
| 110 | retu rn queryDe tail.getQu ery().getP aramNames( ); | |
| 111 | } | |
| 112 | ||
| 113 | /* * | |
| 114 | * @param pa ramNames | |
| 115 | * The para mNames to set. | |
| 116 | * / | |
| 117 | pu blic void setParamNa mes(String [] paramNa mes) { | |
| 118 | quer yDetail.ge tQuery().s etParamNam es(paramNa mes); | |
| 119 | } | |
| 120 | ||
| 121 | /* * | |
| 122 | * @return R eturns the paramValu es. | |
| 123 | * / | |
| 124 | pu blic Objec t[] getPar amValues() { | |
| 125 | retu rn queryDe tail.getQu ery().getP aramValues (); | |
| 126 | } | |
| 127 | ||
| 128 | /* * | |
| 129 | * @param pa ramValues | |
| 130 | * The para mValues to set. | |
| 131 | * / | |
| 132 | pu blic void setParamVa lues(Objec t[] paramV alues) { | |
| 133 | quer yDetail.ge tQuery().s etParamVal ues(paramV alues); | |
| 134 | } | |
| 135 | ||
| 136 | /* * | |
| 137 | * @return R eturns the queryDeta il. | |
| 138 | * / | |
| 139 | pu blic DataQ ueryDetail getQueryD etail() { | |
| 140 | retu rn queryDe tail; | |
| 141 | } | |
| 142 | ||
| 143 | /* * | |
| 144 | * @param qu eryDetail | |
| 145 | * The quer yDetail to set. | |
| 146 | * / | |
| 147 | pu blic void setQueryDe tail(DataQ ueryDetail queryDeta il) { | |
| 148 | this .queryDeta il = query Detail; | |
| 149 | } | |
| 150 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.