Examples of IdClassExampleEmployeePK


Examples of org.springframework.data.jpa.domain.sample.IdClassExampleEmployeePK

    IdClassExampleEmployee emp = new IdClassExampleEmployee();
    emp.setDepartment(dep);

    employeeRepositoryWithIdClass.save(emp);

    IdClassExampleEmployeePK key = new IdClassExampleEmployeePK();
    key.setDepartment(dep.getDepartmentId());
    key.setEmpId(emp.getEmpId());
    IdClassExampleEmployee persistedEmp = employeeRepositoryWithIdClass.findOne(key);

    assertThat(persistedEmp, is(notNullValue()));
    assertThat(persistedEmp.getDepartment(), is(notNullValue()));
    assertThat(persistedEmp.getDepartment().getName(), is(dep.getName()));
View Full Code Here

Examples of org.springframework.data.jpa.domain.sample.IdClassExampleEmployeePK

    IdClassExampleEmployee emp = new IdClassExampleEmployee();
    emp.setDepartment(dep);

    employeeRepositoryWithIdClass.save(emp);

    IdClassExampleEmployeePK key = new IdClassExampleEmployeePK();
    key.setDepartment(dep.getDepartmentId());
    key.setEmpId(emp.getEmpId());

    assertThat(employeeRepositoryWithIdClass.exists(key), is(true));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.