1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.coreservice.impl.component;
17
18 import org.eclipse.persistence.exceptions.OptimisticLockException;
19 import org.kuali.rice.core.framework.persistence.ojb.DataAccessUtils;
20 import org.kuali.rice.krad.data.DataObjectService;
21 import org.springframework.beans.factory.annotation.Required;
22
23
24
25
26
27
28
29 public class ComponentSetDaoJpa implements ComponentSetDao {
30 private DataObjectService dataObjectService;
31
32 @Override
33 public boolean saveIgnoreLockingFailure(ComponentSetBo componentSetBo) {
34 try{
35 getDataObjectService().save(componentSetBo);
36 } catch (RuntimeException e) {
37 if (e.getClass().isAssignableFrom(OptimisticLockException.class)) {
38 return false;
39 }
40 throw e;
41 }
42 return true;
43 }
44 public DataObjectService getDataObjectService() {
45 return dataObjectService;
46 }
47
48 @Required
49 public void setDataObjectService(DataObjectService dataObjectService) {
50 this.dataObjectService = dataObjectService;
51 }
52
53
54 }