Commit bfc2ddfcff0101d9d6add7c4752381ed51f9a2a5
1 parent
82308a03
Exists in
master
Redmine #4207
Showing
9 changed files
with
218 additions
and
18 deletions
Show diff stats
citgrp-patrimonio-api/src/main/java/br/com/centralit/api/model/SaidaTemporaria.java
1 | 1 | package br.com.centralit.api.model; |
2 | 2 | |
3 | +import java.util.ArrayList; | |
3 | 4 | import java.util.Calendar; |
4 | 5 | import java.util.Collection; |
5 | 6 | |
... | ... | @@ -17,6 +18,7 @@ import javax.persistence.Temporal; |
17 | 18 | import javax.persistence.TemporalType; |
18 | 19 | import javax.persistence.UniqueConstraint; |
19 | 20 | |
21 | +import org.apache.commons.beanutils.BeanUtilsBean2; | |
20 | 22 | import org.hibernate.envers.Audited; |
21 | 23 | import org.hibernate.envers.NotAudited; |
22 | 24 | |
... | ... | @@ -406,5 +408,15 @@ public class SaidaTemporaria extends PersistentObjectAuditOrganizacao { |
406 | 408 | |
407 | 409 | this.saidaTemporariaItens = saidaTemporariaItens; |
408 | 410 | } |
411 | + | |
412 | + public static SaidaTemporaria clone(SaidaTemporaria objeto) throws Exception{ | |
413 | + SaidaTemporaria saidaTempoaria = (SaidaTemporaria) BeanUtilsBean2.getInstance().cloneBean(objeto); | |
414 | + | |
415 | + saidaTempoaria.setSaidaTemporariaItens(new ArrayList<SaidaTemporariaItem>()); | |
416 | + for(SaidaTemporariaItem item : objeto.getSaidaTemporariaItens()){ | |
417 | + saidaTempoaria.getSaidaTemporariaItens().add((SaidaTemporariaItem) BeanUtilsBean2.getInstance().cloneBean(item)); | |
418 | + } | |
419 | + return saidaTempoaria; | |
420 | + } | |
409 | 421 | |
410 | 422 | } | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/AdicaoBemPrincipalController.java
... | ... | @@ -2,6 +2,8 @@ package br.com.centralit.controller; |
2 | 2 | |
3 | 3 | import java.util.List; |
4 | 4 | |
5 | +import org.apache.commons.lang3.SerializationUtils; | |
6 | +import org.hibernate.exception.ConstraintViolationException; | |
5 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
6 | 8 | import org.springframework.stereotype.Controller; |
7 | 9 | import org.springframework.web.bind.annotation.RequestBody; |
... | ... | @@ -66,6 +68,37 @@ public class AdicaoBemPrincipalController extends GenericController<AdicaoBemPri |
66 | 68 | |
67 | 69 | return responseBody; |
68 | 70 | } |
71 | + | |
72 | + @RequestMapping(method = RequestMethod.POST, value = "") | |
73 | + @ResponseBody | |
74 | + public ResponseBodyWrapper save(@RequestBody AdicaoBemPrincipal entity) throws Exception{ | |
75 | + boolean uniqueConstraintViolate = true; | |
76 | + | |
77 | + AdicaoBemPrincipal adicaoBemPrincipal = new AdicaoBemPrincipal(); | |
78 | + | |
79 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
80 | + for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ | |
81 | + try{ | |
82 | + adicaoBemPrincipal = this.adicaoBemPrincipalService.save(SerializationUtils.clone(entity)); | |
83 | + uniqueConstraintViolate = false; | |
84 | + }catch(Throwable e){ | |
85 | + if(e.getCause() instanceof ConstraintViolationException){ | |
86 | + ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | |
87 | + if(ex.getSQLException().getMessage().contains("codigo_unico_adicaobemprincipal")){ | |
88 | + uniqueConstraintViolate = true; | |
89 | + }else{ | |
90 | + throw e; | |
91 | + } | |
92 | + }else{ | |
93 | + throw e; | |
94 | + } | |
95 | + } | |
96 | + } | |
97 | + | |
98 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(adicaoBemPrincipal, getEditView()); | |
99 | + | |
100 | + return responseBody; | |
101 | + } | |
69 | 102 | |
70 | 103 | /** |
71 | 104 | * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/BaixaController.java
1 | 1 | package br.com.centralit.controller; |
2 | 2 | |
3 | +import org.apache.commons.lang3.SerializationUtils; | |
4 | +import org.hibernate.exception.ConstraintViolationException; | |
3 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
4 | 6 | import org.springframework.stereotype.Controller; |
7 | +import org.springframework.web.bind.annotation.RequestBody; | |
5 | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
6 | 9 | import org.springframework.web.bind.annotation.RequestMethod; |
7 | 10 | import org.springframework.web.bind.annotation.RequestParam; |
... | ... | @@ -9,7 +12,6 @@ import org.springframework.web.bind.annotation.ResponseBody; |
9 | 12 | |
10 | 13 | import br.com.centralit.api.model.BaixaPatrimonio; |
11 | 14 | import br.com.centralit.api.service.BaixaService; |
12 | -import br.com.centralit.api.service.InventarioService; | |
13 | 15 | import br.com.centralit.framework.controller.GenericController; |
14 | 16 | import br.com.centralit.framework.json.ResponseBodyWrapper; |
15 | 17 | import br.com.centralit.framework.json.Views; |
... | ... | @@ -77,6 +79,37 @@ public class BaixaController extends GenericController<BaixaPatrimonio> { |
77 | 79 | |
78 | 80 | return Views.BaixaListView.class; |
79 | 81 | } |
82 | + | |
83 | + @RequestMapping(method = RequestMethod.POST, value = "") | |
84 | + @ResponseBody | |
85 | + public ResponseBodyWrapper save(@RequestBody BaixaPatrimonio entity) throws Exception{ | |
86 | + boolean uniqueConstraintViolate = true; | |
87 | + | |
88 | + BaixaPatrimonio baixa = new BaixaPatrimonio(); | |
89 | + | |
90 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
91 | + for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ | |
92 | + try{ | |
93 | + baixa = this.baixaService.save(SerializationUtils.clone(entity)); | |
94 | + uniqueConstraintViolate = false; | |
95 | + }catch(Throwable e){ | |
96 | + if(e.getCause() instanceof ConstraintViolationException){ | |
97 | + ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | |
98 | + if(ex.getSQLException().getMessage().contains("codigo_unico_baixapatrimonio")){ | |
99 | + uniqueConstraintViolate = true; | |
100 | + }else{ | |
101 | + throw e; | |
102 | + } | |
103 | + }else{ | |
104 | + throw e; | |
105 | + } | |
106 | + } | |
107 | + } | |
108 | + | |
109 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(baixa, getEditView()); | |
110 | + | |
111 | + return responseBody; | |
112 | + } | |
80 | 113 | |
81 | 114 | @RequestMapping(value = "/findIdsBemPatrimonialPorData", method = RequestMethod.GET, produces = "application/json") |
82 | 115 | @ResponseBody | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/DefinicaoDetentorController.java
... | ... | @@ -23,9 +23,12 @@ import net.sf.jasperreports.engine.JasperReport; |
23 | 23 | import net.sf.jasperreports.engine.design.JasperDesign; |
24 | 24 | import net.sf.jasperreports.engine.xml.JRXmlLoader; |
25 | 25 | |
26 | +import org.apache.commons.lang3.SerializationUtils; | |
27 | +import org.hibernate.exception.ConstraintViolationException; | |
26 | 28 | import org.springframework.beans.factory.annotation.Autowired; |
27 | 29 | import org.springframework.security.core.context.SecurityContextHolder; |
28 | 30 | import org.springframework.stereotype.Controller; |
31 | +import org.springframework.web.bind.annotation.RequestBody; | |
29 | 32 | import org.springframework.web.bind.annotation.RequestMapping; |
30 | 33 | import org.springframework.web.bind.annotation.RequestMethod; |
31 | 34 | import org.springframework.web.bind.annotation.RequestParam; |
... | ... | @@ -40,6 +43,7 @@ import br.com.centralit.api.service.InternacionalizacaoService; |
40 | 43 | import br.com.centralit.api.service.UsuarioService; |
41 | 44 | import br.com.centralit.framework.controller.GenericController; |
42 | 45 | import br.com.centralit.framework.controller.ReportController; |
46 | +import br.com.centralit.framework.json.ResponseBodyWrapper; | |
43 | 47 | import br.com.centralit.framework.json.Views; |
44 | 48 | import br.com.centralit.framework.model.Dominio; |
45 | 49 | import br.com.centralit.framework.model.Usuario; |
... | ... | @@ -222,6 +226,37 @@ public class DefinicaoDetentorController extends GenericController<DefinicaoDete |
222 | 226 | } |
223 | 227 | |
224 | 228 | } |
229 | + | |
230 | + @RequestMapping(method = RequestMethod.POST, value = "") | |
231 | + @ResponseBody | |
232 | + public ResponseBodyWrapper save(@RequestBody DefinicaoDetentor entity) throws Exception{ | |
233 | + boolean uniqueConstraintViolate = true; | |
234 | + | |
235 | + DefinicaoDetentor definicaoDetentor = new DefinicaoDetentor(); | |
236 | + | |
237 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
238 | + for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ | |
239 | + try{ | |
240 | + definicaoDetentor = this.definicaoDetentorService.save(SerializationUtils.clone(entity)); | |
241 | + uniqueConstraintViolate = false; | |
242 | + }catch(Throwable e){ | |
243 | + if(e.getCause() instanceof ConstraintViolationException){ | |
244 | + ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | |
245 | + if(ex.getSQLException().getMessage().contains("codigo_unico_definicaodetentor")){ | |
246 | + uniqueConstraintViolate = true; | |
247 | + }else{ | |
248 | + throw e; | |
249 | + } | |
250 | + }else{ | |
251 | + throw e; | |
252 | + } | |
253 | + } | |
254 | + } | |
255 | + | |
256 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(definicaoDetentor, getEditView()); | |
257 | + | |
258 | + return responseBody; | |
259 | + } | |
225 | 260 | |
226 | 261 | @Override |
227 | 262 | public Class<Views.DefinicaoDetentorListView> getListView() { | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/EntradaController.java
1 | 1 | package br.com.centralit.controller; |
2 | 2 | |
3 | -import java.math.BigDecimal; | |
4 | 3 | import java.util.ArrayList; |
5 | 4 | import java.util.List; |
6 | 5 | |
6 | +import org.apache.commons.lang3.SerializationUtils; | |
7 | +import org.hibernate.exception.ConstraintViolationException; | |
7 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
8 | 9 | import org.springframework.stereotype.Controller; |
9 | 10 | import org.springframework.web.bind.annotation.PathVariable; |
... | ... | @@ -22,7 +23,6 @@ import br.com.centralit.api.service.EntradaService; |
22 | 23 | import br.com.centralit.framework.controller.GenericController; |
23 | 24 | import br.com.centralit.framework.json.ResponseBodyWrapper; |
24 | 25 | import br.com.centralit.framework.json.Views; |
25 | -import br.com.centralit.framework.util.UtilObjeto; | |
26 | 26 | import br.com.centralit.framework.view.ResultResponseVH; |
27 | 27 | |
28 | 28 | /** |
... | ... | @@ -115,6 +115,38 @@ public class EntradaController extends GenericController<EntradaPatrimonio> { |
115 | 115 | this.entradaService.uploadAnexoCaracteristica(file, idEntradaItem); |
116 | 116 | |
117 | 117 | } |
118 | + | |
119 | + @RequestMapping(method = RequestMethod.POST, value = "") | |
120 | + @ResponseBody | |
121 | + public ResponseBodyWrapper save(@RequestBody EntradaPatrimonio entity) throws Exception{ | |
122 | + boolean uniqueConstraintViolate = true; | |
123 | + | |
124 | + EntradaPatrimonio entrada = new EntradaPatrimonio(); | |
125 | + | |
126 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
127 | + for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ | |
128 | + try{ | |
129 | + entrada = this.entradaService.save(SerializationUtils.clone(entity)); | |
130 | + uniqueConstraintViolate = false; | |
131 | + }catch(Throwable e){ | |
132 | + if(e.getCause() instanceof ConstraintViolationException){ | |
133 | + ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | |
134 | + if(ex.getSQLException().getMessage().contains("codigo_unico_entrada")){ | |
135 | + uniqueConstraintViolate = true; | |
136 | + }else{ | |
137 | + throw e; | |
138 | + } | |
139 | + }else{ | |
140 | + throw e; | |
141 | + } | |
142 | + } | |
143 | + } | |
144 | + | |
145 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(entrada, getEditView()); | |
146 | + | |
147 | + return responseBody; | |
148 | + } | |
149 | + | |
118 | 150 | |
119 | 151 | /** |
120 | 152 | * Método responsável por listar <code>Entrada</code> por codigo e <code>Organizacao</code> | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/InventarioController.java
... | ... | @@ -2,6 +2,8 @@ package br.com.centralit.controller; |
2 | 2 | |
3 | 3 | import java.util.List; |
4 | 4 | |
5 | +import org.apache.commons.lang3.SerializationUtils; | |
6 | +import org.hibernate.exception.ConstraintViolationException; | |
5 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
6 | 8 | import org.springframework.stereotype.Controller; |
7 | 9 | import org.springframework.web.bind.annotation.RequestBody; |
... | ... | @@ -120,8 +122,30 @@ public class InventarioController extends GenericController<Inventario> { |
120 | 122 | @RequestMapping(method = RequestMethod.POST, value = "/saveInventario") |
121 | 123 | @ResponseBody |
122 | 124 | public ResponseBodyWrapper saveInventario(@RequestBody InventarioVH inventarioVH) throws Exception { |
123 | - | |
124 | - ResponseBodyWrapper responseBody = new ResponseBodyWrapper(this.inventarioService.save(inventarioVH), getEditView()); | |
125 | + boolean uniqueConstraintViolate = true; | |
126 | + | |
127 | + Inventario inventario = new Inventario(); | |
128 | + | |
129 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
130 | + for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ | |
131 | + try{ | |
132 | + inventario = this.inventarioService.save(SerializationUtils.clone(inventarioVH)); | |
133 | + uniqueConstraintViolate = false; | |
134 | + }catch(Throwable e){ | |
135 | + if(e.getCause() instanceof ConstraintViolationException){ | |
136 | + ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | |
137 | + if(ex.getSQLException().getMessage().contains("codigo_unico_inventario")){ | |
138 | + uniqueConstraintViolate = true; | |
139 | + }else{ | |
140 | + throw e; | |
141 | + } | |
142 | + }else{ | |
143 | + throw e; | |
144 | + } | |
145 | + } | |
146 | + } | |
147 | + | |
148 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(inventario, getEditView()); | |
125 | 149 | |
126 | 150 | return responseBody; |
127 | 151 | } | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/SaidaTemporariaController.java
... | ... | @@ -2,7 +2,6 @@ package br.com.centralit.controller; |
2 | 2 | |
3 | 3 | import java.util.Collection; |
4 | 4 | |
5 | -import org.apache.commons.beanutils.BeanUtilsBean; | |
6 | 5 | import org.hibernate.exception.ConstraintViolationException; |
7 | 6 | import org.springframework.beans.factory.annotation.Autowired; |
8 | 7 | import org.springframework.stereotype.Controller; |
... | ... | @@ -112,22 +111,21 @@ public class SaidaTemporariaController extends GenericController<SaidaTemporaria |
112 | 111 | |
113 | 112 | SaidaTemporaria saidaTemporaria = new SaidaTemporaria(); |
114 | 113 | |
115 | - //TODO Solução temporária para evitar que sejam criadas transferencias com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
114 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
116 | 115 | for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ |
117 | 116 | try{ |
118 | - saidaTemporaria = (SaidaTemporaria) BeanUtilsBean.getInstance().cloneBean(entity); | |
119 | - saidaTemporaria = this.saidaTemporariaService.save(saidaTemporaria); | |
117 | + saidaTemporaria = this.saidaTemporariaService.save(SaidaTemporaria.clone(entity)); | |
120 | 118 | uniqueConstraintViolate = false; |
121 | 119 | }catch(Throwable e){ |
122 | 120 | if(e.getCause() instanceof ConstraintViolationException){ |
123 | 121 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
124 | - if(ex.getSQLException().getMessage().contains("saidatemp_codigo_organizacao_id_key")){ | |
122 | + if(ex.getSQLException().getMessage().contains("codigo_unico_saidatemporaria")){ | |
125 | 123 | uniqueConstraintViolate = true; |
126 | 124 | }else{ |
127 | - uniqueConstraintViolate = false; | |
125 | + throw e; | |
128 | 126 | } |
129 | 127 | }else{ |
130 | - uniqueConstraintViolate = false; | |
128 | + throw e; | |
131 | 129 | } |
132 | 130 | } |
133 | 131 | } | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/SelecaoBemPatrimonialController.java
... | ... | @@ -2,14 +2,16 @@ package br.com.centralit.controller; |
2 | 2 | |
3 | 3 | import java.util.Collection; |
4 | 4 | |
5 | +import org.apache.commons.beanutils.BeanUtilsBean; | |
6 | +import org.hibernate.exception.ConstraintViolationException; | |
5 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
6 | 8 | import org.springframework.stereotype.Controller; |
9 | +import org.springframework.web.bind.annotation.RequestBody; | |
7 | 10 | import org.springframework.web.bind.annotation.RequestMapping; |
8 | 11 | import org.springframework.web.bind.annotation.RequestMethod; |
9 | 12 | import org.springframework.web.bind.annotation.RequestParam; |
10 | 13 | import org.springframework.web.bind.annotation.ResponseBody; |
11 | 14 | |
12 | -import br.com.centralit.api.model.ContaContabil; | |
13 | 15 | import br.com.centralit.api.model.SelecaoBemPatrimonial; |
14 | 16 | import br.com.centralit.api.service.DominioService; |
15 | 17 | import br.com.centralit.api.service.SelecaoBemPatrimonialService; |
... | ... | @@ -107,6 +109,38 @@ public class SelecaoBemPatrimonialController extends GenericController<SelecaoBe |
107 | 109 | |
108 | 110 | return responseBody; |
109 | 111 | } |
112 | + | |
113 | + @RequestMapping(method = RequestMethod.POST, value = "") | |
114 | + @ResponseBody | |
115 | + public ResponseBodyWrapper save(@RequestBody SelecaoBemPatrimonial objeto) throws Exception { | |
116 | + boolean uniqueConstraintViolate = true; | |
117 | + SelecaoBemPatrimonial selecaoBemPatrimonial = new SelecaoBemPatrimonial(); | |
118 | + | |
119 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
120 | + for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ | |
121 | + try{ | |
122 | + selecaoBemPatrimonial = (SelecaoBemPatrimonial) BeanUtilsBean.getInstance().cloneBean(objeto); | |
123 | + selecaoBemPatrimonial = this.selecaoBemPatrimonialService.save(selecaoBemPatrimonial); | |
124 | + uniqueConstraintViolate = false; | |
125 | + }catch(Throwable e){ | |
126 | + if(e.getCause() instanceof ConstraintViolationException){ | |
127 | + ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | |
128 | + if(ex.getSQLException().getMessage().contains("codigo_unico_selecaobempatrimonial")){ | |
129 | + uniqueConstraintViolate = true; | |
130 | + }else{ | |
131 | + throw e; | |
132 | + } | |
133 | + }else{ | |
134 | + throw e; | |
135 | + } | |
136 | + } | |
137 | + } | |
138 | + | |
139 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(selecaoBemPatrimonial, getEditView()); | |
140 | + | |
141 | + return responseBody; | |
142 | + } | |
143 | + | |
110 | 144 | |
111 | 145 | @Override |
112 | 146 | public Class<Views.SelecaoBemPatrimonialListView> getListView() { | ... | ... |
citgrp-patrimonio-web/src/main/java/br/com/centralit/controller/TransferenciaController.java
... | ... | @@ -339,7 +339,7 @@ public class TransferenciaController extends GenericController<Transferencia>{ |
339 | 339 | boolean uniqueConstraintViolate = true; |
340 | 340 | List<Transferencia> transferencias = new LinkedList<Transferencia>(); |
341 | 341 | |
342 | - //TODO Solução temporária para evitar que sejam criadas transferencias com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
342 | + //TODO Solução temporária para evitar que sejam criados registros com o código duplicado. Alterar solução quando for implementado o cache compartilhado | |
343 | 343 | for(int i = 5; i > 0 && uniqueConstraintViolate; i--){ |
344 | 344 | try{ |
345 | 345 | Transferencia transferencia = (Transferencia) BeanUtilsBean.getInstance().cloneBean(objeto); |
... | ... | @@ -348,14 +348,13 @@ public class TransferenciaController extends GenericController<Transferencia>{ |
348 | 348 | }catch(PersistenceException e){ |
349 | 349 | if(e.getCause() instanceof ConstraintViolationException){ |
350 | 350 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
351 | - if(ex.getSQLException().getMessage().contains("trans_codigo_organizacao_id_key") | |
352 | - || ex.getSQLException().getMessage().contains("trans_codigo_organizacao_codigoasi_id_key")){ | |
351 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ | |
353 | 352 | uniqueConstraintViolate = true; |
354 | 353 | }else{ |
355 | - uniqueConstraintViolate = false; | |
354 | + throw e; | |
356 | 355 | } |
357 | 356 | }else{ |
358 | - uniqueConstraintViolate = false; | |
357 | + throw e; | |
359 | 358 | } |
360 | 359 | } |
361 | 360 | } | ... | ... |