Changeset 348:d91f6bd7d381 for kraken-dom/src/main/java/org/krakenapps/dom/api/impl/ProgramApiImpl.java
- Timestamp:
- 09/20/11 03:16:11 (8 months ago)
- Branch:
- default
- Convert:
- svn:7c3792e6-d75b-4784-96a6-b298f655ee64/trunk@2782
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kraken-dom/src/main/java/org/krakenapps/dom/api/impl/ProgramApiImpl.java
r41 r348 97 97 98 98 @Override 99 public void createProgramProfile(ProgramProfile profile) { 100 createProgramProfileInternal(profile); 101 fireEntityAdded(profile); 99 public ProgramProfile createProgramProfile(ProgramProfile profile) { 100 ProgramProfile pp = createProgramProfileInternal(profile); 101 fireEntityAdded(pp); 102 return pp; 102 103 } 103 104 104 105 @Transactional 105 private voidcreateProgramProfileInternal(ProgramProfile profile) {106 private ProgramProfile createProgramProfileInternal(ProgramProfile profile) { 106 107 EntityManager em = entityManagerService.getEntityManager(); 107 108 em.persist(profile); 109 return profile; 108 110 } 109 111 110 112 @Override 111 public void updateProgramProfile(ProgramProfile profile) { 112 updateProgramProfileInternal(profile); 113 fireEntityUpdated(profile); 113 public ProgramProfile updateProgramProfile(ProgramProfile profile) { 114 ProgramProfile pp = updateProgramProfileInternal(profile); 115 fireEntityUpdated(pp); 116 return pp; 114 117 } 115 118 116 119 @Transactional 117 private voidupdateProgramProfileInternal(ProgramProfile profile) {120 private ProgramProfile updateProgramProfileInternal(ProgramProfile profile) { 118 121 EntityManager em = entityManagerService.getEntityManager(); 119 122 if (profile.getId() == 0) … … 124 127 pp.setDescription(profile.getDescription()); 125 128 em.merge(pp); 129 return pp; 126 130 } 127 131 128 132 @Override 129 public voidremoveProgramProfile(int programProfileId) {133 public ProgramProfile removeProgramProfile(int programProfileId) { 130 134 ProgramProfile profile = removeProgramProfileInternal(programProfileId); 131 135 fireEntityRemoved(profile); 136 return profile; 132 137 } 133 138
Note: See TracChangeset
for help on using the changeset viewer.
