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