1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.responsibility.dao.impl; |
17 | |
|
18 | |
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
19 | |
import org.kuali.rice.core.api.util.RiceConstants; |
20 | |
import org.kuali.rice.core.framework.persistence.platform.DatabasePlatform; |
21 | |
import org.kuali.rice.kew.responsibility.dao.ResponsibilityIdDAO; |
22 | |
|
23 | |
import javax.persistence.EntityManager; |
24 | |
import javax.persistence.PersistenceContext; |
25 | |
|
26 | 0 | public class ResponsibilityIdDAOJpaImpl implements ResponsibilityIdDAO { |
27 | |
@PersistenceContext(unitName = "kew-unit") |
28 | |
private EntityManager entityManager; |
29 | |
|
30 | |
|
31 | |
public String getNewResponsibilityId() { |
32 | 0 | return String.valueOf(getPlatform().getNextValSQL("KREW_RSP_S", entityManager)); |
33 | |
} |
34 | |
|
35 | |
protected DatabasePlatform getPlatform() { |
36 | 0 | return (DatabasePlatform) GlobalResourceLoader.getService(RiceConstants.DB_PLATFORM); |
37 | |
} |
38 | |
|
39 | |
public EntityManager getEntityManager() { |
40 | 0 | return this.entityManager; |
41 | |
} |
42 | |
|
43 | |
public void setEntityManager(EntityManager entityManager) { |
44 | 0 | this.entityManager = entityManager; |
45 | 0 | } |
46 | |
|
47 | |
} |