Class SessionData

java.lang.Object
net.sf.basedb.core.data.BasicData
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, Developer documentation: Client, session and settings
Hibernate: class
table="`Sessions`" lazy="false"
  • Field Details

    • 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
    • device

      private UserDeviceData device
    • 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
    • MAX_LOCATION_LENGTH

      public static final int MAX_LOCATION_LENGTH
      The maximum length of the location that can be stored in the database.
      See Also:
      setLocation(String), Constant Field Values
    • location

      private String location
    • locationLat

      private Float locationLat
    • locationLong

      private Float locationLong
    • MAX_AUTHENTICATION_METHOD

      public static final int MAX_AUTHENTICATION_METHOD
      The maximum length of the authentication method that can be stored in the database.
      See Also:
      setAuthenticationMethod(String), Constant Field Values
    • authenticationMethod

      private String authenticationMethod
  • Constructor Details

    • SessionData

      public SessionData()
  • Method Details

    • 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)
    • getDevice

      public UserDeviceData getDevice()
      Get the device the user was using.
      Since:
      3.12
      Hibernate: many-to-one
      column="`device_id`" not-null="false" update="false" outer-join="false"
    • setDevice

      public void setDevice​(UserDeviceData device)
    • 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)
    • getLocation

      public String getLocation()
      Get the location of the user (if known).
      Since:
      3.12
      Hibernate: property
      column="`location`" type="string" length="255" not-null="false" update="false"
    • setLocation

      public void setLocation​(String location)
    • getLocationLatitude

      public Float getLocationLatitude()
      Get the location latitude of the user (if known).
      Since:
      3.12
      Hibernate: property
      column="`location_lat`" type="float" not-null="false" update="false"
    • setLocationLatitude

      public void setLocationLatitude​(Float locationLat)
    • getLocationLongitude

      public Float getLocationLongitude()
      Get the location longitude of the user (if known).
      Since:
      3.12
      Hibernate: property
      column="`location_long`" type="float" not-null="false" update="false"
    • setLocationLongitude

      public void setLocationLongitude​(Float locationLong)
    • getAuthenticationMethod

      public String getAuthenticationMethod()
      Get the authentication method used for this session.
      Since:
      3.9
      Hibernate: property
      column="`authentication_method`" type="string" length="255" not-null="false" update="false"
    • setAuthenticationMethod

      public void setAuthenticationMethod​(String authenticationMethod)