Commit 8f76b5d0a923be663f339a0db02e99fd4e865d8b
Exists in
master
Merge branch 'tarefa-4207' into adm-1.12.0
Showing
7 changed files
with
7 additions
and
7 deletions
Show diff stats
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/AdicaoBemPrincipalController.java
@@ -84,7 +84,7 @@ public class AdicaoBemPrincipalController extends GenericController<AdicaoBemPri | @@ -84,7 +84,7 @@ public class AdicaoBemPrincipalController extends GenericController<AdicaoBemPri | ||
84 | }catch(Throwable e){ | 84 | }catch(Throwable e){ |
85 | if(e.getCause() instanceof ConstraintViolationException){ | 85 | if(e.getCause() instanceof ConstraintViolationException){ |
86 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 86 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
87 | - if(ex.getSQLException().getMessage().contains("codigo_unico_adicaobemprincipal")){ | 87 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
88 | uniqueConstraintViolate = true; | 88 | uniqueConstraintViolate = true; |
89 | }else{ | 89 | }else{ |
90 | throw e; | 90 | throw e; |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/BaixaController.java
@@ -95,7 +95,7 @@ public class BaixaController extends GenericController<BaixaPatrimonio> { | @@ -95,7 +95,7 @@ public class BaixaController extends GenericController<BaixaPatrimonio> { | ||
95 | }catch(Throwable e){ | 95 | }catch(Throwable e){ |
96 | if(e.getCause() instanceof ConstraintViolationException){ | 96 | if(e.getCause() instanceof ConstraintViolationException){ |
97 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 97 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
98 | - if(ex.getSQLException().getMessage().contains("codigo_unico_baixapatrimonio")){ | 98 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
99 | uniqueConstraintViolate = true; | 99 | uniqueConstraintViolate = true; |
100 | }else{ | 100 | }else{ |
101 | throw e; | 101 | throw e; |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/DefinicaoDetentorController.java
@@ -242,7 +242,7 @@ public class DefinicaoDetentorController extends GenericController<DefinicaoDete | @@ -242,7 +242,7 @@ public class DefinicaoDetentorController extends GenericController<DefinicaoDete | ||
242 | }catch(Throwable e){ | 242 | }catch(Throwable e){ |
243 | if(e.getCause() instanceof ConstraintViolationException){ | 243 | if(e.getCause() instanceof ConstraintViolationException){ |
244 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 244 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
245 | - if(ex.getSQLException().getMessage().contains("codigo_unico_definicaodetentor")){ | 245 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
246 | uniqueConstraintViolate = true; | 246 | uniqueConstraintViolate = true; |
247 | }else{ | 247 | }else{ |
248 | throw e; | 248 | throw e; |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/EntradaController.java
@@ -131,7 +131,7 @@ public class EntradaController extends GenericController<EntradaPatrimonio> { | @@ -131,7 +131,7 @@ public class EntradaController extends GenericController<EntradaPatrimonio> { | ||
131 | }catch(Throwable e){ | 131 | }catch(Throwable e){ |
132 | if(e.getCause() instanceof ConstraintViolationException){ | 132 | if(e.getCause() instanceof ConstraintViolationException){ |
133 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 133 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
134 | - if(ex.getSQLException().getMessage().contains("codigo_unico_entrada")){ | 134 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
135 | uniqueConstraintViolate = true; | 135 | uniqueConstraintViolate = true; |
136 | }else{ | 136 | }else{ |
137 | throw e; | 137 | throw e; |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/InventarioController.java
@@ -134,7 +134,7 @@ public class InventarioController extends GenericController<Inventario> { | @@ -134,7 +134,7 @@ public class InventarioController extends GenericController<Inventario> { | ||
134 | }catch(Throwable e){ | 134 | }catch(Throwable e){ |
135 | if(e.getCause() instanceof ConstraintViolationException){ | 135 | if(e.getCause() instanceof ConstraintViolationException){ |
136 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 136 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
137 | - if(ex.getSQLException().getMessage().contains("codigo_unico_inventario")){ | 137 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
138 | uniqueConstraintViolate = true; | 138 | uniqueConstraintViolate = true; |
139 | }else{ | 139 | }else{ |
140 | throw e; | 140 | throw e; |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/SaidaTemporariaController.java
@@ -119,7 +119,7 @@ public class SaidaTemporariaController extends GenericController<SaidaTemporaria | @@ -119,7 +119,7 @@ public class SaidaTemporariaController extends GenericController<SaidaTemporaria | ||
119 | }catch(Throwable e){ | 119 | }catch(Throwable e){ |
120 | if(e.getCause() instanceof ConstraintViolationException){ | 120 | if(e.getCause() instanceof ConstraintViolationException){ |
121 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 121 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
122 | - if(ex.getSQLException().getMessage().contains("codigo_unico_saidatemporaria")){ | 122 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
123 | uniqueConstraintViolate = true; | 123 | uniqueConstraintViolate = true; |
124 | }else{ | 124 | }else{ |
125 | throw e; | 125 | throw e; |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/SelecaoBemPatrimonialController.java
@@ -125,7 +125,7 @@ public class SelecaoBemPatrimonialController extends GenericController<SelecaoBe | @@ -125,7 +125,7 @@ public class SelecaoBemPatrimonialController extends GenericController<SelecaoBe | ||
125 | }catch(Throwable e){ | 125 | }catch(Throwable e){ |
126 | if(e.getCause() instanceof ConstraintViolationException){ | 126 | if(e.getCause() instanceof ConstraintViolationException){ |
127 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 127 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
128 | - if(ex.getSQLException().getMessage().contains("codigo_unico_selecaobempatrimonial")){ | 128 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
129 | uniqueConstraintViolate = true; | 129 | uniqueConstraintViolate = true; |
130 | }else{ | 130 | }else{ |
131 | throw e; | 131 | throw e; |