Oracle NoSQL Database Examples
version 11gR2.2.0.26

schema
Class LoginSession

java.lang.Object
  extended by schema.LoginSession

 class LoginSession
extends Object

Holds the session duration attribute that is stored as the Value for the "/user/EMAIL/-/login/TIMESTAMP" Key. Illustrates the use of a timestamp as a Key component. The email and timestamp uniquely identify the login event and the user session.


Constructor Summary
LoginSession(String email, long loginTime)
          Constructs a user object with its unique identifiers, the email address and login time.
 
Method Summary
(package private)  String getEmail()
          Returns the email identifier.
(package private)  long getLoginTime()
          Returns the login time identifier.
(package private)  int getSessionDuration()
          Returns the session duration.
(package private)  Key getStoreKey()
          Returns a Key that can be used to write or read the LoginSession.
(package private)  Value getStoreValue(Bindings bindings)
          Serializes the only attribute, session duration, into the byte array of a Value.
(package private)  void setSessionDuration(int sessionDuration)
          Changes the session duration.
(package private)  void setStoreValue(Bindings bindings, Value value)
          Deserializes the only attribute, session duration, from the byte array of a Value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoginSession

LoginSession(String email,
             long loginTime)
Constructs a user object with its unique identifiers, the email address and login time.

Method Detail

getEmail

String getEmail()
Returns the email identifier.


getLoginTime

long getLoginTime()
Returns the login time identifier.


setSessionDuration

void setSessionDuration(int sessionDuration)
Changes the session duration.


getSessionDuration

int getSessionDuration()
Returns the session duration.


getStoreKey

Key getStoreKey()
Returns a Key that can be used to write or read the LoginSession.


getStoreValue

Value getStoreValue(Bindings bindings)
Serializes the only attribute, session duration, into the byte array of a Value.


setStoreValue

void setStoreValue(Bindings bindings,
                   Value value)
Deserializes the only attribute, session duration, from the byte array of a Value.


toString

public String toString()
Overrides:
toString in class Object

Oracle NoSQL Database Examples
version 11gR2.2.0.26

Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.