schema

## Class LoginSession

- java.lang.Object
- - 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

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(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`

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