Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
MuleConnectionRequestInfo |
|
| 0.0;0 |
1 | /* | |
2 | * $Id: MuleConnectionRequestInfo.java 19191 2010-08-25 21:05:23Z tcarlson $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.module.jca; | |
12 | ||
13 | import java.io.Serializable; | |
14 | ||
15 | import javax.resource.spi.ConnectionRequestInfo; | |
16 | ||
17 | /** | |
18 | * <code>MuleConnectionRequestInfo</code> TODO | |
19 | */ | |
20 | 0 | public class MuleConnectionRequestInfo implements ConnectionRequestInfo, Cloneable, Serializable |
21 | { | |
22 | /** | |
23 | * Serial version | |
24 | */ | |
25 | private static final long serialVersionUID = 910828075890304726L; | |
26 | ||
27 | private String username; | |
28 | private String password; | |
29 | ||
30 | public String getUserName() | |
31 | { | |
32 | 0 | return username; |
33 | } | |
34 | ||
35 | public void setUserName(String username) | |
36 | { | |
37 | 0 | this.username = username; |
38 | 0 | } |
39 | ||
40 | public String getPassword() | |
41 | { | |
42 | 0 | return password; |
43 | } | |
44 | ||
45 | public void setPassword(String password) | |
46 | { | |
47 | 0 | this.password = password; |
48 | 0 | } |
49 | ||
50 | @Override | |
51 | public int hashCode() | |
52 | { | |
53 | 0 | final int prime = 31; |
54 | 0 | int result = 1; |
55 | 0 | result = prime * result + ((password == null) ? 0 : password.hashCode()); |
56 | 0 | result = prime * result + ((username == null) ? 0 : username.hashCode()); |
57 | 0 | return result; |
58 | } | |
59 | ||
60 | @Override | |
61 | public boolean equals(Object obj) | |
62 | { | |
63 | 0 | if (this == obj) return true; |
64 | 0 | if (obj == null) return false; |
65 | 0 | if (getClass() != obj.getClass()) return false; |
66 | 0 | MuleConnectionRequestInfo other = (MuleConnectionRequestInfo) obj; |
67 | 0 | if (password == null) |
68 | { | |
69 | 0 | if (other.password != null) return false; |
70 | } | |
71 | 0 | else if (!password.equals(other.password)) return false; |
72 | 0 | if (username == null) |
73 | { | |
74 | 0 | if (other.username != null) return false; |
75 | } | |
76 | 0 | else if (!username.equals(other.username)) return false; |
77 | 0 | return true; |
78 | } | |
79 | ||
80 | protected Object clone() throws CloneNotSupportedException | |
81 | { | |
82 | 0 | return super.clone(); |
83 | } | |
84 | } |