1 |
|
package org.apache.torque.engine.database.model; |
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
import org.xml.sax.Attributes; |
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
@author |
28 |
|
@author |
29 |
|
@version |
30 |
|
|
|
|
| 0% |
Uncovered Elements: 26 (26) |
Complexity: 10 |
Complexity Density: 0.67 |
|
31 |
|
public class IdMethodParameter |
32 |
|
{ |
33 |
|
private String name; |
34 |
|
private String value; |
35 |
|
private Table parentTable; |
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
40 |
0
|
public void loadFromXML (Attributes attrib)... |
41 |
|
{ |
42 |
0
|
name = attrib.getValue("name"); |
43 |
0
|
value = attrib.getValue("value"); |
44 |
|
} |
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
0
|
public String getName()... |
50 |
|
{ |
51 |
0
|
return name; |
52 |
|
} |
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
0
|
public void setName(String name)... |
58 |
|
{ |
59 |
0
|
this.name = name; |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
0
|
public String getValue()... |
66 |
|
{ |
67 |
0
|
return value; |
68 |
|
} |
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
73 |
0
|
public void setValue(String value)... |
74 |
|
{ |
75 |
0
|
this.value = value; |
76 |
|
} |
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
0
|
public void setTable(Table parent)... |
82 |
|
{ |
83 |
0
|
parentTable = parent; |
84 |
|
} |
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
89 |
0
|
public Table getTable()... |
90 |
|
{ |
91 |
0
|
return parentTable; |
92 |
|
} |
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
0
|
public String getTableName()... |
98 |
|
{ |
99 |
0
|
return parentTable.getName(); |
100 |
|
} |
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
105 |
0
|
public String toString()... |
106 |
|
{ |
107 |
0
|
StringBuffer result = new StringBuffer(); |
108 |
0
|
result.append(" <id-method-parameter"); |
109 |
0
|
if (getName() != null) |
110 |
|
{ |
111 |
0
|
result.append(" name=\"") |
112 |
|
.append(getName()) |
113 |
|
.append("\""); |
114 |
|
} |
115 |
0
|
result.append(" value=\"") |
116 |
|
.append(getValue()) |
117 |
|
.append("\">\n"); |
118 |
0
|
return result.toString(); |
119 |
|
} |
120 |
|
} |