Class MongoSession
java.lang.Object
dev.getelements.elements.dao.mongo.model.MongoSession
- Direct Known Subclasses:
MongoAppleSignInSession
@Entity(value="session",
useDiscriminator=false)
@Index(fields=@Field("type")) @Index(fields=@Field("expiry"),options=@IndexOptions(expireAfterSeconds=86400))
public class MongoSession
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Specifies the type of the session. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theMongoApplication
associated with thisMongoSession
.Gets theTimestamp
at which thisMongoSession
expires.Gets theMongoProfile
associated with thisMongoSession
.Gets the id of thisMongoSession
.getType()
Gets the type of the session.getUser()
Gets theMongoUser
which owns theMongoSession
void
setApplication
(MongoApplication application) Sets theMongoApplication
associated witht heMongoSession
.void
Sets thTimestamp
at which theMongoSession
expires.void
setProfile
(MongoProfile profile) Sets theMongoProfile
associated with thisMongoSession
.void
setSessionId
(String sessionId) Sets the id of theMongoSession
.void
setType
(MongoSession.Type type) Sets the type of the session.void
Sets theMongoUser
which owns theMongoSession
-
Field Details
-
SESSION_LINGER_SECONDS
public static final int SESSION_LINGER_SECONDS- See Also:
-
-
Constructor Details
-
MongoSession
public MongoSession()
-
-
Method Details
-
getSessionId
Gets the id of thisMongoSession
.- Returns:
- the sessionId of this session
-
setSessionId
Sets the id of theMongoSession
.- Parameters:
sessionId
- the sesison id
-
getUser
Gets theMongoUser
which owns theMongoSession
- Returns:
- the
User
-
setUser
Sets theMongoUser
which owns theMongoSession
- Parameters:
user
- theUser
-
getProfile
Gets theMongoProfile
associated with thisMongoSession
.- Returns:
- the
MongoProfile
-
setProfile
Sets theMongoProfile
associated with thisMongoSession
.- Parameters:
profile
- theMongoProfile
-
getApplication
Gets theMongoApplication
associated with thisMongoSession
.- Returns:
- the
MongoSession
-
setApplication
Sets theMongoApplication
associated witht heMongoSession
.- Parameters:
application
- theMongoApplication
-
getExpiry
Gets theTimestamp
at which thisMongoSession
expires.- Returns:
- the
Timestamp
at which thisMongoSession
expires.
-
setExpiry
Sets thTimestamp
at which theMongoSession
expires.- Parameters:
expiry
- theTimestamp
at which theMongoSession
expires.
-
getType
Gets the type of the session.- Returns:
- the session type
-
setType
Sets the type of the session.- Parameters:
type
- the type
-