================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.40
Report generated at Fri Jul 14 15:07:21 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java Fri Jul 14 15:07:20 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.40 Mon Jul 10 14:50:12 2006
***************
*** 30,36 ****
import java.io.StringWriter;
import java.util.List;
- import java.util.Collection;
import javax.persistence.EntityExistsException;
import javax.persistence.EntityManager;
--- 30,35 ----
***************
*** 61,67 ****
import oracle.toplink.essentials.testing.models.cmp3.advanced.Employee;
import oracle.toplink.essentials.testing.models.cmp3.advanced.AdvancedTableCreator;
import oracle.toplink.essentials.testing.models.cmp3.advanced.Address;
- import oracle.toplink.essentials.testing.models.cmp3.advanced.Department;
import java.util.Iterator;
--- 60,65 ----
***************
*** 101,107 ****
// JUnit framework will automatically execute all methods starting with test...
public void testRefreshNotManaged() {
EntityManager em = createEntityManager();
! em.getTransaction().begin();
Employee emp = new Employee();
emp.setFirstName("testRefreshNotManaged");
try {
--- 99,105 ----
// JUnit framework will automatically execute all methods starting with test...
public void testRefreshNotManaged() {
EntityManager em = createEntityManager();
! em.getTransaction().begin();;
Employee emp = new Employee();
emp.setFirstName("testRefreshNotManaged");
try {
***************
*** 2192,2243 ****
}
}
- public void testMergeDetachedObject() {
- // Step 1 - read a department and clear the cache.
- clearCache();
- EntityManager em = createEntityManager();
- EJBQueryImpl query = (EJBQueryImpl) em.createNamedQuery("findAllSQLDepartments");
- Collection departments = query.getResultCollection();
-
- Department detachedDepartment;
-
- // This test seems to get called twice. Once with departments populated
- // and a second time with the department table empty.
- if (departments.isEmpty()) {
- em.getTransaction().begin();
- detachedDepartment = new Department();
- detachedDepartment.setName("Department X");
- em.persist(detachedDepartment);
- em.getTransaction().commit();
- } else {
- detachedDepartment = (Department) departments.iterator().next();
- }
-
- em.close();
- clearCache();
-
- // Step 2 - create a new em, create a new employee with the
- // detached department and then query the departments again.
- em = createEntityManager();
- em.getTransaction().begin();
-
- Employee emp = new Employee();
- emp.setFirstName("Crazy");
- emp.setLastName("Kid");
- emp.setDepartment(detachedDepartment);
-
- em.persist(emp);
- em.getTransaction().commit();
-
- try {
- ((EJBQueryImpl) em.createNamedQuery("findAllSQLDepartments")).getResultCollection();
- } catch (NullPointerException e) {
- assertTrue("The detached department caused a null pointer on the query execution.", false);
- }
-
- em.close();
- }
-
public static void main(String[] args) {
// Now run JUnit.
junit.swingui.TestRunner.main(args);
--- 2190,2195 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Department.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.0
Report generated at Fri Jul 14 15:07:21 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Department.java Fri Jul 14 15:06:55 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.0 Fri Jul 14 15:06:56 2006
***************
*** 1,92 ****
- /*
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the "License"). You may not use this file except
- * in compliance with the License.
- *
- * You can obtain a copy of the license at
- * glassfish/bootstrap/legal/CDDLv1.0.txt or
- * https://glassfish.dev.java.net/public/CDDLv1.0.html.
- * See the License for the specific language governing
- * permissions and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * HEADER in each file and include the License file at
- * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
- * add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your
- * own identifying information: Portions Copyright [yyyy]
- * [name of copyright owner]
- */
- // Copyright (c) 1998, 2006, Oracle. All rights reserved.
-
-
- // Copyright (c) 1998, 2006, Oracle. All rights reserved.
- package oracle.toplink.essentials.testing.models.cmp3.advanced;
-
- import java.io.Serializable;
- import javax.persistence.*;
- import static javax.persistence.GenerationType.*;
- import java.util.*;
- import static javax.persistence.CascadeType.*;
- import static javax.persistence.FetchType.*;
-
- /**
- *
Purpose: Represents the department of an Employee
- *
Description: Held in a private 1:1 relationship from Employee
- * @see Employee
- */
- @Entity(name="ADV_DEPT")
- @Table(name="CMP3_DEPT")
- @NamedNativeQuery(
- name="findAllSQLDepartments",
- query="select * from CMP3_DEPT",
- resultClass=oracle.toplink.essentials.testing.models.cmp3.advanced.Department.class
- )
- public class Department implements Serializable {
- private Integer id;
- private String name;
- private Collection employees;
-
- public Department() {
- this("");
- }
-
- public Department(String name) {
- this.name = name;
- }
-
- @Id
- @GeneratedValue(strategy=TABLE, generator="DEPARTMENT_TABLE_GENERATOR")
- @TableGenerator(
- name="DEPARTMENT_TABLE_GENERATOR",
- table="CMP3_DEPARTMENT_SEQ",
- pkColumnName="SEQ_NAME",
- valueColumnName="SEQ_COUNT",
- pkColumnValue="DEPT_SEQ"
- )
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @OneToMany(fetch=EAGER, mappedBy="department")
- public Collection getEmployees() {
- return employees;
- }
-
- public void setEmployees(Collection employees) {
- this.employees = employees;
- }
- }
\ No newline at end of file
--- 0 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Employee.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.17
Report generated at Fri Jul 14 15:07:21 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Employee.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.17 Wed Jul 12 13:56:19 2006
***************
*** 59,69 ****
@Table(name="CMP3_EMPLOYEE")
@SecondaryTable(name="CMP3_SALARY")
@PrimaryKeyJoinColumn(name="EMP_ID", referencedColumnName="EMP_ID")
- @NamedNativeQuery(
- name="findAllSQLEmployees",
- query="select * from CMP3_EMPLOYEE",
- resultClass=oracle.toplink.essentials.testing.models.cmp3.advanced.Employee.class
- )
@NamedQueries({
@NamedQuery(
name="findAllEmployeesByFirstName",
--- 59,64 ----
***************
*** 89,95 ****
private String firstName;
private String lastName;
private Address address;
- private Department department;
private Collection phoneNumbers;
private Collection projects;
private int salary;
--- 84,89 ----
***************
*** 165,181 ****
public void setAddress(Address address) {
this.address = address;
}
!
! @ManyToOne(fetch=EAGER)
! @JoinColumn(name="DEPT_ID")
! public Department getDepartment() {
! return department;
! }
!
! public void setDepartment(Department department) {
! this.department = department;
! }
!
@OneToMany(cascade=ALL, mappedBy="owner")
public Collection getPhoneNumbers() {
return phoneNumbers;
--- 159,165 ----
public void setAddress(Address address) {
this.address = address;
}
!
@OneToMany(cascade=ALL, mappedBy="owner")
public Collection getPhoneNumbers() {
return phoneNumbers;
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/AdvancedTableCreator.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.10
Report generated at Fri Jul 14 15:07:21 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/AdvancedTableCreator.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.10 Wed Jul 12 13:59:31 2006
***************
*** 39,45 ****
addTableDefinition(buildSALARYTable());
addTableDefinition(buildPLATINUMBUYERTable());
addTableDefinition(buildBUYERTable());
- addTableDefinition(buildDEPTTable());
}
public static TableDefinition buildADDRESSTable() {
--- 39,44 ----
***************
*** 209,226 ****
field10.setUnique(false );
field10.setIsIdentity(false );
table.addField(field10);
-
- // SECTION: FIELD
- FieldDefinition fieldDEPT = new FieldDefinition();
- fieldDEPT.setName("DEPT_ID");
- fieldDEPT.setTypeName("NUMERIC");
- fieldDEPT.setSize(15);
- fieldDEPT.setShouldAllowNull(true);
- fieldDEPT.setIsPrimaryKey(false);
- fieldDEPT.setUnique(false);
- fieldDEPT.setIsIdentity(false);
- fieldDEPT.setForeignKeyFieldName("CMP3_DEPT.ID");
- table.addField(fieldDEPT);
/* ForeignKeyConstraint foreignKeyEMPLOYEE_ADDRESS = new ForeignKeyConstraint();
foreignKeyEMPLOYEE_ADDRESS.setName("EMPLOYEE_ADDRESS");
--- 208,213 ----
***************
*** 614,646 ****
return table;
}
-
- public static TableDefinition buildDEPTTable() {
- TableDefinition table = new TableDefinition();
- table.setName("CMP3_DEPT");
- FieldDefinition fieldID = new FieldDefinition();
- fieldID.setName("ID");
- fieldID.setTypeName("NUMERIC");
- fieldID.setSize(15);
- fieldID.setSubSize(0);
- fieldID.setIsPrimaryKey(true);
- fieldID.setIsIdentity(true);
- fieldID.setUnique(false);
- fieldID.setShouldAllowNull(false);
- table.addField(fieldID);
-
- FieldDefinition fieldNAME = new FieldDefinition();
- fieldNAME.setName("NAME");
- fieldNAME.setTypeName("VARCHAR2");
- fieldNAME.setSize(60);
- fieldNAME.setSubSize(0);
- fieldNAME.setIsPrimaryKey(false);
- fieldNAME.setIsIdentity(false);
- fieldNAME.setUnique(false);
- fieldNAME.setShouldAllowNull(true);
- table.addField(fieldNAME);
-
- return table;
- }
}
--- 601,605 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/EmployeePopulator.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.6
Report generated at Fri Jul 14 15:07:21 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/EmployeePopulator.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.6 Wed Jul 12 15:29:02 2006
***************
*** 215,221 ****
employee.setSalary(35000);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
- employee.setDepartment(departmentExample1());
//employee.addResponsibility("Make the coffee.");
//employee.addResponsibility("Clean the kitchen.");
employee.addPhoneNumber(phoneNumberExample1());
--- 215,220 ----
***************
*** 354,360 ****
//employee.setNormalHours(new Time[] { new Time(startCalendar.getTime().getTime()), new Time(endCalendar.getTime().getTime()) });
employee.setPeriod(employmentPeriodExample2());
employee.setAddress(addressExample2());
- employee.setDepartment(departmentExample2());
//employee.addResponsibility("Fire people for goofing off.");
//employee.addResponsibility("Hire people when more people are required.");
--- 353,358 ----
***************
*** 381,387 ****
//employee.setNormalHours(new Time[] { new Time(startCalendar.getTime().getTime()), new Time(endCalendar.getTime().getTime()) });
employee.setPeriod(employmentPeriodExample6());
employee.setAddress(addressExample6());
- employee.setDepartment(departmentExample3());
//employee.addResponsibility("Write lots of Java code.");
employee.addPhoneNumber(phoneNumberExample5());
--- 379,384 ----
***************
*** 902,925 ****
public GoldBuyer createGoldBuyer() {
return new GoldBuyer();
}
!
! public Department departmentExample1() {
! Department department = new Department();
! department.setName("Department 1");
! return department;
! }
!
! public Department departmentExample2() {
! Department department = new Department();
! department.setName("Department 2");
! return department;
! }
!
! public Department departmentExample3() {
! Department department = new Department();
! department.setName("Department 3");
! return department;
! }
public Employee employeeExample1() {
if (containsObject(Employee.class, "0001")) {
--- 899,905 ----
public GoldBuyer createGoldBuyer() {
return new GoldBuyer();
}
!
public Employee employeeExample1() {
if (containsObject(Employee.class, "0001")) {
================================================================================
Merge Diffs: /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/sessions/UnitOfWorkImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.24
Report generated at Fri Jul 14 15:07:21 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/sessions/UnitOfWorkImpl.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.24 Thu Jul 13 14:45:00 2006
***************
*** 441,447 ****
// Assume it is an unregisteredNewObject, but this is worrisome, as
// it may be an unregistered existing object, not in the parent cache?
Object backup = builder.instantiateClone(workingClone, this);
!
// Original is fine for backup as state is the same.
getCloneMapping().put(workingClone, backup);
--- 441,447 ----
// Assume it is an unregisteredNewObject, but this is worrisome, as
// it may be an unregistered existing object, not in the parent cache?
Object backup = builder.instantiateClone(workingClone, this);
!
// Original is fine for backup as state is the same.
getCloneMapping().put(workingClone, backup);
***************
*** 2359,2365 ****
*/
public boolean isObjectNew(Object clone) {
//CR3678 - ported from 4.0
! return (isCloneNewObject(clone) || (!isObjectRegistered(clone) && !getReadOnlyClasses().contains(clone.getClass()) && !getUnregisteredExistingObjects().contains(clone)));
}
/**
--- 2359,2365 ----
*/
public boolean isObjectNew(Object clone) {
//CR3678 - ported from 4.0
! return (isCloneNewObject(clone) || (!isObjectRegistered(clone) && !getReadOnlyClasses().contains(clone.getClass())));
}
/**
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.40
Report generated at Fri Jul 14 15:24:24 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java Fri Jul 14 15:07:20 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.40 Mon Jul 10 14:50:12 2006
***************
*** 30,36 ****
import java.io.StringWriter;
import java.util.List;
- import java.util.Collection;
import javax.persistence.EntityExistsException;
import javax.persistence.EntityManager;
--- 30,35 ----
***************
*** 61,67 ****
import oracle.toplink.essentials.testing.models.cmp3.advanced.Employee;
import oracle.toplink.essentials.testing.models.cmp3.advanced.AdvancedTableCreator;
import oracle.toplink.essentials.testing.models.cmp3.advanced.Address;
- import oracle.toplink.essentials.testing.models.cmp3.advanced.Department;
import java.util.Iterator;
--- 60,65 ----
***************
*** 101,107 ****
// JUnit framework will automatically execute all methods starting with test...
public void testRefreshNotManaged() {
EntityManager em = createEntityManager();
! em.getTransaction().begin();
Employee emp = new Employee();
emp.setFirstName("testRefreshNotManaged");
try {
--- 99,105 ----
// JUnit framework will automatically execute all methods starting with test...
public void testRefreshNotManaged() {
EntityManager em = createEntityManager();
! em.getTransaction().begin();;
Employee emp = new Employee();
emp.setFirstName("testRefreshNotManaged");
try {
***************
*** 2192,2243 ****
}
}
- public void testMergeDetachedObject() {
- // Step 1 - read a department and clear the cache.
- clearCache();
- EntityManager em = createEntityManager();
- EJBQueryImpl query = (EJBQueryImpl) em.createNamedQuery("findAllSQLDepartments");
- Collection departments = query.getResultCollection();
-
- Department detachedDepartment;
-
- // This test seems to get called twice. Once with departments populated
- // and a second time with the department table empty.
- if (departments.isEmpty()) {
- em.getTransaction().begin();
- detachedDepartment = new Department();
- detachedDepartment.setName("Department X");
- em.persist(detachedDepartment);
- em.getTransaction().commit();
- } else {
- detachedDepartment = (Department) departments.iterator().next();
- }
-
- em.close();
- clearCache();
-
- // Step 2 - create a new em, create a new employee with the
- // detached department and then query the departments again.
- em = createEntityManager();
- em.getTransaction().begin();
-
- Employee emp = new Employee();
- emp.setFirstName("Crazy");
- emp.setLastName("Kid");
- emp.setDepartment(detachedDepartment);
-
- em.persist(emp);
- em.getTransaction().commit();
-
- try {
- ((EJBQueryImpl) em.createNamedQuery("findAllSQLDepartments")).getResultCollection();
- } catch (NullPointerException e) {
- assertTrue("The detached department caused a null pointer on the query execution.", false);
- }
-
- em.close();
- }
-
public static void main(String[] args) {
// Now run JUnit.
junit.swingui.TestRunner.main(args);
--- 2190,2195 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Department.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.0
Report generated at Fri Jul 14 15:24:24 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Department.java Fri Jul 14 15:06:55 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.0 Fri Jul 14 15:06:56 2006
***************
*** 1,92 ****
- /*
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the "License"). You may not use this file except
- * in compliance with the License.
- *
- * You can obtain a copy of the license at
- * glassfish/bootstrap/legal/CDDLv1.0.txt or
- * https://glassfish.dev.java.net/public/CDDLv1.0.html.
- * See the License for the specific language governing
- * permissions and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * HEADER in each file and include the License file at
- * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
- * add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your
- * own identifying information: Portions Copyright [yyyy]
- * [name of copyright owner]
- */
- // Copyright (c) 1998, 2006, Oracle. All rights reserved.
-
-
- // Copyright (c) 1998, 2006, Oracle. All rights reserved.
- package oracle.toplink.essentials.testing.models.cmp3.advanced;
-
- import java.io.Serializable;
- import javax.persistence.*;
- import static javax.persistence.GenerationType.*;
- import java.util.*;
- import static javax.persistence.CascadeType.*;
- import static javax.persistence.FetchType.*;
-
- /**
- * Purpose: Represents the department of an Employee
- *
Description: Held in a private 1:1 relationship from Employee
- * @see Employee
- */
- @Entity(name="ADV_DEPT")
- @Table(name="CMP3_DEPT")
- @NamedNativeQuery(
- name="findAllSQLDepartments",
- query="select * from CMP3_DEPT",
- resultClass=oracle.toplink.essentials.testing.models.cmp3.advanced.Department.class
- )
- public class Department implements Serializable {
- private Integer id;
- private String name;
- private Collection employees;
-
- public Department() {
- this("");
- }
-
- public Department(String name) {
- this.name = name;
- }
-
- @Id
- @GeneratedValue(strategy=TABLE, generator="DEPARTMENT_TABLE_GENERATOR")
- @TableGenerator(
- name="DEPARTMENT_TABLE_GENERATOR",
- table="CMP3_DEPARTMENT_SEQ",
- pkColumnName="SEQ_NAME",
- valueColumnName="SEQ_COUNT",
- pkColumnValue="DEPT_SEQ"
- )
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @OneToMany(fetch=EAGER, mappedBy="department")
- public Collection getEmployees() {
- return employees;
- }
-
- public void setEmployees(Collection employees) {
- this.employees = employees;
- }
- }
\ No newline at end of file
--- 0 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Employee.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.17
Report generated at Fri Jul 14 15:24:24 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/Employee.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.17 Wed Jul 12 13:56:19 2006
***************
*** 59,69 ****
@Table(name="CMP3_EMPLOYEE")
@SecondaryTable(name="CMP3_SALARY")
@PrimaryKeyJoinColumn(name="EMP_ID", referencedColumnName="EMP_ID")
- @NamedNativeQuery(
- name="findAllSQLEmployees",
- query="select * from CMP3_EMPLOYEE",
- resultClass=oracle.toplink.essentials.testing.models.cmp3.advanced.Employee.class
- )
@NamedQueries({
@NamedQuery(
name="findAllEmployeesByFirstName",
--- 59,64 ----
***************
*** 89,95 ****
private String firstName;
private String lastName;
private Address address;
- private Department department;
private Collection phoneNumbers;
private Collection projects;
private int salary;
--- 84,89 ----
***************
*** 165,181 ****
public void setAddress(Address address) {
this.address = address;
}
!
! @ManyToOne(fetch=EAGER)
! @JoinColumn(name="DEPT_ID")
! public Department getDepartment() {
! return department;
! }
!
! public void setDepartment(Department department) {
! this.department = department;
! }
!
@OneToMany(cascade=ALL, mappedBy="owner")
public Collection getPhoneNumbers() {
return phoneNumbers;
--- 159,165 ----
public void setAddress(Address address) {
this.address = address;
}
!
@OneToMany(cascade=ALL, mappedBy="owner")
public Collection getPhoneNumbers() {
return phoneNumbers;
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/AdvancedTableCreator.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.10
Report generated at Fri Jul 14 15:24:24 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/AdvancedTableCreator.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.10 Wed Jul 12 13:59:31 2006
***************
*** 39,45 ****
addTableDefinition(buildSALARYTable());
addTableDefinition(buildPLATINUMBUYERTable());
addTableDefinition(buildBUYERTable());
- addTableDefinition(buildDEPTTable());
}
public static TableDefinition buildADDRESSTable() {
--- 39,44 ----
***************
*** 209,226 ****
field10.setUnique(false );
field10.setIsIdentity(false );
table.addField(field10);
-
- // SECTION: FIELD
- FieldDefinition fieldDEPT = new FieldDefinition();
- fieldDEPT.setName("DEPT_ID");
- fieldDEPT.setTypeName("NUMERIC");
- fieldDEPT.setSize(15);
- fieldDEPT.setShouldAllowNull(true);
- fieldDEPT.setIsPrimaryKey(false);
- fieldDEPT.setUnique(false);
- fieldDEPT.setIsIdentity(false);
- fieldDEPT.setForeignKeyFieldName("CMP3_DEPT.ID");
- table.addField(fieldDEPT);
/* ForeignKeyConstraint foreignKeyEMPLOYEE_ADDRESS = new ForeignKeyConstraint();
foreignKeyEMPLOYEE_ADDRESS.setName("EMPLOYEE_ADDRESS");
--- 208,213 ----
***************
*** 614,646 ****
return table;
}
-
- public static TableDefinition buildDEPTTable() {
- TableDefinition table = new TableDefinition();
- table.setName("CMP3_DEPT");
- FieldDefinition fieldID = new FieldDefinition();
- fieldID.setName("ID");
- fieldID.setTypeName("NUMERIC");
- fieldID.setSize(15);
- fieldID.setSubSize(0);
- fieldID.setIsPrimaryKey(true);
- fieldID.setIsIdentity(true);
- fieldID.setUnique(false);
- fieldID.setShouldAllowNull(false);
- table.addField(fieldID);
-
- FieldDefinition fieldNAME = new FieldDefinition();
- fieldNAME.setName("NAME");
- fieldNAME.setTypeName("VARCHAR2");
- fieldNAME.setSize(60);
- fieldNAME.setSubSize(0);
- fieldNAME.setIsPrimaryKey(false);
- fieldNAME.setIsIdentity(false);
- fieldNAME.setUnique(false);
- fieldNAME.setShouldAllowNull(true);
- table.addField(fieldNAME);
-
- return table;
- }
}
--- 601,605 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/EmployeePopulator.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.6
Report generated at Fri Jul 14 15:24:24 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/EmployeePopulator.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.6 Wed Jul 12 15:29:02 2006
***************
*** 215,221 ****
employee.setSalary(35000);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
- employee.setDepartment(departmentExample1());
//employee.addResponsibility("Make the coffee.");
//employee.addResponsibility("Clean the kitchen.");
employee.addPhoneNumber(phoneNumberExample1());
--- 215,220 ----
***************
*** 354,360 ****
//employee.setNormalHours(new Time[] { new Time(startCalendar.getTime().getTime()), new Time(endCalendar.getTime().getTime()) });
employee.setPeriod(employmentPeriodExample2());
employee.setAddress(addressExample2());
- employee.setDepartment(departmentExample2());
//employee.addResponsibility("Fire people for goofing off.");
//employee.addResponsibility("Hire people when more people are required.");
--- 353,358 ----
***************
*** 381,387 ****
//employee.setNormalHours(new Time[] { new Time(startCalendar.getTime().getTime()), new Time(endCalendar.getTime().getTime()) });
employee.setPeriod(employmentPeriodExample6());
employee.setAddress(addressExample6());
- employee.setDepartment(departmentExample3());
//employee.addResponsibility("Write lots of Java code.");
employee.addPhoneNumber(phoneNumberExample5());
--- 379,384 ----
***************
*** 902,925 ****
public GoldBuyer createGoldBuyer() {
return new GoldBuyer();
}
!
! public Department departmentExample1() {
! Department department = new Department();
! department.setName("Department 1");
! return department;
! }
!
! public Department departmentExample2() {
! Department department = new Department();
! department.setName("Department 2");
! return department;
! }
!
! public Department departmentExample3() {
! Department department = new Department();
! department.setName("Department 3");
! return department;
! }
public Employee employeeExample1() {
if (containsObject(Employee.class, "0001")) {
--- 899,905 ----
public GoldBuyer createGoldBuyer() {
return new GoldBuyer();
}
!
public Employee employeeExample1() {
if (containsObject(Employee.class, "0001")) {
================================================================================
Merge Diffs: /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/sessions/UnitOfWorkImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.24
Report generated at Fri Jul 14 15:24:24 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/sessions/UnitOfWorkImpl.java Fri Jul 14 15:07:21 2006
--- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_5348363_060710/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.24 Thu Jul 13 14:45:00 2006
***************
*** 441,447 ****
// Assume it is an unregisteredNewObject, but this is worrisome, as
// it may be an unregistered existing object, not in the parent cache?
Object backup = builder.instantiateClone(workingClone, this);
!
// Original is fine for backup as state is the same.
getCloneMapping().put(workingClone, backup);
--- 441,447 ----
// Assume it is an unregisteredNewObject, but this is worrisome, as
// it may be an unregistered existing object, not in the parent cache?
Object backup = builder.instantiateClone(workingClone, this);
!
// Original is fine for backup as state is the same.
getCloneMapping().put(workingClone, backup);
***************
*** 2359,2365 ****
*/
public boolean isObjectNew(Object clone) {
//CR3678 - ported from 4.0
! return (isCloneNewObject(clone) || (!isObjectRegistered(clone) && !getReadOnlyClasses().contains(clone.getClass()) && !getUnregisteredExistingObjects().contains(clone)));
}
/**
--- 2359,2365 ----
*/
public boolean isObjectNew(Object clone) {
//CR3678 - ported from 4.0
! return (isCloneNewObject(clone) || (!isObjectRegistered(clone) && !getReadOnlyClasses().contains(clone.getClass())));
}
/**