Produced by Araxis Merge on 9/15/2018 10:46:48 PM 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 | MHV_2018.4.0.0.zip\2018.4.0.0\admin portal\mhv_source\mhv_admin\mhv-admin-main\src\main\java\gov\va\med\mhv\admin\converter | ActivityDTOConverter.java | Thu Aug 23 20:56:56 2018 UTC |
| 2 | MHV_2018.4.0.0.zip\2018.4.0.0\admin portal\mhv_source\mhv_admin\mhv-admin-main\src\main\java\gov\va\med\mhv\admin\converter | ActivityDTOConverter.java | Sat Sep 15 18:54:38 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 132 |
| 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 | package go v.va.med.m hv.admin.c onverter; | |
| 2 | ||
| 3 | import jav a.util.Arr ayList; | |
| 4 | import jav a.util.Lis t; | |
| 5 | ||
| 6 | import org .springfra mework.cor e.convert. converter. Converter; | |
| 7 | import org .springfra mework.ste reotype.Co mponent; | |
| 8 | ||
| 9 | import gov .va.med.mh v.admin.dt o.Activity DTO; | |
| 10 | import gov .va.med.mh v.admin.mo del.Activi ty; | |
| 11 | ||
| 12 | /** | |
| 13 | * @author DNS | |
| 14 | * | |
| 15 | */ | |
| 16 | @Component | |
| 17 | public cla ss Activit yDTOConver ter implem ents Conve rter<Activ ityDTO, Ac tivity> { | |
| 18 | ||
| 19 | pr ivate fina l static i nt DETAIL_ VALUE_MAX_ LENGTH = 2 55; | |
| 20 | ||
| 21 | @O verride | |
| 22 | pu blic Activ ity conver t(Activity DTO source ) { | |
| 23 | Acti vity desti nation = n ew Activit y(); | |
| 24 | dest ination.se tAction(so urce.getAc tion()); | |
| 25 | dest ination.se tActivityI d(source.g etActivity Id()); | |
| 26 | dest ination.se tActivityT ype(source .getActivi tyType()); | |
| 27 | dest ination.se tCompletio nTime(sour ce.getComp letionTime ()); | |
| 28 | if ( source.get DetailValu e() != nul l) { | |
| 29 | destin ation.setD etailValue (abbreviat eString(so urce.getDe tailValue( ), DETAIL_ VALUE_MAX_ LENGTH)); | |
| 30 | } | |
| 31 | dest ination.se tPerformer Type(sourc e.getPerfo rmerType() ); | |
| 32 | dest ination.se tStatus(so urce.getSt atus()); | |
| 33 | dest ination.se tUserProfi leId(sourc e.getUserP rofileId() ); | |
| 34 | retu rn destina tion; | |
| 35 | } | |
| 36 | ||
| 37 | pu blic Activ ityDTO con vert(Activ ity source ) { | |
| 38 | Acti vityDTO de stination = new Acti vityDTO(); | |
| 39 | dest ination.se tAction(so urce.getAc tion()); | |
| 40 | dest ination.se tActivityI d(source.g etActivity Id()); | |
| 41 | dest ination.se tActivityT ype(source .getActivi tyType()); | |
| 42 | dest ination.se tCompletio nTime(sour ce.getComp letionTime ()); | |
| 43 | if ( source.get DetailValu e() != nul l) { | |
| 44 | destin ation.setD etailValue (abbreviat eString(so urce.getDe tailValue( ), DETAIL_ VALUE_MAX_ LENGTH)); | |
| 45 | } | |
| 46 | dest ination.se tPerformer Type(sourc e.getPerfo rmerType() ); | |
| 47 | dest ination.se tStatus(so urce.getSt atus()); | |
| 48 | dest ination.se tUserProfi leId(sourc e.getUserP rofileId() ); | |
| 49 | retu rn destina tion; | |
| 50 | } | |
| 51 | ||
| 52 | pu blic List< ActivityDT O> convert List(List< Activity> source) { | |
| 53 | ||
| 54 | List <ActivityD TO> destin ation = ne w ArrayLis t<Activity DTO>(); | |
| 55 | for (Activity a : source ) { | |
| 56 | destin ation.add( convert(a) ); | |
| 57 | } | |
| 58 | retu rn destina tion; | |
| 59 | } | |
| 60 | ||
| 61 | pr ivate stat ic String abbreviate String(Str ing input, int maxLe ngth) { | |
| 62 | if ( input.leng th() <= ma xLength) | |
| 63 | return input; | |
| 64 | retu rn input.s ubstring(0 , maxLengt h - 2) + " .."; | |
| 65 | } | |
| 66 | ||
| 67 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.