@Test public void testGet() { System.out.println("get"); JDBCSessionDataStorage instance = new JDBCSessionDataStorage(dataSource); SessionData sessionData = instance.create(); String sessionId = sessionData.getId(); sessionData.put(KEY, VALUE); instance.save(sessionData); SessionData saved = instance.get(sessionId); assertEquals(sessionData, saved); String value1 = sessionData.get(KEY); String value2 = saved.get(KEY); assertEquals(value1, value2); }
@Override public SessionData get(String sessionId) { String sessionStored = executeSelect(select, sessionId); if (sessionStored == null) { return null; } SessionData sessionData = transcoder.decode(sessionStored); return sessionData; }
JDBCSessionDataStorage implements SessionDataStorage { @Override public SessionData get(String sessionId) { String sessionStored = executeSelect(select, sessionId); if (sessionStored == null) { return null; } SessionData sessionData = transcoder.decode(sessionStored); return sessionData; } }
JDBCSessionDataStorage implements SessionDataStorage { @Override public SessionData get(String sessionId) { String sessionStored = executeSelect(select, sessionId); if (sessionStored == null) { return null; } SessionData sessionData = transcoder.decode(sessionStored); return sessionData; } JDBCSessionDataStorage(DataSource dataSource);  JDBCSessionDataStorage(DataSource dataSource, String select, String insert, String update, String delete);  JDBCSessionDataStorage(DataSource dataSource, String select, String insert, String update, String delete, SessionDataTranscoder transcoder); }
JDBCSessionDataStorage implements SessionDataStorage { @Override public SessionData get(String sessionId) { String sessionStored = executeSelect(select, sessionId); if (sessionStored == null) { return null; } SessionData sessionData = transcoder.decode(sessionStored); return sessionData; } JDBCSessionDataStorage(DataSource dataSource);  JDBCSessionDataStorage(DataSource dataSource, String select, String insert, String update, String delete);  JDBCSessionDataStorage(DataSource dataSource, String select, String insert, String update, String delete, SessionDataTranscoder transcoder); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId); }
JDBCSessionDataStorage implements SessionDataStorage { @Override public SessionData get(String sessionId) { String sessionStored = executeSelect(select, sessionId); if (sessionStored == null) { return null; } SessionData sessionData = transcoder.decode(sessionStored); return sessionData; } JDBCSessionDataStorage(DataSource dataSource);  JDBCSessionDataStorage(DataSource dataSource, String select, String insert, String update, String delete);  JDBCSessionDataStorage(DataSource dataSource, String select, String insert, String update, String delete, SessionDataTranscoder transcoder); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId); static final String SELECT; static final String INSERT; static final String UPDATE; static final String DELETE; }