Package net.sf.basedb.core.data
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 Summary
Fields Modifier and Type Field Description private String
authenticationMethod
private ClientData
client
private UserDeviceData
device
private boolean
impersonated
private String
location
private Float
locationLat
private Float
locationLong
private String
loginComment
private Date
loginTime
private Date
logoutTime
static int
MAX_AUTHENTICATION_METHOD
The maximum length of the authentication method that can be stored in the database.static int
MAX_LOCATION_LENGTH
The maximum length of the location that can be stored in the database.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
Constructors Constructor Description SessionData()
-
Method Summary
Modifier and Type Method Description String
getAuthenticationMethod()
Get the authentication method used for this session.ClientData
getClient()
Get the client application the user was using.UserDeviceData
getDevice()
Get the device the user was using.boolean
getImpersonated()
Check if another user is acting as the user of this session.String
getLocation()
Get the location of the user (if known).Float
getLocationLatitude()
Get the location latitude of the user (if known).Float
getLocationLongitude()
Get the location longitude of the user (if known).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
setAuthenticationMethod(String authenticationMethod)
void
setClient(ClientData client)
void
setDevice(UserDeviceData device)
void
setImpersonated(boolean impersonated)
void
setLocation(String location)
void
setLocationLatitude(Float locationLat)
void
setLocationLongitude(Float locationLong)
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
-
Field Details
-
user
-
loginTime
-
logoutTime
-
MAX_LOGIN_COMMENT_LENGTH
public static final int MAX_LOGIN_COMMENT_LENGTHThe maximum length of the login comment that can be stored in the database.- See Also:
setLoginComment(String)
, Constant Field Values
-
loginComment
-
impersonated
private boolean impersonated -
client
-
device
-
MAX_REMOTE_ID_LENGTH
public static final int MAX_REMOTE_ID_LENGTHThe maximum length of the remote ID that can be stored in the database.- See Also:
setRemoteId(String)
, Constant Field Values
-
remoteId
-
MAX_LOCATION_LENGTH
public static final int MAX_LOCATION_LENGTHThe maximum length of the location that can be stored in the database.- See Also:
setLocation(String)
, Constant Field Values
-
location
-
locationLat
-
locationLong
-
MAX_AUTHENTICATION_METHOD
public static final int MAX_AUTHENTICATION_METHODThe maximum length of the authentication method that can be stored in the database. -
authenticationMethod
-
-
Constructor Details
-
SessionData
public SessionData()
-
-
Method Details
-
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
-
getLoginTime
Get the date and time the user logged in.- Hibernate: property
- column="`login_time`" type="timestamp" not-null="true" update="false"
-
setLoginTime
-
getLogoutTime
Get the date and time the user logged out.- Hibernate: property
- column="`logout_time`" type="timestamp" not-null="false"
-
setLogoutTime
-
getLoginComment
Get the login comment.- Hibernate: property
- column="`login_comment`" type="text" not-null="false" update="false"
-
setLoginComment
-
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
Get the client application the user was using.- Hibernate: many-to-one
- column="`client_id`" not-null="false" update="false" outer-join="false"
-
setClient
-
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
-
getRemoteId
Get the login comment.- Hibernate: property
- column="`remote_id`" type="string" length="255" not-null="false" update="false"
-
setRemoteId
-
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
-
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
-
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
-
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
-