Produced by Araxis Merge on 3/1/2018 12:13:17 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\entity | DocumentReference.java | Thu Feb 22 14:27:18 2018 UTC |
| 2 | ehealth_xchange_cif.zip\NHIN_adapter\AdapterSubscriptionServiceWEB\src\main\java\gov\va\med\nhin\adapter\subscription\web\entity | DocumentReference.java | Tue Feb 27 14:29:56 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 368 |
| 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.e ntity; | |
| 7 | ||
| 8 | import jav a.io.Seria lizable; | |
| 9 | import jav a.math.Big Decimal; | |
| 10 | import jav a.util.Dat e; | |
| 11 | import jav ax.persist ence.Basic ; | |
| 12 | import jav ax.persist ence.Colum n; | |
| 13 | import jav ax.persist ence.Entit y; | |
| 14 | import jav ax.persist ence.Gener atedValue; | |
| 15 | import jav ax.persist ence.Gener ationType; | |
| 16 | import jav ax.persist ence.Id; | |
| 17 | import jav ax.persist ence.Lob; | |
| 18 | import jav ax.persist ence.Named Queries; | |
| 19 | import jav ax.persist ence.Named Query; | |
| 20 | import jav ax.persist ence.Seque nceGenerat or; | |
| 21 | import jav ax.persist ence.Table ; | |
| 22 | import jav ax.persist ence.Tempo ral; | |
| 23 | import jav ax.persist ence.Tempo ralType; | |
| 24 | import jav ax.validat ion.constr aints.NotN ull; | |
| 25 | import jav ax.validat ion.constr aints.Size ; | |
| 26 | import jav ax.xml.bin d.annotati on.XmlRoot Element; | |
| 27 | ||
| 28 | /** | |
| 29 | * | |
| 30 | * @author DN S VAZQUD | |
| 31 | */ | |
| 32 | @Entity | |
| 33 | @Table(nam e = "DOCUM ENT_REFERE NCES") | |
| 34 | @XmlRootEl ement | |
| 35 | @NamedQuer ies({ | |
| 36 | @Named Query(name = "Docume ntReferenc e.findAll" , query = "SELECT d FROM Docum entReferen ce d") | |
| 37 | , @Nam edQuery(na me = "Docu mentRefere nce.findBy DocumentRe ferenceId" , query = "SELECT d FROM Docum entReferen ce d WHERE d.documen tReference Id = :docu mentRefere nceId") | |
| 38 | , @Nam edQuery(na me = "Docu mentRefere nce.findBy ResourceId ", query = "SELECT d FROM Docu mentRefere nce d WHER E d.resour ceId = :re sourceId") | |
| 39 | , @Nam edQuery(na me = "Docu mentRefere nce.findBy PatientId" , query = "SELECT d FROM Docum entReferen ce d WHERE d.patient Id = :pati entId") | |
| 40 | , @Nam edQuery(na me = "Docu mentRefere nce.findBy CreatedTim e", query = "SELECT d FROM Doc umentRefer ence d WHE RE d.creat edTime = : createdTim e") | |
| 41 | , @Nam edQuery(na me = "Docu mentRefere nce.findBy LastUpdate dTime", qu ery = "SEL ECT d FROM DocumentR eference d WHERE d.l astUpdated Time = :la stUpdatedT ime") | |
| 42 | , @Nam edQuery(na me = "Docu mentRefere nce.findBy PatientIdA ndLastUpda tedTime", query = "S ELECT d fr om Documen tReference d WHERE d .patientId = :patien tId AND d. lastUpdate dTime >= : lastUpdate dTime") | |
| 43 | }) | |
| 44 | @SequenceG enerator(n ame = "doc umentRefer enceIdGene rator", se quenceName = "DOCUME NT_REFEREN CE_ID_SEQ" , allocati onSize = 1 ) | |
| 45 | public cla ss Documen tReference implement s Serializ able | |
| 46 | { | |
| 47 | privat e static f inal long serialVers ionUID = 1 L; | |
| 48 | // @Ma x(value=?) @Min(val ue=?)//if you know r ange of yo ur decimal fields co nsider usi ng these a nnotations to enforc e field va lidation | |
| 49 | @Id | |
| 50 | @Basic (optional = false) | |
| 51 | @NotNu ll | |
| 52 | @Colum n(name = " DOCUMENT_R EFERENCE_I D") | |
| 53 | @Gener atedValue( strategy = Generatio nType.SEQU ENCE, gene rator = "d ocumentRef erenceIdGe nerator") | |
| 54 | privat e BigDecim al documen tReference Id; | |
| 55 | @Basic (optional = false) | |
| 56 | @NotNu ll | |
| 57 | @Size( min = 1, m ax = 36) | |
| 58 | @Colum n(name = " RESOURCE_I D") | |
| 59 | privat e String r esourceId; | |
| 60 | @Basic (optional = false) | |
| 61 | @NotNu ll | |
| 62 | @Size( min = 1, m ax = 17) | |
| 63 | @Colum n(name = " PATIENT_ID ") | |
| 64 | privat e String p atientId; | |
| 65 | @Basic (optional = false) | |
| 66 | @NotNu ll | |
| 67 | @Colum n(name = " CREATED_TI ME") | |
| 68 | @Tempo ral(Tempor alType.TIM ESTAMP) | |
| 69 | privat e Date cre atedTime; | |
| 70 | @Basic (optional = false) | |
| 71 | @NotNu ll | |
| 72 | @Colum n(name = " LAST_UPDAT ED_TIME") | |
| 73 | @Tempo ral(Tempor alType.TIM ESTAMP) | |
| 74 | privat e Date las tUpdatedTi me; | |
| 75 | @Lob | |
| 76 | @Colum n(name = " FHIR_RESOU RCE") | |
| 77 | privat e byte[] f hirResourc e; | |
| 78 | ||
| 79 | public DocumentR eference() | |
| 80 | { | |
| 81 | } | |
| 82 | ||
| 83 | public DocumentR eference(B igDecimal documentRe ferenceId) | |
| 84 | { | |
| 85 | th is.documen tReference Id = docum entReferen ceId; | |
| 86 | } | |
| 87 | ||
| 88 | public DocumentR eference(B igDecimal documentRe ferenceId, String re sourceId, String pat ientId, Da te created Time, Date lastUpdat edTime) | |
| 89 | { | |
| 90 | th is.documen tReference Id = docum entReferen ceId; | |
| 91 | th is.resourc eId = reso urceId; | |
| 92 | th is.patient Id = patie ntId; | |
| 93 | th is.created Time = cre atedTime; | |
| 94 | th is.lastUpd atedTime = lastUpdat edTime; | |
| 95 | } | |
| 96 | ||
| 97 | public BigDecima l getDocum entReferen ceId() | |
| 98 | { | |
| 99 | re turn docum entReferen ceId; | |
| 100 | } | |
| 101 | ||
| 102 | public void setD ocumentRef erenceId(B igDecimal documentRe ferenceId) | |
| 103 | { | |
| 104 | th is.documen tReference Id = docum entReferen ceId; | |
| 105 | } | |
| 106 | ||
| 107 | public String ge tResourceI d() | |
| 108 | { | |
| 109 | re turn resou rceId; | |
| 110 | } | |
| 111 | ||
| 112 | public void setR esourceId( String res ourceId) | |
| 113 | { | |
| 114 | th is.resourc eId = reso urceId; | |
| 115 | } | |
| 116 | ||
| 117 | public String ge tPatientId () | |
| 118 | { | |
| 119 | re turn patie ntId; | |
| 120 | } | |
| 121 | ||
| 122 | public void setP atientId(S tring pati entId) | |
| 123 | { | |
| 124 | th is.patient Id = patie ntId; | |
| 125 | } | |
| 126 | ||
| 127 | public Date getC reatedTime () | |
| 128 | { | |
| 129 | re turn creat edTime; | |
| 130 | } | |
| 131 | ||
| 132 | public void setC reatedTime (Date crea tedTime) | |
| 133 | { | |
| 134 | th is.created Time = cre atedTime; | |
| 135 | } | |
| 136 | ||
| 137 | public Date getL astUpdated Time() | |
| 138 | { | |
| 139 | re turn lastU pdatedTime ; | |
| 140 | } | |
| 141 | ||
| 142 | public void setL astUpdated Time(Date lastUpdate dTime) | |
| 143 | { | |
| 144 | th is.lastUpd atedTime = lastUpdat edTime; | |
| 145 | } | |
| 146 | ||
| 147 | public byte[] ge tFhirResou rce() | |
| 148 | { | |
| 149 | re turn fhirR esource; | |
| 150 | } | |
| 151 | ||
| 152 | public void setF hirResourc e(byte[] f hirResourc e) | |
| 153 | { | |
| 154 | th is.fhirRes ource = fh irResource ; | |
| 155 | } | |
| 156 | ||
| 157 | @Overr ide | |
| 158 | public int hashC ode() | |
| 159 | { | |
| 160 | in t hash = 0 ; | |
| 161 | ha sh += (doc umentRefer enceId != null ? doc umentRefer enceId.has hCode() : 0); | |
| 162 | re turn hash; | |
| 163 | } | |
| 164 | ||
| 165 | @Overr ide | |
| 166 | public boolean e quals(Obje ct object) | |
| 167 | { | |
| 168 | // TODO: War ning - thi s method w on't work in the cas e the id f ields are not set | |
| 169 | if (!(object instanceo f Document Reference) ) { | |
| 170 | return f alse; | |
| 171 | } | |
| 172 | Do cumentRefe rence othe r = (Docum entReferen ce) object ; | |
| 173 | if ((this.do cumentRefe renceId == null && o ther.docum entReferen ceId != nu ll) || (th is.documen tReference Id != null && !this. documentRe ferenceId. equals(oth er.documen tReference Id))) { | |
| 174 | return f alse; | |
| 175 | } | |
| 176 | re turn true; | |
| 177 | } | |
| 178 | ||
| 179 | @Overr ide | |
| 180 | public String to String() | |
| 181 | { | |
| 182 | re turn "gov. va.med.nhi n.adapter. subscripti on.web.dao .DocumentR eference[ documentRe ferenceId= " + docume ntReferenc eId + " ]" ; | |
| 183 | } | |
| 184 | ||
| 185 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.