Commit 8f76b5d0a923be663f339a0db02e99fd4e865d8b

Authored by Ronan Tavares Camargo
2 parents 9827c42e 992e5076
Exists in master

Merge branch 'tarefa-4207' into adm-1.12.0

citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/AdicaoBemPrincipalController.java
... ... @@ -84,7 +84,7 @@ public class AdicaoBemPrincipalController extends GenericController<AdicaoBemPri
84 84 }catch(Throwable e){
85 85 if(e.getCause() instanceof ConstraintViolationException){
86 86 ConstraintViolationException ex = (ConstraintViolationException) e.getCause();
87   - if(ex.getSQLException().getMessage().contains("codigo_unico_adicaobemprincipal")){
  87 + if(ex.getSQLException().getMessage().contains("codigo_unico")){
88 88 uniqueConstraintViolate = true;
89 89 }else{
90 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 95 }catch(Throwable e){
96 96 if(e.getCause() instanceof ConstraintViolationException){
97 97 ConstraintViolationException ex = (ConstraintViolationException) e.getCause();
98   - if(ex.getSQLException().getMessage().contains("codigo_unico_baixapatrimonio")){
  98 + if(ex.getSQLException().getMessage().contains("codigo_unico")){
99 99 uniqueConstraintViolate = true;
100 100 }else{
101 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 242 }catch(Throwable e){
243 243 if(e.getCause() instanceof ConstraintViolationException){
244 244 ConstraintViolationException ex = (ConstraintViolationException) e.getCause();
245   - if(ex.getSQLException().getMessage().contains("codigo_unico_definicaodetentor")){
  245 + if(ex.getSQLException().getMessage().contains("codigo_unico")){
246 246 uniqueConstraintViolate = true;
247 247 }else{
248 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 131 }catch(Throwable e){
132 132 if(e.getCause() instanceof ConstraintViolationException){
133 133 ConstraintViolationException ex = (ConstraintViolationException) e.getCause();
134   - if(ex.getSQLException().getMessage().contains("codigo_unico_entrada")){
  134 + if(ex.getSQLException().getMessage().contains("codigo_unico")){
135 135 uniqueConstraintViolate = true;
136 136 }else{
137 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 134 }catch(Throwable e){
135 135 if(e.getCause() instanceof ConstraintViolationException){
136 136 ConstraintViolationException ex = (ConstraintViolationException) e.getCause();
137   - if(ex.getSQLException().getMessage().contains("codigo_unico_inventario")){
  137 + if(ex.getSQLException().getMessage().contains("codigo_unico")){
138 138 uniqueConstraintViolate = true;
139 139 }else{
140 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 119 }catch(Throwable e){
120 120 if(e.getCause() instanceof ConstraintViolationException){
121 121 ConstraintViolationException ex = (ConstraintViolationException) e.getCause();
122   - if(ex.getSQLException().getMessage().contains("codigo_unico_saidatemporaria")){
  122 + if(ex.getSQLException().getMessage().contains("codigo_unico")){
123 123 uniqueConstraintViolate = true;
124 124 }else{
125 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 125 }catch(Throwable e){
126 126 if(e.getCause() instanceof ConstraintViolationException){
127 127 ConstraintViolationException ex = (ConstraintViolationException) e.getCause();
128   - if(ex.getSQLException().getMessage().contains("codigo_unico_selecaobempatrimonial")){
  128 + if(ex.getSQLException().getMessage().contains("codigo_unico")){
129 129 uniqueConstraintViolate = true;
130 130 }else{
131 131 throw e;
... ...