1 26 package org.objectweb.jonas.jdbc; 27 28 import java.io.Serializable ; 29 import javax.resource.spi.ConnectionRequestInfo ; 30 31 public class ConnectionRequestInfoImpl 32 implements ConnectionRequestInfo , Serializable { 33 34 35 String user; 36 String password; 37 38 public ConnectionRequestInfoImpl() { 39 user = ""; 40 password = ""; 41 } 42 43 public ConnectionRequestInfoImpl(String _user, String _password) { 44 user = _user; 45 password = _password; 46 } 47 48 public boolean equals(Object obj) { 49 if(obj == null) { 50 return false; 51 } 52 if(obj instanceof ConnectionRequestInfoImpl) { 53 ConnectionRequestInfoImpl cri = 54 (ConnectionRequestInfoImpl) obj; 55 return (user == cri.user) && (password == cri.password); 56 } else { 57 return false; 58 } 59 } 60 61 public String getPassword() { 62 return password; 63 } 64 65 public String getUser() { 66 return user; 67 } 68 69 public int hashCode() { 70 String val = "" + user + password; 71 return val.hashCode(); 72 } 73 74 public void setPassword(String pass) { 75 password = pass; 76 } 77 78 public void setUser(String _user) { 79 user = _user; 80 } 81 82 } | Popular Tags |