Produced by Araxis Merge on 9/15/2018 10:47:53 PM 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 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_integration\mhv-integration-phr\mhv-integration-phrmgr-main\src\main\java\gov\va\med\mhv\integration\phr\service | BaseQueryService.java | Thu Aug 23 21:20:40 2018 UTC |
| 2 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_integration\mhv-integration-phr\mhv-integration-phrmgr-main\src\main\java\gov\va\med\mhv\integration\phr\service | BaseQueryService.java | Sat Sep 15 21:40:36 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 256 |
| 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 | * | |
| 3 | */ | |
| 4 | package go v.va.med.m hv.integra tion.phr.s ervice; | |
| 5 | ||
| 6 | import gov .va.med.mh v.integrat ion.phr.da o.Transfer DAO; | |
| 7 | import gov .va.med.mh v.integrat ion.phr.st age.enumer ation.Stag eMessageTy pe; | |
| 8 | import gov .va.med.mh v.integrat ion.phr.st age.transf er.StageMe ssageContr ol; | |
| 9 | import gov .va.med.mh v.integrat ion.phr.tr ansfer.Que ryRequest; | |
| 10 | ||
| 11 | import jav a.util.Dat e; | |
| 12 | ||
| 13 | /** | |
| 14 | * @author DNS | |
| 15 | * | |
| 16 | * Base clas s for cont aining com mon Query Service me thods and | |
| 17 | * propertie s. | |
| 18 | */ | |
| 19 | public abs tract clas s BaseQuer yService i mplements QueryServi ce { | |
| 20 | ||
| 21 | pr otected St agingServi ce staging Service = null; | |
| 22 | ||
| 23 | pr otected Tr ansferDAO transferDA O = null; | |
| 24 | ||
| 25 | pr otected St ring defau ltStartDat e = "19840 101"; | |
| 26 | ||
| 27 | pr otected Bo olean igno reIcnCheck = true; | |
| 28 | ||
| 29 | pr otected ab stract Sta geMessageC ontrol doQ uery(Query Request re quest, Que ryServiceR esponse re sult); | |
| 30 | ||
| 31 | pu blic Query ServiceRes ponse proc ess(QueryR equest req uest) { | |
| 32 | ||
| 33 | Quer yServiceRe sponse res ult = new QueryServi ceResponse ( | |
| 34 | QuerySer viceRespon se.OK); | |
| 35 | Date queryStar tTime = ne w Date(); | |
| 36 | ||
| 37 | Stag eMessageCo ntrol stag eMessage = null; | |
| 38 | ||
| 39 | // u pdate the extract lo g with the progress | |
| 40 | try { | |
| 41 | stageM essage = d oQuery(req uest, resu lt); | |
| 42 | ||
| 43 | // upd ate the re sponse mes sage and t rack the p rogress | |
| 44 | stageM essage.set MessageSta tus(result .getStatus ()); | |
| 45 | stageM essage.set MessageNam e(DataServ ice.messag eName); | |
| 46 | stageM essage.set CreatedDat e(querySta rtTime); | |
| 47 | ||
| 48 | // inc lude the s tatus and any error message if the extra ct status is 'ERROR' informati on | |
| 49 | stageM essage.set ExtractSta tus(result .getStatus ()); | |
| 50 | if ("E RROR".equa lsIgnoreCa se(stageMe ssage.getE xtractStat us())) { | |
| 51 | stageMes sage.setEr rorMessage (result.ge tDescripti on()); | |
| 52 | } | |
| 53 | ||
| 54 | stageM essage.set EndDate(ne w Date()); | |
| 55 | ||
| 56 | } ca tch (Excep tion ex) { | |
| 57 | result .setStatus (QueryServ iceRespons e.ERROR); | |
| 58 | result .setDescri ption(Stri ng.format( "Error sta ging messa ge status: %s", ex.g etMessage( ))); | |
| 59 | ||
| 60 | if( st ageMessage != null ) | |
| 61 | { | |
| 62 | stageMes sage.setEx tractStatu s(result.g etStatus() ); | |
| 63 | stageMes sage.setEr rorMessage (result.ge tDescripti on()); | |
| 64 | } | |
| 65 | } fi nally { | |
| 66 | if( st ageMessage != null ) | |
| 67 | { | |
| 68 | this.sta gingServic e.stageReq uest(stage Message); | |
| 69 | } | |
| 70 | } | |
| 71 | ||
| 72 | ||
| 73 | retu rn result; | |
| 74 | } | |
| 75 | ||
| 76 | pu blic Stage MessageCon trol getRe sponseMess age(QueryR equest req uest, | |
| 77 | QueryS erviceResp onse proce ssingResul t, String routingSta tus) { | |
| 78 | ||
| 79 | Stag eMessageCo ntrol resp onseMessag e = this.s tagingServ ice | |
| 80 | .findLat estStaging Request(re quest.getI cn(), | |
| 81 | re quest.getS tationNumb er(), | |
| 82 | Re freshDataS ervice.mes sageName, | |
| 83 | re quest.getE xtractType ()); | |
| 84 | ||
| 85 | if ( responseMe ssage == n ull) { | |
| 86 | respon seMessage = new Stag eMessageCo ntrol(Data Service.me ssageName, | |
| 87 | (long) pro cessingRes ult.getRec ordCount() , routingS tatus, | |
| 88 | StageMessa geType.RES PONSE, req uest.getIc n(), | |
| 89 | request.ge tStationNu mber(), re quest.getE xtractType (), | |
| 90 | request.ge tStartDate (), reques t.getEndDa te()); | |
| 91 | } | |
| 92 | ||
| 93 | // i nitiate th e response message c ontrol ide ntifier fr om the req uest. | |
| 94 | resp onseMessag e.setReque stMsgCtrlI d(request. getRequest MsgCtrlId( )); | |
| 95 | ||
| 96 | // s etup a req uest id if none was provided | |
| 97 | if ( request.ge tRequestMs gCtrlId() == 0) | |
| 98 | respon seMessage. setRequest MsgCtrlId( responseMe ssage.getI d()); | |
| 99 | ||
| 100 | resp onseMessag e.setRespo nseMsgCtrl Id(respons eMessage.g etId()); | |
| 101 | ||
| 102 | retu rn respons eMessage; | |
| 103 | } | |
| 104 | ||
| 105 | pu blic void setStaging Service(St agingServi ce staging Service) { | |
| 106 | this .stagingSe rvice = st agingServi ce; | |
| 107 | } | |
| 108 | ||
| 109 | pu blic void setTransfe rDAO(Trans ferDAO tra nsferDAO) { | |
| 110 | this .transferD AO = trans ferDAO; | |
| 111 | } | |
| 112 | ||
| 113 | pu blic Strin g getDefau ltStartDat e() { | |
| 114 | retu rn default StartDate; | |
| 115 | } | |
| 116 | ||
| 117 | pu blic void setDefault StartDate( String def aultStartD ate) { | |
| 118 | this .defaultSt artDate = defaultSta rtDate; | |
| 119 | } | |
| 120 | ||
| 121 | pu blic Boole an ignoreI cnCheck() | |
| 122 | { | |
| 123 | retu rn this.ig noreIcnChe ck; | |
| 124 | } | |
| 125 | ||
| 126 | pu blic void setIgnoreI cnCheck(Bo olean igno reIcnCheck ) { | |
| 127 | this .ignoreIcn Check = ig noreIcnChe ck; | |
| 128 | } | |
| 129 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.