Skip to content

Commit 6830956

Browse files
convert GenContext to Java
1 parent 1e10c89 commit 6830956

1 file changed

Lines changed: 133 additions & 20 deletions

File tree

sqldev/src/main/java/org/utplsql/sqldev/model/oddgen/GenContext.java

Lines changed: 133 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,137 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.utplsql.sqldev.model.oddgen
17-
18-
import java.sql.Connection
19-
import org.eclipse.xtend.lib.annotations.Accessors
20-
import org.utplsql.sqldev.model.AbstractModel
21-
22-
@Accessors
23-
class GenContext extends AbstractModel {
24-
Connection conn
25-
String objectType
26-
String objectName
27-
String testPackagePrefix
28-
String testPackageSuffix
29-
String testUnitPrefix
30-
String testUnitSuffix
31-
int numberOfTestsPerUnit
32-
boolean generateComments
33-
boolean disableTests
34-
String suitePath
35-
int indentSpaces
16+
package org.utplsql.sqldev.model.oddgen;
17+
18+
import java.sql.Connection;
19+
20+
import org.springframework.core.style.ToStringCreator;
21+
22+
public class GenContext {
23+
private Connection conn;
24+
private String objectType;
25+
private String objectName;
26+
private String testPackagePrefix;
27+
private String testPackageSuffix;
28+
private String testUnitPrefix;
29+
private String testUnitSuffix;
30+
private int numberOfTestsPerUnit;
31+
private boolean generateComments;
32+
private boolean disableTests;
33+
private String suitePath;
34+
private int indentSpaces;
35+
36+
public Connection getConn() {
37+
return this.conn;
38+
}
39+
40+
@Override
41+
public String toString() {
42+
return new ToStringCreator(this)
43+
.append("conn", conn)
44+
.append("objectType", objectType)
45+
.append("objectName", objectName)
46+
.append("testPackagePrefix", testPackagePrefix)
47+
.append("testPackageSuffix", testPackageSuffix)
48+
.append("testUnitPrefix", testUnitPrefix)
49+
.append("testUnitSuffix", testUnitSuffix)
50+
.append("numberOfTestsPerUnit", numberOfTestsPerUnit)
51+
.append("generateComments", generateComments)
52+
.append("disableTests", disableTests)
53+
.append("suitePath", suitePath)
54+
.append("indentSpaces", indentSpaces)
55+
.toString();
56+
}
57+
58+
public void setConn(final Connection conn) {
59+
this.conn = conn;
60+
}
61+
62+
public String getObjectType() {
63+
return this.objectType;
64+
}
65+
66+
public void setObjectType(final String objectType) {
67+
this.objectType = objectType;
68+
}
69+
70+
public String getObjectName() {
71+
return this.objectName;
72+
}
73+
74+
public void setObjectName(final String objectName) {
75+
this.objectName = objectName;
76+
}
77+
78+
public String getTestPackagePrefix() {
79+
return this.testPackagePrefix;
80+
}
81+
82+
public void setTestPackagePrefix(final String testPackagePrefix) {
83+
this.testPackagePrefix = testPackagePrefix;
84+
}
85+
86+
public String getTestPackageSuffix() {
87+
return this.testPackageSuffix;
88+
}
89+
90+
public void setTestPackageSuffix(final String testPackageSuffix) {
91+
this.testPackageSuffix = testPackageSuffix;
92+
}
93+
94+
public String getTestUnitPrefix() {
95+
return this.testUnitPrefix;
96+
}
97+
98+
public void setTestUnitPrefix(final String testUnitPrefix) {
99+
this.testUnitPrefix = testUnitPrefix;
100+
}
101+
102+
public String getTestUnitSuffix() {
103+
return this.testUnitSuffix;
104+
}
105+
106+
public void setTestUnitSuffix(final String testUnitSuffix) {
107+
this.testUnitSuffix = testUnitSuffix;
108+
}
109+
110+
public int getNumberOfTestsPerUnit() {
111+
return this.numberOfTestsPerUnit;
112+
}
113+
114+
public void setNumberOfTestsPerUnit(final int numberOfTestsPerUnit) {
115+
this.numberOfTestsPerUnit = numberOfTestsPerUnit;
116+
}
117+
118+
public boolean isGenerateComments() {
119+
return this.generateComments;
120+
}
121+
122+
public void setGenerateComments(final boolean generateComments) {
123+
this.generateComments = generateComments;
124+
}
125+
126+
public boolean isDisableTests() {
127+
return this.disableTests;
128+
}
129+
130+
public void setDisableTests(final boolean disableTests) {
131+
this.disableTests = disableTests;
132+
}
133+
134+
public String getSuitePath() {
135+
return this.suitePath;
136+
}
137+
138+
public void setSuitePath(final String suitePath) {
139+
this.suitePath = suitePath;
140+
}
141+
142+
public int getIndentSpaces() {
143+
return this.indentSpaces;
144+
}
145+
146+
public void setIndentSpaces(final int indentSpaces) {
147+
this.indentSpaces = indentSpaces;
148+
}
36149
}

0 commit comments

Comments
 (0)