Clover Coverage Report - Impex Parent 1.0.21-SNAPSHOT (Aggregated)
Coverage timestamp: Tue Feb 8 2011 11:33:53 EST
../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
43   110   20   3.07
12   91   0.47   14
14     1.43  
1    
 
  ImpexError       Line # 7 43 0% 20 69 0% 0.0
 
No Tests
 
1    package org.apache.torque.mojo;
2   
3    import java.util.Properties;
4   
5    import org.apache.commons.lang.StringUtils;
6   
 
7    public class ImpexError {
8    Throwable throwable;
9    String message;
10    Properties info;
11    String url;
12    String driver;
13    boolean showPassword;
14   
 
15  0 toggle public Throwable getThrowable() {
16  0 return throwable;
17    }
18   
 
19  0 toggle public void setThrowable(Throwable throwable) {
20  0 this.throwable = throwable;
21    }
22   
 
23  0 toggle public String getMessage() {
24  0 return message;
25    }
26   
 
27  0 toggle public void setMessage(String message) {
28  0 this.message = message;
29    }
30   
 
31  0 toggle public Properties getInfo() {
32  0 return info;
33    }
34   
 
35  0 toggle public void setInfo(Properties info) {
36  0 this.info = info;
37    }
38   
 
39  0 toggle public String toString() {
40  0 StringBuffer sb = new StringBuffer();
41  0 sb.append("\n\n");
42  0 if (!StringUtils.isEmpty(message)) {
43  0 sb.append(message + "\n\n");
44    }
45  0 if (getThrowable() != null) {
46  0 sb.append("------------------------------------------------------\n");
47  0 String emsg = getThrowable().getMessage();
48  0 sb.append(emsg);
49  0 if (!emsg.endsWith("\n")) {
50  0 sb.append("\n");
51    }
52    }
53  0 sb.append(toString(getInfo()));
54  0 return sb.toString();
55    }
56   
 
57  0 toggle public String toString(Properties info) {
58  0 StringBuffer sb = new StringBuffer();
59  0 sb.append("------------------------------------------------------\n\n");
60  0 sb.append("The following information was provided to JDBC:\n");
61  0 sb.append("------------------------------------------------------\n");
62  0 sb.append("URL: " + getUrl() + "\n");
63  0 sb.append("Driver: " + getDriver() + "\n");
64  0 String username = info.getProperty(AbstractSQLExecutorMojo.DRIVER_INFO_PROPERTIES_USER);
65  0 if (StringUtils.isEmpty(username)) {
66  0 sb.append("Username: [No username was supplied]\n");
67    } else {
68  0 sb.append("Username: " + username + "\n");
69    }
70  0 String password = info.getProperty(AbstractSQLExecutorMojo.DRIVER_INFO_PROPERTIES_PASSWORD);
71  0 if (isShowPassword()) {
72  0 sb.append("Password: " + password + "\n");
73    } else {
74  0 if (StringUtils.isEmpty(password)) {
75  0 sb.append("Password: [No password was supplied]\n");
76    } else {
77  0 sb.append("Password: *******\n");
78    }
79    }
80  0 sb.append("------------------------------------------------------\n");
81  0 sb.append("\n");
82  0 return sb.toString();
83   
84    }
85   
 
86  0 toggle public String getUrl() {
87  0 return url;
88    }
89   
 
90  0 toggle public void setUrl(String url) {
91  0 this.url = url;
92    }
93   
 
94  0 toggle public String getDriver() {
95  0 return driver;
96    }
97   
 
98  0 toggle public void setDriver(String driver) {
99  0 this.driver = driver;
100    }
101   
 
102  0 toggle public boolean isShowPassword() {
103  0 return showPassword;
104    }
105   
 
106  0 toggle public void setShowPassword(boolean showPassword) {
107  0 this.showPassword = showPassword;
108    }
109   
110    }