Skip to content

Commit

Permalink
Javadoc bugfix and JDK 14 build fix (#737)
Browse files Browse the repository at this point in the history
This one contains two fixes:

    Javadoc generation fix in org.eclipse.persistence.config.PersistenceUnitProperties
    Fix to allow build on JDK 14
    In JDK 14 is new class java.lang.Record which leads into compilation errors like
    ....error: reference to Record is ambiguous....
    There is collision with:
    org.eclipse.persistence.sessions.Record in org.eclipse.persistence.core and org.eclipse.persistence.core.test modules
    and
    javax.resource.cci.Record in org.eclipse.persistence.nosql module
    Usage/declaration of Record class is transformed into qualified form like org.eclipse.persistence.sessions.Record or javax.resource.cci.Record to exactly specify this class.
  • Loading branch information
rfelcman authored Mar 26, 2020
1 parent 6c1d2c4 commit d50366e
Show file tree
Hide file tree
Showing 37 changed files with 133 additions and 133 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -76,7 +76,7 @@ public Time[] getNormalHours() {
* @return java.sql.Time[]
* @param row org.eclipse.persistence.sessions.DatabaseRecord
*/
public Time[] getNormalHoursFromRow(Record row) {
public Time[] getNormalHoursFromRow(org.eclipse.persistence.sessions.Record row) {
Time[] hours = new Time[2];
hours[0] = (Time)row.get("START_TIME");
hours[1] = (Time)row.get("END_TIME");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -172,7 +172,7 @@ public void addResponsibility(String responsibility) {
* IMPORTANT: This method builds the value but does not set it.
* The mapping will set it using method or direct access as defined in the descriptor.
*/
public Time[] buildNormalHours(Record row, Session session) {
public Time[] buildNormalHours(org.eclipse.persistence.sessions.Record row, Session session) {
Time[] hours = new Time[2];

/** This conversion allows for the database type not to match, i.e. may be a Timestamp or String. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -116,7 +116,7 @@ public static Mainframe example5() {
return mainframe;
}

public static Class getClassFromRow(Record row) {
public static Class getClassFromRow(org.eclipse.persistence.sessions.Record row) {
if (row.get("CTYPE").equals("PC")) {
if (row.get("PCTYPE").equals("IBM")) {
return org.eclipse.persistence.testing.models.inheritance.IBMPC.class;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -75,7 +75,7 @@ public String getProvinceFromObject() {
return province;
}

public String getProvinceFromRow(Record row, Session session) {
public String getProvinceFromRow(org.eclipse.persistence.sessions.Record row, Session session) {
String code = (String)row.get("PROVINCE");
String provinceString = null;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -491,7 +491,7 @@ public Integer getRankFromObject() {
return rank;
}

public String getRankFromRow(Record row, Session aSession) {
public String getRankFromRow(org.eclipse.persistence.sessions.Record row, Session aSession) {
if (row.get("RANK") == null) {
return null;
}
Expand Down Expand Up @@ -557,7 +557,7 @@ public void setComputer(Hardware computer) {
this.computer = computer;
}

public java.util.Date setDateAndTime(Record row, org.eclipse.persistence.sessions.Session session) {
public java.util.Date setDateAndTime(org.eclipse.persistence.sessions.Record row, org.eclipse.persistence.sessions.Session session) {
java.sql.Date sqlDateOfBirth = (java.sql.Date)ConversionManager.getDefaultManager().convertObject(row.get("BDAY"), java.sql.Date.class);
java.sql.Time timeOfBirth = (java.sql.Time)session.getLogin().getPlatform().convertObject(row.get("BTIME"), java.sql.Time.class);
if ((timeOfBirth == null) || (sqlDateOfBirth == null)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -153,13 +153,13 @@ public int getTotal() {
return ((Integer)total.getValue()).intValue();
}

public int getTotalFromRow(Record row, Session session) {
public int getTotalFromRow(org.eclipse.persistence.sessions.Record row, Session session) {
int tens = ((Number)row.get("TOTT")).intValue();
int ones = ((Number)row.get("TOTO")).intValue();
return (tens * 10) + ones;
}

public int getTotalFromRow2(Record row, Session session) {
public int getTotalFromRow2(org.eclipse.persistence.sessions.Record row, Session session) {
int tens = ((Number)row.get("TOTT2")).intValue();
int ones = ((Number)row.get("TOTO2")).intValue();
return (tens * 10) + ones;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -138,7 +138,7 @@ class ModifyRowModifier extends DescriptorEventAdapter {
public static final String OMISSION_MARKER = "omit_this_field";

public void aboutToInsert(DescriptorEvent event) {
Record modifyRow = event.getRecord();
org.eclipse.persistence.sessions.Record modifyRow = event.getRecord();
Object[] keys = modifyRow.keySet().toArray();
for (int i = 0; i < keys.length; i++) {
Object key = keys[i];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -123,7 +123,7 @@ public void addResponsibility(String responsibility) {
* IMPORTANT: This method builds the value but does not set it.
* The mapping will set it using method or direct access as defined in the descriptor.
*/
public Time[] buildNormalHours(Record row, Session session) {
public Time[] buildNormalHours(org.eclipse.persistence.sessions.Record row, Session session) {
Time[] hours = new Time[2];

/** This conversion allows for the database type not to match, i.e. may be a Timestamp or String. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -71,7 +71,7 @@ public void testStackContainerPolicy() {

stack = (Stack)getSession().executeQuery(query);
// if we get here, we must not have generated a ClassCastException
Record row = (Record)stack.peek();
org.eclipse.persistence.sessions.Record row = (org.eclipse.persistence.sessions.Record)stack.peek();
if (row.get("F_NAME") == null) {
throw new TestErrorException("missing data");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -59,7 +59,7 @@ public void reset() {
* Below are the methods called by the redirectors for various toplink queries
*/

public static Object readObject(DatabaseQuery query, Record row, org.eclipse.persistence.sessions.Session session) {
public static Object readObject(DatabaseQuery query, org.eclipse.persistence.sessions.Record row, org.eclipse.persistence.sessions.Session session) {
throw new TestErrorException("Query setting doNotRedirect was ignored");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -40,7 +40,7 @@ public void test() {

protected void verify() {
for (int i = 0; i < orderedQueryObjects.size(); i++) {
Record row = (Record)customSQLRows.elementAt(i);
org.eclipse.persistence.sessions.Record row = (org.eclipse.persistence.sessions.Record)customSQLRows.elementAt(i);
Employee employee = (Employee)orderedQueryObjects.elementAt(i);
String city = (String)row.get("CITY");
String street = (String)row.get("STREET");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -41,12 +41,12 @@ protected Vector executeOrderingQuery(Class class1, String orderField) {
}

protected void verify() {
Record row;
org.eclipse.persistence.sessions.Record row;
org.eclipse.persistence.testing.models.employee.domain.Project project;
String name;

for (int i = 0; i < orderedQueryObjects.size(); i++) {
row = (Record)customSQLRows.elementAt(i);
row = (org.eclipse.persistence.sessions.Record)customSQLRows.elementAt(i);
project = (org.eclipse.persistence.testing.models.employee.domain.Project)orderedQueryObjects.elementAt(i);
name = (String)row.get("PROJ_NAME");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -46,13 +46,13 @@ public void test() {
}

protected void verify() {
Record row;
org.eclipse.persistence.sessions.Record row;
Employee employee;
String firstName;
String lastName;

for (int i = 0; i < orderedQueryObjects.size(); i++) {
row = (Record)customSQLRows.elementAt(i);
row = (org.eclipse.persistence.sessions.Record)customSQLRows.elementAt(i);
employee = (Employee)orderedQueryObjects.elementAt(i);
firstName = (String)row.get("F_NAME");
lastName = (String)row.get("L_NAME");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -42,7 +42,7 @@ public void test() {

protected void verify() {
for (int i = 0; i < orderedQueryObjects.size(); i++) {
Record row = (Record)customSQLRows.elementAt(i);
org.eclipse.persistence.sessions.Record row = (org.eclipse.persistence.sessions.Record)customSQLRows.elementAt(i);
Employee employee = (Employee)orderedQueryObjects.elementAt(i);
String city = (String)row.get("CITY");
String name = (String)row.get("F_NAME");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -159,27 +159,27 @@ public void reset() {
*/
public static

Object deleteObject(DatabaseQuery query, Record row, org.eclipse.persistence.sessions.Session session) {
Object deleteObject(DatabaseQuery query, org.eclipse.persistence.sessions.Record row, org.eclipse.persistence.sessions.Session session) {
redirectedDeleteObject = true;
return null;
}

public static Object insertObject(DatabaseQuery query, Record row, org.eclipse.persistence.sessions.Session session) {
public static Object insertObject(DatabaseQuery query, org.eclipse.persistence.sessions.Record row, org.eclipse.persistence.sessions.Session session) {
redirectedInsert = true;
return null;
}

public static Object readAll(DatabaseQuery query, Record row, org.eclipse.persistence.sessions.Session session) {
public static Object readAll(DatabaseQuery query, org.eclipse.persistence.sessions.Record row, org.eclipse.persistence.sessions.Session session) {
redirectedReadAll = true;
return null;
}

public static Object readObject(DatabaseQuery query, Record row, org.eclipse.persistence.sessions.Session session) {
public static Object readObject(DatabaseQuery query, org.eclipse.persistence.sessions.Record row, org.eclipse.persistence.sessions.Session session) {
redirectedReadObject = true;
return null;
}

public static Object updateObject(DatabaseQuery query, Record row, org.eclipse.persistence.sessions.Session session) {
public static Object updateObject(DatabaseQuery query, org.eclipse.persistence.sessions.Record row, org.eclipse.persistence.sessions.Session session) {
redirectedUpdate = true;
return null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -208,8 +208,8 @@ protected void createUpdateTrigger(Session session, DatabaseField field, UpdateI
session.executeQuery(query);
}

protected Record getRowForInsert(Record rowToInsert) {
Record row = new DatabaseRecord();
protected org.eclipse.persistence.sessions.Record getRowForInsert(org.eclipse.persistence.sessions.Record rowToInsert) {
org.eclipse.persistence.sessions.Record row = new DatabaseRecord();
Enumeration insertFields = insertInfos.keys();
while (insertFields.hasMoreElements()) {
DatabaseField field = (DatabaseField)insertFields.nextElement();
Expand All @@ -222,8 +222,8 @@ protected Record getRowForInsert(Record rowToInsert) {
return row;
}

protected Record getRowForUpdate(Record rowChange) {
Record row = new DatabaseRecord();
protected org.eclipse.persistence.sessions.Record getRowForUpdate(org.eclipse.persistence.sessions.Record rowChange) {
org.eclipse.persistence.sessions.Record row = new DatabaseRecord();
Enumeration updateFields = updateInfos.keys();
while (updateFields.hasMoreElements()) {
DatabaseField field = (DatabaseField)updateFields.nextElement();
Expand Down
Loading

0 comments on commit d50366e

Please sign in to comment.