· 9 years ago · Oct 24, 2016, 05:58 AM
1/** dao */
2public class CatalogDaoImpl extends GenericDao implements ICatalogDao {
3
4 @Override
5 public <T extends GenericCatalog> T save(T value) {
6 log.warn("CatalogDaoImpl.save: {}", value);
7 try {
8 getSession().saveOrUpdate(value);
9 getSession().flush();
10 return value;
11 } catch (Throwable t) {
12 log.error("sirano-error: db exception", t);
13 throw new DataAccessException(t);
14 }
15 }
16
17}
18
19/** dto */
20public class Comment extends EntryDto {
21
22 private Date editDate;
23 /** some fields */
24
25 /** getters and setters */
26}
27
28/** context object */
29public class UserSessionContext implements Serializable {
30 private final boolean persistentSession;
31 transient private AccessPoint accessPoint;
32 private SecretKey secretKey;
33 private boolean skipImsiCheck = false;
34 transient private Object userContext;
35
36 private UserDetails userDetails;
37 private final AuthenticationContext authenticationContext = new AuthenticationContext();
38
39 public UserSessionContext(boolean persistentSession, AccessPoint accessPoint) {
40 this.persistentSession = persistentSession;
41 this.accessPoint = accessPoint;
42 }
43
44 /** some getters and setters */
45}