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 enumSpecifies the type of the session. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theMongoApplicationassociated with thisMongoSession.Gets theTimestampat which thisMongoSessionexpires.Gets theMongoProfileassociated with thisMongoSession.Gets the id of thisMongoSession.getType()Gets the type of the session.getUser()Gets theMongoUserwhich owns theMongoSessionvoidsetApplication(MongoApplication application) Sets theMongoApplicationassociated witht heMongoSession.voidSets thTimestampat which theMongoSessionexpires.voidsetProfile(MongoProfile profile) Sets theMongoProfileassociated with thisMongoSession.voidsetSessionId(String sessionId) Sets the id of theMongoSession.voidsetType(MongoSession.Type type) Sets the type of the session.voidSets theMongoUserwhich 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 theMongoUserwhich owns theMongoSession- Returns:
- the
User
-
setUser
Sets theMongoUserwhich owns theMongoSession- Parameters:
user- theUser
-
getProfile
Gets theMongoProfileassociated with thisMongoSession.- Returns:
- the
MongoProfile
-
setProfile
Sets theMongoProfileassociated with thisMongoSession.- Parameters:
profile- theMongoProfile
-
getApplication
Gets theMongoApplicationassociated with thisMongoSession.- Returns:
- the
MongoSession
-
setApplication
Sets theMongoApplicationassociated witht heMongoSession.- Parameters:
application- theMongoApplication
-
getExpiry
Gets theTimestampat which thisMongoSessionexpires.- Returns:
- the
Timestampat which thisMongoSessionexpires.
-
setExpiry
Sets thTimestampat which theMongoSessionexpires.- Parameters:
expiry- theTimestampat which theMongoSessionexpires.
-
getType
Gets the type of the session.- Returns:
- the session type
-
setType
Sets the type of the session.- Parameters:
type- the type
-