com.hack23.cia.model.impl.application.common
Class UserSession

Package class diagram package UserSession
java.lang.Object
  extended by com.hack23.cia.model.impl.common.BaseEntity
      extended by com.hack23.cia.model.impl.application.common.UserSession
All Implemented Interfaces:
ApplicationData, UserSessionData, Data, ModelObject, PersistedModelObject, Resource, Serializable

@Entity
public class UserSession
extends BaseEntity
implements UserSessionData

The Class UserSession.

See Also:
Serialized Form

Constructor Summary
UserSession()
          Instantiates a new user session.
UserSession(UserData user, LanguageData language, PortalData portal, String sessionId, String clientHost, String serverHost, Date createdAt, String userAgent)
          Instantiates a new user session.
 
Method Summary
 void addActionEvent(ActionEvent actionEvent)
          Adds the action event.
 boolean getActive()
          Gets the active.
protected  TypeContext getApplicationTypeContext()
          Gets the application group specification.
 String getClientHost()
          Gets the client host.
 Date getCreatedAt()
          Gets the created at.
 Date getEndedAt()
          Gets the ended at.
 List<AbstractActionEvent> getEvents()
          Gets the events.
 List<EventData> getEventsData()
          Gets the events data.
 Long getId()
          /* (non-Javadoc).
 Language getLanguage()
          Gets the language.
 LanguageData getLanguageData()
          Gets the language data.
 Portal getPortal()
          Gets the portal.
 PortalData getPortalData()
          Gets the portal data.
 ResourceType getResourceType()
          Gets the resource type.
 String getServerHost()
          Gets the server host.
 String getSessionId()
          Gets the session id.
 User getUser()
          Gets the user.
 String getUserAgent()
          Gets the user agent.
 UserData getUserData()
          Gets the user data.
 Long getVersion()
          Gets the version.
 void setActive(boolean active)
          Sets the active.
 void setClientHost(String clientHost)
          Sets the client host.
 void setCreatedAt(Date createdAt)
          Sets the created at.
 void setEndedAt(Date endedAt)
          Sets the ended at.
 void setEvents(List<AbstractActionEvent> events)
          Sets the events.
 void setId(Long id)
          Sets the id.
 void setLanguage(Language language)
          Sets the language.
 void setPortal(Portal portal)
          Sets the portal.
 void setResourceType(ResourceType resourceType)
          Sets the resource type.
 void setServerHost(String serverHost)
          Sets the server host.
 void setSessionId(String sessionId)
          Sets the session id.
 void setUser(User user)
          Sets the user.
 void setUserAgent(String userAgent)
          Sets the user agent.
 void setUserData(UserData user)
          Sets the user data.
 void setVersion(Long version)
          Sets the version.
 
Methods inherited from class com.hack23.cia.model.impl.common.BaseEntity
equals, getTypeContext, hashCode, isNew
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hack23.cia.model.api.common.PersistedModelObject
getTypeContext, isNew
 

Constructor Detail

UserSession

public UserSession()
Instantiates a new user session.


UserSession

public UserSession(UserData user,
                   LanguageData language,
                   PortalData portal,
                   String sessionId,
                   String clientHost,
                   String serverHost,
                   Date createdAt,
                   String userAgent)
Instantiates a new user session.

Parameters:
user - the user
language - the language
portal - the portal
sessionId - the session id
clientHost - the client host
serverHost - the server host
createdAt - the created at
userAgent - the user agent
Method Detail

addActionEvent

public void addActionEvent(ActionEvent actionEvent)
Description copied from interface: UserSessionData
Adds the action event.

Specified by:
addActionEvent in interface UserSessionData
Parameters:
actionEvent - the action event

getActive

public boolean getActive()
Description copied from interface: UserSessionData
Gets the active.

Specified by:
getActive in interface UserSessionData
Returns:
the active

getClientHost

public String getClientHost()
Description copied from interface: UserSessionData
Gets the client host.

Specified by:
getClientHost in interface UserSessionData
Returns:
the client host

getCreatedAt

public Date getCreatedAt()
Description copied from interface: UserSessionData
Gets the created at.

Specified by:
getCreatedAt in interface UserSessionData
Returns:
the created at

getEndedAt

public Date getEndedAt()
Gets the ended at.

Returns:
the ended at

getEvents

public List<AbstractActionEvent> getEvents()
Gets the events.

Returns:
the events

getEventsData

public List<EventData> getEventsData()
Description copied from interface: UserSessionData
Gets the events data.

Specified by:
getEventsData in interface UserSessionData
Returns:
the events data

getId

public Long getId()
/* (non-Javadoc).

Specified by:
getId in interface PersistedModelObject
Specified by:
getId in class BaseEntity
Returns:
the id
See Also:
org.directdemocracyportal.democracy.model.core.BaseEntity#getId()

getLanguage

public Language getLanguage()
Gets the language.

Returns:
the language

getLanguageData

public LanguageData getLanguageData()
Description copied from interface: UserSessionData
Gets the language data.

Specified by:
getLanguageData in interface UserSessionData
Returns:
the language data

getPortal

public Portal getPortal()
Gets the portal.

Returns:
the portal

getPortalData

public PortalData getPortalData()
Description copied from interface: UserSessionData
Gets the portal data.

Specified by:
getPortalData in interface UserSessionData
Returns:
the portal data

getResourceType

public ResourceType getResourceType()
Description copied from interface: Resource
Gets the resource type.

Specified by:
getResourceType in interface Resource
Returns:
the resource type

getServerHost

public String getServerHost()
Description copied from interface: UserSessionData
Gets the server host.

Specified by:
getServerHost in interface UserSessionData
Returns:
the server host

getSessionId

public String getSessionId()
Description copied from interface: UserSessionData
Gets the session id.

Specified by:
getSessionId in interface UserSessionData
Returns:
the session id

getUser

public User getUser()
Gets the user.

Returns:
the user

getUserAgent

public String getUserAgent()
Gets the user agent.

Returns:
the user agent

getUserData

public UserData getUserData()
Description copied from interface: UserSessionData
Gets the user data.

Specified by:
getUserData in interface UserSessionData
Returns:
the user data

getVersion

public Long getVersion()
Description copied from class: BaseEntity
Gets the version.

Specified by:
getVersion in interface PersistedModelObject
Specified by:
getVersion in class BaseEntity
Returns:
the version

setActive

public void setActive(boolean active)
Sets the active.

Parameters:
active - the new active

setClientHost

public void setClientHost(String clientHost)
Sets the client host.

Parameters:
clientHost - the new client host

setCreatedAt

public void setCreatedAt(Date createdAt)
Sets the created at.

Parameters:
createdAt - the new created at

setEndedAt

public void setEndedAt(Date endedAt)
Sets the ended at.

Parameters:
endedAt - the new ended at

setEvents

public void setEvents(List<AbstractActionEvent> events)
Sets the events.

Parameters:
events - the new events

setId

public void setId(Long id)
Description copied from interface: PersistedModelObject
Sets the id.

Specified by:
setId in interface PersistedModelObject
Parameters:
id - the new id

setLanguage

public void setLanguage(Language language)
Sets the language.

Parameters:
language - the new language

setPortal

public void setPortal(Portal portal)
Sets the portal.

Parameters:
portal - the new portal

setResourceType

public void setResourceType(ResourceType resourceType)
Sets the resource type.

Parameters:
resourceType - the new resource type

setServerHost

public void setServerHost(String serverHost)
Sets the server host.

Parameters:
serverHost - the new server host

setSessionId

public void setSessionId(String sessionId)
Sets the session id.

Parameters:
sessionId - the new session id

setUser

public void setUser(User user)
Sets the user.

Parameters:
user - the new user

setUserAgent

public void setUserAgent(String userAgent)
Sets the user agent.

Parameters:
userAgent - the new user agent

setUserData

public void setUserData(UserData user)
Description copied from interface: UserSessionData
Sets the user data.

Specified by:
setUserData in interface UserSessionData
Parameters:
user - the new user data

setVersion

public void setVersion(Long version)
Description copied from interface: PersistedModelObject
Sets the version.

Specified by:
setVersion in interface PersistedModelObject
Parameters:
version - the new version

getApplicationTypeContext

protected TypeContext getApplicationTypeContext()
Description copied from class: BaseEntity
Gets the application group specification.

Specified by:
getApplicationTypeContext in class BaseEntity
Returns:
the application group specification


Copyright © 2008-2009 www.hack23.com. All Rights Reserved.