Produced by Araxis Merge on 6/11/2019 10:54:13 AM 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 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\model | BaseEntityKey.java | Wed May 29 15:26:00 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\model | BaseEntityKey.java | Mon Jun 10 19:30:05 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 194 |
| 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 | * Copyrii ght 2005 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | package go v.va.med.f w.model; | |
| 5 | ||
| 6 | // Java cl asses | |
| 7 | import jav a.io.Seria lizable; | |
| 8 | ||
| 9 | import org .apache.co mmons.lang .ClassUtil s; | |
| 10 | import org .apache.co mmons.lang .Validate; | |
| 11 | import org .apache.co mmons.lang .builder.T oStringBui lder; | |
| 12 | ||
| 13 | /** | |
| 14 | * Base im plementati on of Enti tyKey | |
| 15 | * | |
| 16 | * Created Jul 19, 2 005 10:17: 32 AM | |
| 17 | * | |
| 18 | * @author DNS DN S
|
|
| 19 | */ | |
| 20 | public cla ss BaseEnt ityKey<T> extends Ab stractEnti ty impleme nts Versio nedEntityK ey<T> { | |
| 21 | ||
| 22 | /* * | |
| 23 | * A seriali ze version id | |
| 24 | * / | |
| 25 | pr ivate stat ic final l ong serial VersionUID = -806102 2674572324 212L; | |
| 26 | ||
| 27 | pr ivate stat ic String SUMMARY_SE PARATOR = "-"; | |
| 28 | ||
| 29 | /* * Wrapped identifier */ | |
| 30 | pr ivate Seri alizable k eyValue; | |
| 31 | ||
| 32 | /* * Class th at the ide ntifier is for */ | |
| 33 | pr ivate Clas s<T> entit yClass; | |
| 34 | ||
| 35 | /* * Optional version n umber to v erify agai nst */ | |
| 36 | pr ivate Inte ger versio n; | |
| 37 | ||
| 38 | pu blic BaseE ntityKey(S erializabl e keyValue , Class<T> entityCla ss) { | |
| 39 | Vali date.notNu ll(keyValu e, "Null k eyValue"); | |
| 40 | Vali date.notNu ll(entityC lass, "Nul l entityCl ass"); | |
| 41 | ||
| 42 | this .keyValue = keyValue ; | |
| 43 | this .entityCla ss = entit yClass; | |
| 44 | } | |
| 45 | ||
| 46 | pu blic BaseE ntityKey(S erializabl e keyValue , Integer version, C lass<T> en tityClass) { | |
| 47 | this (keyValue, entityCla ss); | |
| 48 | ||
| 49 | this .version = version; | |
| 50 | } | |
| 51 | ||
| 52 | /* | |
| 53 | * (non-Java doc) | |
| 54 | * | |
| 55 | * @see gov. va.med.fw. model.Enti tyKey#getK eyValue() | |
| 56 | * / | |
| 57 | pu blic Seria lizable ge tKeyValue( ) { | |
| 58 | retu rn keyValu e; | |
| 59 | } | |
| 60 | ||
| 61 | pr otected vo id buildTo String(ToS tringBuild er builder ) { | |
| 62 | buil der.append ("keyValue ", keyValu e); | |
| 63 | buil der.append ("entityCl ass", enti tyClass); | |
| 64 | } | |
| 65 | ||
| 66 | /* | |
| 67 | * (non-Java doc) | |
| 68 | * | |
| 69 | * @see gov. va.med.fw. model.Enti tyKey#getE ntityClass () | |
| 70 | * / | |
| 71 | pu blic Class <T> getEnt ityClass() { | |
| 72 | retu rn entityC lass; | |
| 73 | } | |
| 74 | ||
| 75 | pu blic Strin g getKeyVa lueAsStrin g() { | |
| 76 | // N o need to check for null since a key val ue must no t be null | |
| 77 | retu rn getKeyV alue().toS tring(); | |
| 78 | } | |
| 79 | ||
| 80 | pu blic Strin g getSumma ry() { | |
| 81 | retu rn getEnti tyClass() != null ? getKeyValu e() + SUMM ARY_SEPARA TOR | |
| 82 | + ClassU tils.getSh ortClassNa me(getEnti tyClass()) : getKeyV alueAsStri ng(); | |
| 83 | } | |
| 84 | ||
| 85 | /* | |
| 86 | * (non-Java doc) | |
| 87 | * | |
| 88 | * @see gov. va.med.fw. model.Vers ionedEntit yKey#getVe rsion() | |
| 89 | * / | |
| 90 | pu blic Integ er getVers ion() { | |
| 91 | retu rn version ; | |
| 92 | } | |
| 93 | ||
| 94 | /* * Provide capability to disabl e the vers ion check. */ | |
| 95 | pu blic void disableVer sionCheck( ) { | |
| 96 | vers ion = null ; | |
| 97 | } | |
| 98 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.