1 package at.rseiler.spbee.core.pojo;
2
3 import at.rseiler.spbee.core.util.StringUtil;
4
5 import java.io.Serializable;
6 import java.util.LinkedList;
7 import java.util.List;
8
9
10
11
12
13
14 public class DtoClass implements Serializable {
15
16 private static final long serialVersionUID = -7146790314269625019L;
17
18 private final String superQualifiedClassName;
19 private final boolean anInterface;
20 private final boolean hasDataSourceConstructor;
21 private final List<StoredProcedureMethod> storedProcedureMethods = new LinkedList<>();
22
23
24
25
26
27
28
29
30 public DtoClass(String superQualifiedClassName, boolean anInterface, boolean hasDataSourceConstructor) {
31 this.superQualifiedClassName = superQualifiedClassName;
32 this.anInterface = anInterface;
33 this.hasDataSourceConstructor = hasDataSourceConstructor;
34 }
35
36
37
38
39
40
41 public void add(StoredProcedureMethod method) {
42 storedProcedureMethods.add(method);
43 }
44
45
46
47
48
49
50 public String getSuperQualifiedClassName() {
51 return superQualifiedClassName;
52 }
53
54
55
56
57
58
59 public String getQualifiedClassName() {
60 return StringUtil.getQualifiedDtoClassName(superQualifiedClassName);
61 }
62
63
64
65
66
67
68 public String getPackage() {
69 return StringUtil.getPackage(getQualifiedClassName());
70 }
71
72
73
74
75
76
77 public String getSimpleClassName() {
78 return StringUtil.getSimpleClassName(getQualifiedClassName());
79 }
80
81
82
83
84
85
86 public boolean isAnInterface() {
87 return anInterface;
88 }
89
90
91
92
93
94
95 public boolean hasDataSourceConstructor() {
96 return hasDataSourceConstructor;
97 }
98
99
100
101
102
103
104 public List<StoredProcedureMethod> getStoredProcedureMethods() {
105 return storedProcedureMethods;
106 }
107
108 @Override
109 public String toString() {
110 return "DtoClass{" +
111 "superQualifiedClassName='" + superQualifiedClassName + '\'' +
112 ", anInterface=" + anInterface +
113 ", hasDataSourceConstructor=" + hasDataSourceConstructor +
114 ", storedProcedureMethods=" + storedProcedureMethods +
115 '}';
116 }
117
118 }