Produced by Araxis Merge on 12/13/2018 10:35:27 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\fw\persistent\hibernate | CurrentTimestampAction.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\fw\persistent\hibernate | CurrentTimestampAction.java | Wed Dec 12 19:52:48 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 208 |
| 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 | ||
| 5 | package go v.va.med.f w.persiste nt.hiberna te; | |
| 6 | ||
| 7 | import jav ax.persist ence.Entit yManager; | |
| 8 | import jav ax.persist ence.Flush ModeType; | |
| 9 | import jav ax.persist ence.Query ; | |
| 10 | ||
| 11 | import org .apache.co mmons.lang .Validate; | |
| 12 | import org .springfra mework.bea ns.factory .Initializ ingBean; | |
| 13 | import org .springfra mework.ste reotype.Co mponent; | |
| 14 | ||
| 15 | /** | |
| 16 | * Initial javadoc f or class C urrentTime stampActio n. TODO - Add conten t here | |
| 17 | * | |
| 18 | * Created Aug 8, 20 05 5:59:59 PM | |
| 19 | * | |
| 20 | * @author vhaisa DNS | |
| 21 | */ | |
| 22 | @Component | |
| 23 | public cla ss Current TimestampA ction exte nds Abstra ctDAOActio n implemen ts Initial izingBean { | |
| 24 | pr ivate fina l String C URRENT_TIM ESTAMP = " ts"; | |
| 25 | ||
| 26 | pr ivate Stri ng dialect SpecificCu rrentTimes tampFuncti on; | |
| 27 | ||
| 28 | pr ivate Stri ng dialect SpecificTa ble; | |
| 29 | ||
| 30 | pr ivate Stri ng sqlQuer y; | |
| 31 | ||
| 32 | pr ivate Flus hModeType flushModeT ype = Flus hModeType. COMMIT; | |
| 33 | ||
| 34 | /* * | |
| 35 | * An instan ce of | |
| 36 | * / | |
| 37 | pu blic Curre ntTimestam pAction() { | |
| 38 | supe r(); | |
| 39 | dial ectSpecifi cCurrentTi mestampFun ction = "g etDate()"; | |
| 40 | } | |
| 41 | ||
| 42 | /* * | |
| 43 | * @return | |
| 44 | * / | |
| 45 | pu blic Flush ModeType g etFlushMod eType() { | |
| 46 | retu rn flushMo deType; | |
| 47 | } | |
| 48 | ||
| 49 | /* * | |
| 50 | * @param fl ushModeTyp e | |
| 51 | * / | |
| 52 | pu blic void setFlushMo deType(Flu shModeType flushMode Type) { | |
| 53 | this .flushMode Type = flu shModeType ; | |
| 54 | } | |
| 55 | ||
| 56 | /* * | |
| 57 | * @return R eturns the dialectSp ecificCurr entTimesta mpFunction . | |
| 58 | * / | |
| 59 | pu blic Strin g getDiale ctSpecific CurrentTim estampFunc tion() { | |
| 60 | retu rn dialect SpecificCu rrentTimes tampFuncti on; | |
| 61 | } | |
| 62 | ||
| 63 | /* * | |
| 64 | * @param di alectSpeci ficCurrent TimestampF unction | |
| 65 | * The dial ectSpecifi cCurrentTi mestampFun ction to s et. | |
| 66 | * / | |
| 67 | pu blic void setDialect SpecificCu rrentTimes tampFuncti on( | |
| 68 | String dialectSp ecificCurr entTimesta mpFunction ) { | |
| 69 | this .dialectSp ecificCurr entTimesta mpFunction = dialect SpecificCu rrentTimes tampFuncti on; | |
| 70 | } | |
| 71 | ||
| 72 | /* * | |
| 73 | * @return R eturns the dialectSp ecificTabl e. | |
| 74 | * / | |
| 75 | pu blic Strin g getDiale ctSpecific Table() { | |
| 76 | retu rn dialect SpecificTa ble; | |
| 77 | } | |
| 78 | ||
| 79 | /* * | |
| 80 | * @param di alectSpeci ficTable | |
| 81 | * The dial ectSpecifi cTable to set. | |
| 82 | * / | |
| 83 | pu blic void setDialect SpecificTa ble(String dialectSp ecificTabl e) { | |
| 84 | this .dialectSp ecificTabl e = dialec tSpecificT able; | |
| 85 | } | |
| 86 | ||
| 87 | pr otected Ob ject execu te(EntityM anager ent ityManager ) { | |
| 88 | // l et's not c ause unnec essary flu shing beca use of thi s query | |
| 89 | enti tyManager. setFlushMo de(this.ge tFlushMode Type()); | |
| 90 | Quer y query = (Query) en tityManage r.createNa tiveQuery( sqlQuery); | |
| 91 | Obje ct result = query.ge tSingleRes ult(); | |
| 92 | ||
| 93 | retu rn result; | |
| 94 | } | |
| 95 | ||
| 96 | pu blic void afterPrope rtiesSet() { | |
| 97 | Vali date.notNu ll(dialect SpecificCu rrentTimes tampFuncti on); | |
| 98 | ||
| 99 | // i nitialize query | |
| 100 | sqlQ uery = "se lect " + d ialectSpec ificCurren tTimestamp Function + " as " + CURRENT_TI MESTAMP; | |
| 101 | if ( dialectSpe cificTable != null) { | |
| 102 | sqlQue ry = sqlQu ery + " fr om " + dia lectSpecif icTable; | |
| 103 | } | |
| 104 | } | |
| 105 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.