Produced by Araxis Merge on 12/20/2017 5:56:12 PM 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 | Genisis_2.0_v6_bld6.zip\Source Code\UI\Services\src\main\java\gov\va\genisis2\converter | RequestTypeConverter.java | Thu Dec 14 19:57:07 2017 UTC |
| 2 | Genisis_2.0_v6_bld6.zip\Source Code\UI\Services\src\main\java\gov\va\genisis2\converter | RequestTypeConverter.java | Wed Dec 20 22:09:16 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 134 |
| 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.genis is2.conver ter; | |
| 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.genisi s2.dto.Req uestTypeDT O; | |
| 10 | import gov .va.genisi s2.model.R equestType ; | |
| 11 | ||
| 12 | /** | |
| 13 | * This cl ass is use d to conve rt Request TypeDTO to RequestTy pe entity and vice-v ersa. | |
| 14 | * | |
| 15 | * @author P II | |
| 16 | * | |
| 17 | */ | |
| 18 | @Component | |
| 19 | public cla ss Request TypeConver ter implem ents Conve rter<Reque stType, Re questTypeD TO> { | |
| 20 | ||
| 21 | @O verride | |
| 22 | pu blic Reque stTypeDTO convert(Re questType requestTyp e) { | |
| 23 | Requ estTypeDTO requestTy peDto = ne w RequestT ypeDTO(); | |
| 24 | ||
| 25 | requ estTypeDto .setId(req uestType.g etId()); | |
| 26 | requ estTypeDto .setDescri ption(requ estType.ge tDescripti on()); | |
| 27 | ||
| 28 | retu rn request TypeDto; | |
| 29 | } | |
| 30 | ||
| 31 | pu blic Reque stType con vert(Reque stTypeDTO requestTyp eDto) { | |
| 32 | Requ estType re questType = new Requ estType(); | |
| 33 | ||
| 34 | requ estType.se tId(reques tTypeDto.g etId()); | |
| 35 | requ estType.se tDescripti on(request TypeDto.ge tDescripti on()); | |
| 36 | ||
| 37 | retu rn request Type; | |
| 38 | } | |
| 39 | ||
| 40 | pu blic List< RequestTyp eDTO> conv ertRequest Types(List <RequestTy pe> reques tTypes) { | |
| 41 | List <RequestTy peDTO> req uestTypesD tos = null ; | |
| 42 | if ( !requestTy pes.isEmpt y()) { | |
| 43 | reques tTypesDtos = new Arr ayList<>() ; | |
| 44 | for (R equestType RequestTy pe : reque stTypes) { | |
| 45 | requestT ypesDtos.a dd(convert (RequestTy pe)); | |
| 46 | } | |
| 47 | } | |
| 48 | retu rn request TypesDtos; | |
| 49 | } | |
| 50 | ||
| 51 | ||
| 52 | pu blic List< RequestTyp eDTO> conv ertRequest Types(List <RequestTy pe> reques tTypes, in t roleType Id) { | |
| 53 | List <RequestTy peDTO> req uestTypesD tos = null ; | |
| 54 | if ( !requestTy pes.isEmpt y()) { | |
| 55 | reques tTypesDtos = new Arr ayList<>() ; | |
| 56 | for (R equestType RequestTy pe : reque stTypes) { | |
| 57 | if (role TypeId == 4) { | |
| 58 | if (Reques tType.getI d() == 2) { | |
| 59 | re questTypes Dtos.add(c onvert(Req uestType)) ; | |
| 60 | } | |
| 61 | } else { | |
| 62 | requestTyp esDtos.add (convert(R equestType )); | |
| 63 | } | |
| 64 | } | |
| 65 | } | |
| 66 | retu rn request TypesDtos; | |
| 67 | } | |
| 68 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.