FileDocCategorySizeDatePackage
ConnectionRequestInfo.javaAPI DocGlassfish v2 API3941Fri May 04 22:36:04 BST 2007com.sun.gjc.spi

ConnectionRequestInfo

public class ConnectionRequestInfo extends Object implements javax.resource.spi.ConnectionRequestInfo
ConnectionRequestInfo implementation for Generic JDBC Connector.
author
Binod P.G
version
1.0, 02/07/31

Fields Summary
private String
user
private String
password
Constructors Summary
public ConnectionRequestInfo(String user, String password)
Constructs a new ConnectionRequestInfo object

param
user User Name.
param
password Password

        this.user = user;
        this.password = password;
    
Methods Summary
public booleanequals(java.lang.Object obj)
Verify whether two ConnectionRequestInfos are equal.

return
True, if they are equal and false otherwise.

        if (obj == null) return false;
        if (obj instanceof ConnectionRequestInfo) {
            ConnectionRequestInfo other = (ConnectionRequestInfo) obj;
            return (isEqual(this.user, other.user) &&
                    isEqual(this.password, other.password));
        } else {
            return false;
        }
    
public java.lang.StringgetPassword()
Retrieves the password of the ConnectionRequestInfo.

return
Password of ConnectionRequestInfo.

        return password;
    
public java.lang.StringgetUser()
Retrieves the user name of the ConnectionRequestInfo.

return
User name of ConnectionRequestInfo.

        return user;
    
public inthashCode()
Retrieves the hashcode of the object.

return
hashCode.

        String result = "" + user + password;
        return result.hashCode();
    
private booleanisEqual(java.lang.Object o1, java.lang.Object o2)
Compares two objects.

param
o1 First object.
param
o2 Second object.

        if (o1 == null) {
            return (o2 == null);
        } else {
            return o1.equals(o2);
        }