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
This class holds information about a session.
- Version:
- 2.0
- Author:
- enell
- See Also:
- Hibernate: class
- table="`Sessions`" lazy="false"
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private ClientData
private UserDeviceData
private boolean
private String
private Float
private Float
private String
private Date
private Date
static final int
The maximum length of the authentication method that can be stored in the database.static final int
The maximum length of the location that can be stored in the database.static final int
The maximum length of the login comment that can be stored in the database.static final int
The maximum length of the remote ID that can be stored in the database.private String
private UserData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the authentication method used for this session.Get the client application the user was using.Get the device the user was using.boolean
Check if another user is acting as the user of this session.Get the location of the user (if known).Get the location latitude of the user (if known).Get the location longitude of the user (if known).Get the login comment.Get the date and time the user logged in.Get the date and time the user logged out.Get the login comment.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
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:
-
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:
-
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:
-
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
-