2.17.2: 2011-06-17

net.sf.basedb.core.data
Class SessionData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.SessionData
All Implemented Interfaces:
IdentifiableData

public class SessionData
extends BasicData

This class holds information about a session.

Version:
2.0
Author:
enell
See Also:
Session, Session and client overview
Hibernate: class
table="`Sessions`" lazy="false"

Field Summary
private  ClientData client
           
private  boolean impersonated
           
private  String loginComment
           
private  Date loginTime
           
private  Date logoutTime
           
static int MAX_LOGIN_COMMENT_LENGTH
          The maximum length of the login comment that can be stored in the database.
static int MAX_REMOTE_ID_LENGTH
          The maximum length of the remote ID that can be stored in the database.
private  String remoteId
           
private  UserData user
           
 
Constructor Summary
SessionData()
           
 
Method Summary
 ClientData getClient()
          Get the client application the user was using.
 boolean getImpersonated()
          Check if another user is acting as the user of this session.
 String getLoginComment()
          Get the login comment.
 Date getLoginTime()
          Get the date and time the user logged in.
 Date getLogoutTime()
          Get the date and time the user logged out.
 String getRemoteId()
          Get the login comment.
 UserData getUser()
          Get the user that logged in with this session.
 void setClient(ClientData client)
           
 void setImpersonated(boolean impersonated)
           
 void setLoginComment(String loginComment)
           
 void setLoginTime(Date loginTime)
           
 void setLogoutTime(Date logoutTime)
           
 void setRemoteId(String remoteId)
           
 void setUser(UserData user)
           
 
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

user

private UserData user

loginTime

private Date loginTime

logoutTime

private Date logoutTime

MAX_LOGIN_COMMENT_LENGTH

public static final int MAX_LOGIN_COMMENT_LENGTH
The maximum length of the login comment that can be stored in the database.

See Also:
setLoginComment(String), Constant Field Values

loginComment

private String loginComment

impersonated

private boolean impersonated

client

private ClientData client

MAX_REMOTE_ID_LENGTH

public static final int MAX_REMOTE_ID_LENGTH
The maximum length of the remote ID that can be stored in the database.

See Also:
setRemoteId(String), Constant Field Values

remoteId

private String remoteId
Constructor Detail

SessionData

public SessionData()
Method Detail

getUser

public UserData getUser()
Get the user that logged in with this session.

Hibernate: many-to-one
column="`user_id`" not-null="true" update="false" outer-join="false"

setUser

public void setUser(UserData user)

getLoginTime

public Date getLoginTime()
Get the date and time the user logged in.

Hibernate: property
column="`login_time`" type="timestamp" not-null="true" update="false"

setLoginTime

public void setLoginTime(Date loginTime)

getLogoutTime

public Date getLogoutTime()
Get the date and time the user logged out.

Hibernate: property
column="`logout_time`" type="timestamp" not-null="false"

setLogoutTime

public void setLogoutTime(Date logoutTime)

getLoginComment

public String getLoginComment()
Get the login comment.

Hibernate: property
column="`login_comment`" type="text" not-null="false" update="false"

setLoginComment

public void setLoginComment(String loginComment)

getImpersonated

public boolean getImpersonated()
Check if another user is acting as the user of this session.

Hibernate: property
column="`impersonated`" type="boolean" not-null="true" update="false"

setImpersonated

public void setImpersonated(boolean impersonated)

getClient

public ClientData getClient()
Get the client application the user was using.

Hibernate: many-to-one
column="`client_id`" not-null="false" update="false" outer-join="false"

setClient

public void setClient(ClientData client)

getRemoteId

public String getRemoteId()
Get the login comment.

Hibernate: property
column="`remote_id`" type="string" length="255" not-null="false" update="false"

setRemoteId

public void setRemoteId(String remoteId)

2.17.2: 2011-06-17