org.objectweb.cjdbc.controller.authentication
Class AbstractDatabaseUser

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.authentication.AbstractDatabaseUser
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DatabaseBackendUser, VirtualDatabaseUser

public abstract class AbstractDatabaseUser
extends java.lang.Object
implements java.io.Serializable

An AbstractDatabaseUser is just a login/password combination to represent an abstract database user.

Version:
1.0
Author:
Emmanuel Cecchet
See Also:
Serialized Form

Field Summary
protected  java.lang.String login
          Login name.
protected  java.lang.String password
          Password.
 
Constructor Summary
protected AbstractDatabaseUser(java.lang.String login, java.lang.String password)
          Creates a new AbstractDatabaseUser instance.
 
Method Summary
 boolean equals(java.lang.Object other)
          Two AbstractDatabaseUser are equals if both objects have same login & password.
 java.lang.String getLogin()
          Gets the login name.
 java.lang.String getPassword()
          Gets the password.
 boolean matches(java.lang.String login, java.lang.String password)
          Tests if the login and password provided matches the login/password of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

login

protected java.lang.String login
Login name.


password

protected java.lang.String password
Password.

Constructor Detail

AbstractDatabaseUser

protected AbstractDatabaseUser(java.lang.String login,
                               java.lang.String password)
Creates a new AbstractDatabaseUser instance. The caller must ensure that the parameters are not null.

Parameters:
login - the user name.
password - the password.
Method Detail

getLogin

public java.lang.String getLogin()
Gets the login name.

Returns:
the login name.

getPassword

public java.lang.String getPassword()
Gets the password.

Returns:
the password.

matches

public boolean matches(java.lang.String login,
                       java.lang.String password)
Tests if the login and password provided matches the login/password of this object.

Parameters:
login - a user name.
password - a password.
Returns:
true if it matches this object's login/password.

equals

public boolean equals(java.lang.Object other)
Two AbstractDatabaseUser are equals if both objects have same login & password.

Parameters:
other - the object to compare with.
Returns:
true if both objects have same login & password.


Copyright © 2002, 2003 - ObjectWeb Consortium - All Rights Reserved.