Produced by Araxis Merge on 12/13/2018 10:35:22 AM Eastern 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 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\ccht\model\common | Facility.java | Fri Dec 7 17:36:34 2018 UTC |
| 2 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\ccht\model\common | Facility.java | Wed Dec 12 22:33:38 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 242 |
| 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.c cht.model. common; | |
| 5 | ||
| 6 | import jav ax.persist ence.Colum n; | |
| 7 | import jav ax.persist ence.Entit y; | |
| 8 | import jav ax.persist ence.Gener atedValue; | |
| 9 | import jav ax.persist ence.Id; | |
| 10 | import jav ax.persist ence.JoinC olumn; | |
| 11 | import jav ax.persist ence.ManyT oOne; | |
| 12 | import jav ax.persist ence.Table ; | |
| 13 | import jav ax.persist ence.Trans ient; | |
| 14 | ||
| 15 | import gov .va.med.fw .model.loo kup.Lookup ; | |
| 16 | import gov .va.med.fw .util.Stri ngUtils; | |
| 17 | ||
| 18 | /** | |
| 19 | * @author DNS | |
| 20 | * | |
| 21 | */ | |
| 22 | @Entity | |
| 23 | @Table(sch ema="dbo", name="Fac ilities") | |
| 24 | public cla ss Facilit y implemen ts Lookup, Comparabl e<Facility > { | |
| 25 | ||
| 26 | pr ivate stat ic final l ong serial VersionUID = 3691312 1692796958 41L; | |
| 27 | ||
| 28 | pu blic stati c final Fa cility ALL _FACILITIE S = new Fa cility("Al l Faciliti es"); | |
| 29 | ||
| 30 | pr ivate Stri ng name; | |
| 31 | pr ivate Visn visn; | |
| 32 | pr ivate Stri ng station Number; | |
| 33 | pr ivate int id; | |
| 34 | ||
| 35 | pu blic Facil ity() { | |
| 36 | supe r(); | |
| 37 | } | |
| 38 | ||
| 39 | pr ivate Faci lity(Strin g name) { | |
| 40 | supe r(); | |
| 41 | this .name = na me; | |
| 42 | } | |
| 43 | ||
| 44 | @I d | |
| 45 | @G eneratedVa lue(strate gy = javax .persisten ce.Generat ionType.ID ENTITY) | |
| 46 | @C olumn(name = "ID", u nique = tr ue, nullab le = false ) | |
| 47 | pu blic int g etId() { | |
| 48 | retu rn id; | |
| 49 | } | |
| 50 | ||
| 51 | pu blic void setId(int id) { | |
| 52 | this .id = id; | |
| 53 | } | |
| 54 | ||
| 55 | @C olumn(name = "Facili ty_Name", length = 5 0) | |
| 56 | pu blic Strin g getName( ) { | |
| 57 | retu rn name; | |
| 58 | } | |
| 59 | ||
| 60 | pu blic void setName(St ring name) { | |
| 61 | this .name = na me; | |
| 62 | } | |
| 63 | ||
| 64 | @T ransient | |
| 65 | pu blic Strin g getCode( ) { | |
| 66 | retu rn station Number; | |
| 67 | } | |
| 68 | ||
| 69 | @M anyToOne | |
| 70 | @JoinC olumn(name ="VISN_ID" ) | |
| 71 | pu blic Visn getVisn() { | |
| 72 | retu rn visn; | |
| 73 | } | |
| 74 | ||
| 75 | pu blic void setVisn(Vi sn visn) { | |
| 76 | this .visn = vi sn; | |
| 77 | } | |
| 78 | ||
| 79 | @C olumn(name = "Facili ty_ID", le ngth = 50) | |
| 80 | pu blic Strin g getStati onNumber() { | |
| 81 | retu rn station Number; | |
| 82 | } | |
| 83 | ||
| 84 | pu blic void setStation Number(Str ing statio nNumber) { | |
| 85 | this .stationNu mber = sta tionNumber ; | |
| 86 | } | |
| 87 | ||
| 88 | @T ransient | |
| 89 | pu blic Strin g getDescr iption() { | |
| 90 | // T ODO: IMPLE MENT | |
| 91 | Stri ng desc = visn == nu ll ? "" : visn.getNa me().trim( ); | |
| 92 | if ( StringUtil s.isNotEmp ty(station Number)) { | |
| 93 | desc = desc + " Facility " + station Number; | |
| 94 | } | |
| 95 | desc = desc + " " + name ; | |
| 96 | retu rn desc.tr im(); | |
| 97 | } | |
| 98 | ||
| 99 | @T ransient | |
| 100 | pr ivate Inte ger getVis nId() { | |
| 101 | retu rn visn == null ? 0 : visn.get Id(); | |
| 102 | } | |
| 103 | ||
| 104 | pu blic int c ompareTo(F acility o) { | |
| 105 | ||
| 106 | if ( o == null) | |
| 107 | return 0; | |
| 108 | /* R elies on t he fact th at the IDs in the DB for each VISN align with the VISN numbe r - CPB */ | |
| 109 | ||
| 110 | int c = getVis nId().comp areTo(o.ge tVisnId()) ; | |
| 111 | if ( c == 0) { | |
| 112 | return (stationN umber + na me).compar eTo(o.stat ionNumber + o.name); | |
| 113 | } el se { | |
| 114 | return c; | |
| 115 | } | |
| 116 | } | |
| 117 | ||
| 118 | pu blic Strin g toString () { | |
| 119 | retu rn getDesc ription(); | |
| 120 | } | |
| 121 | ||
| 122 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.