no.sesat.search.user
Interface BasicUser

All Superinterfaces:
Serializable

public interface BasicUser
extends Serializable

A light weight user object used for remote services. Objects of this class is immutable. Since it's built of only simple Java classes, serialization is no problem.

Version:
$Id: BasicUser.java 23 2009-06-23 16:17:24Z ssmiweve $

Method Summary
 Date getCreated()
           
 String getFirstName()
           
 String getFullName()
           
 Date getLastLogin()
           
 String getLastName()
           
 String getNextLoginKey()
          Returns the login key that should be used for the next login.
 String getProperty(String key)
           
 Set<String> getPropertyKeys()
           
 Date getUpdateTimestamp()
          Returns the update timestamp for the object.
 Long getUserId()
           
 String getUsername()
          Deprecated. only delegates to getFullName()
 boolean isDirty(Date timestamp)
          Returns whether the user object is dirty and needs to be updated or not.
 void setNextLoginKey(String nextLoginKey)
          Set the login key that should be used for the next login.
 void setUpdateTimestamp(Date updateTimestamp)
          Set the update timestamp for the object.
 

Method Detail

getUserId

Long getUserId()

getFirstName

String getFirstName()

getLastName

String getLastName()

getFullName

String getFullName()

getUsername

String getUsername()
Deprecated. only delegates to getFullName()


getCreated

Date getCreated()

getLastLogin

Date getLastLogin()

getProperty

String getProperty(String key)

getPropertyKeys

Set<String> getPropertyKeys()

getNextLoginKey

String getNextLoginKey()
Returns the login key that should be used for the next login. This is only populated if the user where fetched by using a login key.

Returns:
the login key that should be used for the next login

setNextLoginKey

void setNextLoginKey(String nextLoginKey)
Set the login key that should be used for the next login. This is only populated if the user where fetched by using a login key.

Parameters:
nextLoginKey - the login key that should be used for the next login

getUpdateTimestamp

Date getUpdateTimestamp()
Returns the update timestamp for the object. This is populated for login user objects to enable dirty check for the object.

Returns:
the update timestamp for the user object

setUpdateTimestamp

void setUpdateTimestamp(Date updateTimestamp)
Set the update timestamp for the object. This is populated for login user objects to enable dirty check for the object.

Parameters:
updateTimestamp - the update timestamp for the user object

isDirty

boolean isDirty(Date timestamp)
Returns whether the user object is dirty and needs to be updated or not. The method will only work for user objects with a populated timestamp.

Parameters:
timestamp - the timestamp to check against
Returns:
if the user is dirty or not


Copyright © 2009 Schibsted Søk AS. All Rights Reserved.