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 | Subscription.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 | Subscription.java | Tue Feb 27 14:29:58 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 526 |
| 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 = "SUBSC RIPTIONS") | |
| 34 | @XmlRootEl ement | |
| 35 | @NamedQuer ies({ | |
| 36 | @Named Query(name = "Subscr iption.fin dAll", que ry = "SELE CT s FROM Subscripti on s") | |
| 37 | , @Nam edQuery(na me = "Subs cription.f indBySubsc riptionId" , query = "SELECT s FROM Subsc ription s WHERE s.su bscription Id = :subs criptionId ") | |
| 38 | , @Nam edQuery(na me = "Subs cription.f indByResou rceId", qu ery = "SEL ECT s FROM Subscript ion s WHER E s.resour ceId = :re sourceId") | |
| 39 | , @Nam edQuery(na me = "Subs cription.f indByStatu s", query = "SELECT s FROM Sub scription s WHERE s. status = : status") | |
| 40 | , @Nam edQuery(na me = "Subs cription.f indByCrite ria", quer y = "SELEC T s FROM S ubscriptio n s WHERE s.criteria = :criter ia") | |
| 41 | , @Nam edQuery(na me = "Subs cription.f indByChann el", query = "SELECT s FROM Su bscription s WHERE s .channel = :channel" ) | |
| 42 | , @Nam edQuery(na me = "Subs cription.f indByUserI d", query = "SELECT s FROM Sub scription s WHERE s. userId = : userId") | |
| 43 | , @Nam edQuery(na me = "Subs cription.f indByUserN ame", quer y = "SELEC T s FROM S ubscriptio n s WHERE s.userName = :userNa me") | |
| 44 | , @Nam edQuery(na me = "Subs cription.f indByOrgan izationId" , query = "SELECT s FROM Subsc ription s WHERE s.or ganization Id = :orga nizationId ") | |
| 45 | , @Nam edQuery(na me = "Subs cription.f indByOrgan izationNam e", query = "SELECT s FROM Sub scription s WHERE s. organizati onName = : organizati onName") | |
| 46 | , @Nam edQuery(na me = "Subs cription.f indByPurpo seOfUse", query = "S ELECT s FR OM Subscri ption s WH ERE s.purp oseOfUse = :purposeO fUse") | |
| 47 | , @Nam edQuery(na me = "Subs cription.f indByCreat edTime", q uery = "SE LECT s FRO M Subscrip tion s WHE RE s.creat edTime = : createdTim e") | |
| 48 | , @Nam edQuery(na me = "Subs cription.f indByLastU pdatedTime ", query = "SELECT s FROM Subs cription s WHERE s.l astUpdated Time = :la stUpdatedT ime")}) | |
| 49 | @SequenceG enerator(n ame = "sub scriptionI dGenerator ", sequenc eName = "S UBSCRIPTIO N_ID_SEQ", allocatio nSize = 1) | |
| 50 | public cla ss Subscri ption impl ements Ser ializable | |
| 51 | { | |
| 52 | privat e static f inal long serialVers ionUID = 1 L; | |
| 53 | // @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 | |
| 54 | @Id | |
| 55 | @Basic (optional = false) | |
| 56 | @NotNu ll | |
| 57 | @Colum n(name = " SUBSCRIPTI ON_ID") | |
| 58 | @Gener atedValue( strategy = Generatio nType.SEQU ENCE, gene rator = "s ubscriptio nIdGenerat or") | |
| 59 | privat e BigDecim al subscri ptionId; | |
| 60 | @Size( max = 36) | |
| 61 | @Colum n(name = " RESOURCE_I D") | |
| 62 | privat e String r esourceId; | |
| 63 | @Size( max = 255) | |
| 64 | @Colum n(name = " STATUS") | |
| 65 | privat e String s tatus; | |
| 66 | @Size( max = 255) | |
| 67 | @Colum n(name = " CRITERIA") | |
| 68 | privat e String c riteria; | |
| 69 | @Size( max = 255) | |
| 70 | @Colum n(name = " CHANNEL") | |
| 71 | privat e String c hannel; | |
| 72 | @Size( max = 255) | |
| 73 | @Colum n(name = " USER_ID") | |
| 74 | privat e String u serId; | |
| 75 | @Size( max = 255) | |
| 76 | @Colum n(name = " USER_NAME" ) | |
| 77 | privat e String u serName; | |
| 78 | @Size( max = 255) | |
| 79 | @Colum n(name = " ORGANIZATI ON_ID") | |
| 80 | privat e String o rganizatio nId; | |
| 81 | @Size( max = 255) | |
| 82 | @Colum n(name = " ORGANIZATI ON_NAME") | |
| 83 | privat e String o rganizatio nName; | |
| 84 | @Size( max = 255) | |
| 85 | @Colum n(name = " PURPOSE_OF _USE") | |
| 86 | privat e String p urposeOfUs e; | |
| 87 | @Colum n(name = " CREATED_TI ME") | |
| 88 | @Tempo ral(Tempor alType.TIM ESTAMP) | |
| 89 | privat e Date cre atedTime; | |
| 90 | @Colum n(name = " LAST_UPDAT ED_TIME") | |
| 91 | @Tempo ral(Tempor alType.TIM ESTAMP) | |
| 92 | privat e Date las tUpdatedTi me; | |
| 93 | @Lob | |
| 94 | @Colum n(name = " FHIR_RESOU RCE") | |
| 95 | privat e byte[] f hirResourc e; | |
| 96 | ||
| 97 | public Subscript ion() | |
| 98 | { | |
| 99 | } | |
| 100 | ||
| 101 | public Subscript ion(BigDec imal subsc riptionId) | |
| 102 | { | |
| 103 | th is.subscri ptionId = subscripti onId; | |
| 104 | } | |
| 105 | ||
| 106 | public BigDecima l getSubsc riptionId( ) | |
| 107 | { | |
| 108 | re turn subsc riptionId; | |
| 109 | } | |
| 110 | ||
| 111 | public void setS ubscriptio nId(BigDec imal subsc riptionId) | |
| 112 | { | |
| 113 | th is.subscri ptionId = subscripti onId; | |
| 114 | } | |
| 115 | ||
| 116 | public String ge tResourceI d() | |
| 117 | { | |
| 118 | re turn resou rceId; | |
| 119 | } | |
| 120 | ||
| 121 | public void setR esourceId( String res ourceId) | |
| 122 | { | |
| 123 | th is.resourc eId = reso urceId; | |
| 124 | } | |
| 125 | ||
| 126 | public String ge tStatus() | |
| 127 | { | |
| 128 | re turn statu s; | |
| 129 | } | |
| 130 | ||
| 131 | public void setS tatus(Stri ng status) | |
| 132 | { | |
| 133 | th is.status = status; | |
| 134 | } | |
| 135 | ||
| 136 | public String ge tCriteria( ) | |
| 137 | { | |
| 138 | re turn crite ria; | |
| 139 | } | |
| 140 | ||
| 141 | public void setC riteria(St ring crite ria) | |
| 142 | { | |
| 143 | th is.criteri a = criter ia; | |
| 144 | } | |
| 145 | ||
| 146 | public String ge tChannel() | |
| 147 | { | |
| 148 | re turn chann el; | |
| 149 | } | |
| 150 | ||
| 151 | public void setC hannel(Str ing channe l) | |
| 152 | { | |
| 153 | th is.channel = channel ; | |
| 154 | } | |
| 155 | ||
| 156 | public String ge tUserId() | |
| 157 | { | |
| 158 | re turn userI d; | |
| 159 | } | |
| 160 | ||
| 161 | public void setU serId(Stri ng userId) | |
| 162 | { | |
| 163 | th is.userId = userId; | |
| 164 | } | |
| 165 | ||
| 166 | public String ge tUserName( ) | |
| 167 | { | |
| 168 | re turn userN ame; | |
| 169 | } | |
| 170 | ||
| 171 | public void setU serName(St ring userN ame) | |
| 172 | { | |
| 173 | th is.userNam e = userNa me; | |
| 174 | } | |
| 175 | ||
| 176 | public String ge tOrganizat ionId() | |
| 177 | { | |
| 178 | re turn organ izationId; | |
| 179 | } | |
| 180 | ||
| 181 | public void setO rganizatio nId(String organizat ionId) | |
| 182 | { | |
| 183 | th is.organiz ationId = organizati onId; | |
| 184 | } | |
| 185 | ||
| 186 | public String ge tOrganizat ionName() | |
| 187 | { | |
| 188 | re turn organ izationNam e; | |
| 189 | } | |
| 190 | ||
| 191 | public void setO rganizatio nName(Stri ng organiz ationName) | |
| 192 | { | |
| 193 | th is.organiz ationName = organiza tionName; | |
| 194 | } | |
| 195 | ||
| 196 | public String ge tPurposeOf Use() | |
| 197 | { | |
| 198 | re turn purpo seOfUse; | |
| 199 | } | |
| 200 | ||
| 201 | public void setP urposeOfUs e(String p urposeOfUs e) | |
| 202 | { | |
| 203 | th is.purpose OfUse = pu rposeOfUse ; | |
| 204 | } | |
| 205 | ||
| 206 | public Date getC reatedTime () | |
| 207 | { | |
| 208 | re turn creat edTime; | |
| 209 | } | |
| 210 | ||
| 211 | public void setC reatedTime (Date crea tedTime) | |
| 212 | { | |
| 213 | th is.created Time = cre atedTime; | |
| 214 | } | |
| 215 | ||
| 216 | public Date getL astUpdated Time() | |
| 217 | { | |
| 218 | re turn lastU pdatedTime ; | |
| 219 | } | |
| 220 | ||
| 221 | public void setL astUpdated Time(Date lastUpdate dTime) | |
| 222 | { | |
| 223 | th is.lastUpd atedTime = lastUpdat edTime; | |
| 224 | } | |
| 225 | ||
| 226 | public byte[] ge tFhirResou rce() | |
| 227 | { | |
| 228 | re turn fhirR esource; | |
| 229 | } | |
| 230 | ||
| 231 | public void setF hirResourc e(byte[] f hirResourc e) | |
| 232 | { | |
| 233 | th is.fhirRes ource = fh irResource ; | |
| 234 | } | |
| 235 | ||
| 236 | @Overr ide | |
| 237 | public int hashC ode() | |
| 238 | { | |
| 239 | in t hash = 0 ; | |
| 240 | ha sh += (sub scriptionI d != null ? subscrip tionId.has hCode() : 0); | |
| 241 | re turn hash; | |
| 242 | } | |
| 243 | ||
| 244 | @Overr ide | |
| 245 | public boolean e quals(Obje ct object) | |
| 246 | { | |
| 247 | // TODO: War ning - thi s method w on't work in the cas e the id f ields are not set | |
| 248 | if (!(object instanceo f Subscrip tion)) { | |
| 249 | return f alse; | |
| 250 | } | |
| 251 | Su bscription other = ( Subscripti on) object ; | |
| 252 | if ((this.su bscription Id == null && other. subscripti onId != nu ll) || (th is.subscri ptionId != null && ! this.subsc riptionId. equals(oth er.subscri ptionId))) { | |
| 253 | return f alse; | |
| 254 | } | |
| 255 | re turn true; | |
| 256 | } | |
| 257 | ||
| 258 | @Overr ide | |
| 259 | public String to String() | |
| 260 | { | |
| 261 | re turn "gov. va.med.nhi n.adapter. subscripti on.web.ent ity.Subscr iption[ su bscription Id=" + sub scriptionI d + " ]"; | |
| 262 | } | |
| 263 | ||
| 264 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.