001    package net.databinder.hib.conv.components;
002    
003    
004    import java.util.HashMap;
005    
006    import org.apache.wicket.markup.html.WebPage;
007    import org.hibernate.classic.Session;
008    
009    public class ConversationPage extends WebPage implements IConversationPage {
010            private HashMap<Object, Session> conversationSessions = new HashMap<Object, Session>();
011            
012            public ConversationPage() {
013            }
014            
015            public ConversationPage(Session conversationSession) {
016                    setConversationSession(null);
017            }
018    
019            public ConversationPage(Object key, Session conversationSession) {
020                    setConversationSession(key, conversationSession);
021            }
022            
023            public Session getConversationSession(Object key) {
024                    return conversationSessions.get(key);
025            }
026            
027            public void setConversationSession(Object key, Session conversationSession) {
028                    conversationSessions.put(key, conversationSession);
029            }
030    
031            public Session getConversationSession() {
032                    return getConversationSession(null);
033            }
034    
035            public void setConversationSession(Session conversationSession) {
036                    setConversationSession(null, conversationSession);
037            }
038    }