View Javadoc

1   package org.appfuse.webapp.data;
2   
3   import org.apache.commons.lang.builder.ToStringBuilder;
4   import org.apache.commons.lang.builder.ToStringStyle;
5   import org.appfuse.model.User;
6   
7   import java.io.Serializable;
8   
9   public class UserSession implements Serializable {
10      private static final long serialVersionUID = 1932462707656603990L;
11      private User currentUser;
12      private boolean cookieLogin;
13  
14      /**
15       * @return Returns the cookieLogin.
16       */
17      public boolean isCookieLogin() {
18          return cookieLogin;
19      }
20  
21      /**
22       * @param cookieLogin The cookieLogin to set.
23       */
24      public void setCookieLogin(boolean cookieLogin) {
25          this.cookieLogin = cookieLogin;
26      }
27  
28      /**
29       * @return Returns the currentUser.
30       */
31      public User getCurrentUser() {
32          return currentUser;
33      }
34  
35      /**
36       * @param currentUser The currentUser to set.
37       */
38      public void setCurrentUser(User currentUser) {
39          this.currentUser = currentUser;
40      }
41  
42      public String toString() {
43          return ToStringBuilder.reflectionToString(this,
44                  ToStringStyle.MULTI_LINE_STYLE);
45      }
46  }