Search in sources :

Example 26 with Employee

use of org.seasar.doma.it.entity.Employee in project doma by domaframework.

the class SqlFileSelectTest method testEnsureResultMappping_false.

@Test
public void testEnsureResultMappping_false(Config config) throws Exception {
    EmployeeDao dao = new EmployeeDaoImpl(config);
    List<Employee> employees = dao.selectOnlyNameWithoutMappingCheck();
    assertEquals(14, employees.size());
}
Also used : EmployeeDao(org.seasar.doma.it.dao.EmployeeDao) Employee(org.seasar.doma.it.entity.Employee) EmployeeDaoImpl(org.seasar.doma.it.dao.EmployeeDaoImpl) Test(org.junit.jupiter.api.Test)

Example 27 with Employee

use of org.seasar.doma.it.entity.Employee in project doma by domaframework.

the class SqlFileSelectTest method testNull.

@Test
public void testNull(Config config) throws Exception {
    EmployeeDao dao = new EmployeeDaoImpl(config);
    Employee employee = dao.selectById(9);
    assertNull(employee.getManagerId());
}
Also used : EmployeeDao(org.seasar.doma.it.dao.EmployeeDao) Employee(org.seasar.doma.it.entity.Employee) EmployeeDaoImpl(org.seasar.doma.it.dao.EmployeeDaoImpl) Test(org.junit.jupiter.api.Test)

Example 28 with Employee

use of org.seasar.doma.it.entity.Employee in project doma by domaframework.

the class AutoProcedureTest method testResultSet.

@Test
public void testResultSet(Config config) throws Exception {
    ProcedureDao dao = new ProcedureDaoImpl(config);
    List<Employee> employees = new ArrayList<>();
    dao.proc_resultset(employees, 1);
    assertEquals(13, employees.size());
}
Also used : ProcedureDao(org.seasar.doma.it.dao.ProcedureDao) Employee(org.seasar.doma.it.entity.Employee) ProcedureDaoImpl(org.seasar.doma.it.dao.ProcedureDaoImpl) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Example 29 with Employee

use of org.seasar.doma.it.entity.Employee in project doma by domaframework.

the class AutoProcedureTest method testResultSet_Out.

@Test
public void testResultSet_Out(Config config) throws Exception {
    ProcedureDao dao = new ProcedureDaoImpl(config);
    List<Employee> employees = new ArrayList<>();
    Reference<Integer> count = new Reference<>();
    dao.proc_resultset_out(employees, 1, count);
    assertEquals(13, employees.size());
    assertEquals(Integer.valueOf(14), count.get());
}
Also used : ProcedureDao(org.seasar.doma.it.dao.ProcedureDao) Employee(org.seasar.doma.it.entity.Employee) ProcedureDaoImpl(org.seasar.doma.it.dao.ProcedureDaoImpl) Reference(org.seasar.doma.jdbc.Reference) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Example 30 with Employee

use of org.seasar.doma.it.entity.Employee in project doma by domaframework.

the class AutoProcedureTest method testResultSetAndUpdate_Out.

@Test
public void testResultSetAndUpdate_Out(Config config) throws Exception {
    ProcedureDao dao = new ProcedureDaoImpl(config);
    List<Employee> employees = new ArrayList<>();
    List<Department> departments = new ArrayList<>();
    Reference<Integer> count = new Reference<>();
    dao.proc_resultsets_updates_out(employees, departments, 1, 1, count);
    assertEquals(13, employees.size());
    assertEquals(3, departments.size());
    assertEquals(Integer.valueOf(14), count.get());
}
Also used : Department(org.seasar.doma.it.entity.Department) ProcedureDao(org.seasar.doma.it.dao.ProcedureDao) Employee(org.seasar.doma.it.entity.Employee) ProcedureDaoImpl(org.seasar.doma.it.dao.ProcedureDaoImpl) Reference(org.seasar.doma.jdbc.Reference) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Aggregations

Employee (org.seasar.doma.it.entity.Employee)63 Test (org.junit.jupiter.api.Test)61 EmployeeDao (org.seasar.doma.it.dao.EmployeeDao)40 EmployeeDaoImpl (org.seasar.doma.it.dao.EmployeeDaoImpl)40 Run (org.seasar.doma.it.Run)11 ArrayList (java.util.ArrayList)8 CompKeyEmployeeDao (org.seasar.doma.it.dao.CompKeyEmployeeDao)8 CompKeyEmployeeDaoImpl (org.seasar.doma.it.dao.CompKeyEmployeeDaoImpl)8 ProcedureDao (org.seasar.doma.it.dao.ProcedureDao)8 ProcedureDaoImpl (org.seasar.doma.it.dao.ProcedureDaoImpl)8 CompKeyEmployee (org.seasar.doma.it.entity.CompKeyEmployee)8 SelectBuilder (org.seasar.doma.jdbc.builder.SelectBuilder)7 Department (org.seasar.doma.it.entity.Department)6 SelectOptions (org.seasar.doma.jdbc.SelectOptions)5 DepartmentDao (org.seasar.doma.it.dao.DepartmentDao)4 DepartmentDaoImpl (org.seasar.doma.it.dao.DepartmentDaoImpl)4 FunctionDao (org.seasar.doma.it.dao.FunctionDao)4 FunctionDaoImpl (org.seasar.doma.it.dao.FunctionDaoImpl)4 Config (org.seasar.doma.jdbc.Config)3 BigDecimal (java.math.BigDecimal)2