Skip to content

Commit 53c6175

Browse files
committed
Fixing some minor warnings and errors in JPA tests
Signed-off-by: Will Dazey <[email protected]>
1 parent eb98ed2 commit 53c6175

File tree

227 files changed

+896
-822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+896
-822
lines changed

foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/jpql/AbstractSchemaIdentifierEqualsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void setup() {
2222
Employee emp;
2323
emp = (Employee)getSomeEmployees().firstElement();
2424

25-
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE emp = ?1";
25+
String ejbqlString = "SELECT OBJECT(e) FROM Employee e WHERE e = ?1";
2626

2727
setEjbqlString(ejbqlString);
2828
setOriginalOject(emp);

foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/jpql/AbstractSchemaIdentifierNotEqualsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void setup() {
2323
Vector employees = getSomeEmployees();
2424
emp = (Employee)employees.firstElement();
2525

26-
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE emp <> ?1";
26+
String ejbqlString = "SELECT OBJECT(e) FROM Employee e WHERE e <> ?1";
2727

2828
setEjbqlString(ejbqlString);
2929

foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/jpql/BaseTestCase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void setup() {
2222
Vector employees = getSession().readAllObjects(Employee.class);
2323

2424
setOriginalOject(employees);
25-
setEjbqlString("SELECT OBJECT(emp) FROM Employee emp");
25+
setEjbqlString("SELECT OBJECT(e) FROM Employee e");
2626

2727
super.setup();
2828
}

foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorTest.java

+16-16
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static BinaryOperatorTest getSimpleGreaterThanTest() {
3030
BinaryOperatorTest theTest = new BinaryOperatorTest();
3131

3232
theTest.setName("Simple Greater Than test");
33-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.id > 12");
33+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.id > 12");
3434
theTest.setReferenceClass(Employee.class);
3535

3636
ExpressionBuilder builder = new ExpressionBuilder();
@@ -44,7 +44,7 @@ public static BinaryOperatorTest getSimpleGreaterThanEqualTest() {
4444
BinaryOperatorTest theTest = new BinaryOperatorTest();
4545

4646
theTest.setName("Simple Greater Than Equal test");
47-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.id >= 12");
47+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.id >= 12");
4848
theTest.setReferenceClass(Employee.class);
4949

5050
ExpressionBuilder builder = new ExpressionBuilder();
@@ -58,7 +58,7 @@ public static BinaryOperatorTest getSimpleLessThanEqualTest() {
5858
BinaryOperatorTest theTest = new BinaryOperatorTest();
5959

6060
theTest.setName("Simple Less Than Equal test");
61-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.id <= 1000000");
61+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.id <= 1000000");
6262
theTest.setReferenceClass(Employee.class);
6363

6464
ExpressionBuilder builder = new ExpressionBuilder();
@@ -72,7 +72,7 @@ public static BinaryOperatorTest getSimpleLessThanTest() {
7272
BinaryOperatorTest theTest = new BinaryOperatorTest();
7373

7474
theTest.setName("Simple Less Than test");
75-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.id < 1000000");
75+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.id < 1000000");
7676
theTest.setReferenceClass(Employee.class);
7777

7878
ExpressionBuilder builder = new ExpressionBuilder();
@@ -86,7 +86,7 @@ public static BinaryOperatorTest getSimplePlusTest() {
8686
BinaryOperatorTest theTest = new BinaryOperatorTest();
8787

8888
theTest.setName("Simple Plus test");
89-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.salary + 1000 <= 50000");
89+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.salary + 1000 <= 50000");
9090
theTest.setReferenceClass(Employee.class);
9191

9292
ExpressionBuilder builder = new ExpressionBuilder();
@@ -100,7 +100,7 @@ public static BinaryOperatorTest getSimplePlusTestWithBracketsBeforeComparison()
100100
BinaryOperatorTest theTest = new BinaryOperatorTest();
101101

102102
theTest.setName("Simple Plus test with brackets before comparison");
103-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE (emp.salary + 1000) <= 50000");
103+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE (e.salary + 1000) <= 50000");
104104
theTest.setReferenceClass(Employee.class);
105105

106106
ExpressionBuilder builder = new ExpressionBuilder();
@@ -114,7 +114,7 @@ public static BinaryOperatorTest getSimplePlusTestWithBracketsAfterComparison()
114114
BinaryOperatorTest theTest = new BinaryOperatorTest();
115115

116116
theTest.setName("Simple Plus test with brackets after comparison");
117-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE 50000 > (emp.salary + 1000)");
117+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE 50000 > (e.salary + 1000)");
118118
theTest.setReferenceClass(Employee.class);
119119

120120
ExpressionBuilder builder = new ExpressionBuilder();
@@ -128,7 +128,7 @@ public static BinaryOperatorTest getSimpleMinusTest() {
128128
BinaryOperatorTest theTest = new BinaryOperatorTest();
129129

130130
theTest.setName("Simple Minus test");
131-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.salary - 1000 <= 50000");
131+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.salary - 1000 <= 50000");
132132
theTest.setReferenceClass(Employee.class);
133133

134134
ExpressionBuilder builder = new ExpressionBuilder();
@@ -142,7 +142,7 @@ public static BinaryOperatorTest getSimpleMinusTestWithBracketsBeforeComparison(
142142
BinaryOperatorTest theTest = new BinaryOperatorTest();
143143

144144
theTest.setName("Simple Minus test with Brackets Before Comparison");
145-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE (emp.salary - 1000) <= 50000");
145+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE (e.salary - 1000) <= 50000");
146146
theTest.setReferenceClass(Employee.class);
147147

148148
ExpressionBuilder builder = new ExpressionBuilder();
@@ -156,7 +156,7 @@ public static BinaryOperatorTest getSimpleMinusTestWithBracketsAfterComparison()
156156
BinaryOperatorTest theTest = new BinaryOperatorTest();
157157

158158
theTest.setName("Simple Minus test with Brackets After Comparison");
159-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE 50000 > (emp.salary - 1000)");
159+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE 50000 > (e.salary - 1000)");
160160
theTest.setReferenceClass(Employee.class);
161161

162162
ExpressionBuilder builder = new ExpressionBuilder();
@@ -170,7 +170,7 @@ public static BinaryOperatorTest getSimpleMultiplyTest() {
170170
BinaryOperatorTest theTest = new BinaryOperatorTest();
171171

172172
theTest.setName("Simple Multiply test");
173-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.salary * 2 <= 100000");
173+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.salary * 2 <= 100000");
174174
theTest.setReferenceClass(Employee.class);
175175

176176
ExpressionBuilder builder = new ExpressionBuilder();
@@ -184,7 +184,7 @@ public static BinaryOperatorTest getSimpleMultiplyTestWithBracketsBeforeComparis
184184
BinaryOperatorTest theTest = new BinaryOperatorTest();
185185

186186
theTest.setName("Simple Multiply test with brackets before comparison");
187-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE (emp.salary * 2) <= 100000");
187+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE (e.salary * 2) <= 100000");
188188
theTest.setReferenceClass(Employee.class);
189189

190190
ExpressionBuilder builder = new ExpressionBuilder();
@@ -198,7 +198,7 @@ public static BinaryOperatorTest getSimpleMultiplyTestWithBracketsAfterCompariso
198198
BinaryOperatorTest theTest = new BinaryOperatorTest();
199199

200200
theTest.setName("Simple Multiply test with brackets after comparison");
201-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE 100000 > (emp.salary * 2)");
201+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE 100000 > (e.salary * 2)");
202202
theTest.setReferenceClass(Employee.class);
203203

204204
ExpressionBuilder builder = new ExpressionBuilder();
@@ -212,7 +212,7 @@ public static BinaryOperatorTest getSimpleDivideTest() {
212212
BinaryOperatorTest theTest = new BinaryOperatorTest();
213213

214214
theTest.setName("Simple Divide test");
215-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE emp.salary / 2 <= 20000");
215+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE e.salary / 2 <= 20000");
216216
theTest.setReferenceClass(Employee.class);
217217

218218
ExpressionBuilder builder = new ExpressionBuilder();
@@ -226,7 +226,7 @@ public static BinaryOperatorTest getSimpleDivideTestWithBracketsBeforeComparison
226226
BinaryOperatorTest theTest = new BinaryOperatorTest();
227227

228228
theTest.setName("Simple Divide test with brackets before comparison");
229-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE (emp.salary / 2) <= 20000");
229+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE (e.salary / 2) <= 20000");
230230
theTest.setReferenceClass(Employee.class);
231231

232232
ExpressionBuilder builder = new ExpressionBuilder();
@@ -240,7 +240,7 @@ public static BinaryOperatorTest getSimpleDivideTestWithBracketsAfterComparison(
240240
BinaryOperatorTest theTest = new BinaryOperatorTest();
241241

242242
theTest.setName("Simple Divide test with brackets after comparison");
243-
theTest.setEjbqlString("SELECT OBJECT(emp) FROM Employee emp WHERE 20000 > (emp.salary / 2)");
243+
theTest.setEjbqlString("SELECT OBJECT(e) FROM Employee e WHERE 20000 > (e.salary / 2)");
244244
theTest.setReferenceClass(Employee.class);
245245

246246
ExpressionBuilder builder = new ExpressionBuilder();

0 commit comments

Comments
 (0)