Produced by Araxis Merge on 3/1/2018 12:13:18 PM Central 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ehealth_xchange_cif.zip\NHIN_adapter\AdapterSubscriptionServiceWEB\src\main\java\gov\va\med\nhin\adapter\subscription\web\proxy\provider | ResourceProvider.java | Thu Feb 22 14:27:20 2018 UTC |
| 2 | ehealth_xchange_cif.zip\NHIN_adapter\AdapterSubscriptionServiceWEB\src\main\java\gov\va\med\nhin\adapter\subscription\web\proxy\provider | ResourceProvider.java | Tue Feb 27 14:30:09 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 136 |
| 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 | * To chan ge this li cense head er, choose License H eaders in Project Pr operties. | |
| 3 | * To chan ge this te mplate fil e, choose Tools | Te mplates | |
| 4 | * and ope n the temp late in th e editor. | |
| 5 | */ | |
| 6 | package go v.va.med.n hin.adapte r.subscrip tion.web.p roxy.provi der; | |
| 7 | ||
| 8 | import ca. uhn.fhir.u til.Elemen tUtil; | |
| 9 | import jav a.util.Dat e; | |
| 10 | import jav a.util.UUI D; | |
| 11 | import jav a.util.fun ction.Func tion; | |
| 12 | import org .hl7.fhir. dstu3.mode l.IdType; | |
| 13 | import org .hl7.fhir. dstu3.mode l.Resource ; | |
| 14 | ||
| 15 | /** | |
| 16 | * | |
| 17 | * @author DN S VAZQUD | |
| 18 | */ | |
| 19 | public int erface Res ourceProvi der<T exte nds Resour ce> | |
| 20 | { | |
| 21 | defaul t Long cre ate(T reso urce) | |
| 22 | { | |
| 23 | if (!resourc e.hasIdEle ment()) { | |
| 24 | resource .setIdElem ent(new Id Type(resou rce.fhirTy pe(), UUID .randomUUI D().toStri ng())); | |
| 25 | } | |
| 26 | re source.get Meta().set LastUpdate d(new Date ()); | |
| 27 | re source.get Meta().set VersionId( "0"); | |
| 28 | re turn -1L; | |
| 29 | } | |
| 30 | ||
| 31 | T read (Long id); | |
| 32 | ||
| 33 | defaul t T readAn dLock(Long id) | |
| 34 | { | |
| 35 | re turn read( id); | |
| 36 | } | |
| 37 | ||
| 38 | defaul t boolean readWithUp date(Long id, Functi on<T, Bool ean> funct ion) | |
| 39 | { | |
| 40 | bo olean ret = false; | |
| 41 | T resource = readAndLo ck(id); | |
| 42 | if (resource != null) { | |
| 43 | ret = fu nction.app ly(resourc e); | |
| 44 | if (ret) { | |
| 45 | upda te(id, res ource); | |
| 46 | } | |
| 47 | } | |
| 48 | re turn ret; | |
| 49 | } | |
| 50 | ||
| 51 | T read (IdType id ); | |
| 52 | ||
| 53 | defaul t void upd ate(Long i d, T resou rce) | |
| 54 | { | |
| 55 | Da te d = new Date(); | |
| 56 | re source.get Meta().set LastUpdate d(d); | |
| 57 | ||
| 58 | St ring versi onID = res ource.getM eta().getV ersionId() ; | |
| 59 | if (ElementU til.isEmpt y(versionI D)) { | |
| 60 | versionI D = "1"; | |
| 61 | } | |
| 62 | el se { | |
| 63 | versionI D = Intege r.toString (Integer.p arseInt(ve rsionID) + 1); | |
| 64 | } | |
| 65 | re source.get Meta().set VersionId( versionID) ; | |
| 66 | } | |
| 67 | ||
| 68 | T dele te(Long id ); | |
| 69 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.