use of com.autentia.tnt.dao.hibernate.ProvinceDAO in project TNTConcept by autentia.
the class ContactPositionManagerTest method insertInitialData.
/**
* Metodo encargado de insertar datos muy generales pero que son necesarios
* en la gestion de contactos
*/
private void insertInitialData() {
final ProvinceDAO provinceDAO = (ProvinceDAO) SpringUtilsForTesting.getSpringBean("daoProvince");
final OrganizationISOCategoryDAO organizationISOCategoryDAO = (OrganizationISOCategoryDAO) SpringUtilsForTesting.getSpringBean("daoOrganizationISOCategory");
final OrganizationTypeDAO organizationTypeDAO = (OrganizationTypeDAO) SpringUtilsForTesting.getSpringBean("daoOrganizationType");
final OrganizationDAO organizationDAO = (OrganizationDAO) SpringUtilsForTesting.getSpringBean("daoOrganization");
final DepartmentDAO departmentDAO = (DepartmentDAO) SpringUtilsForTesting.getSpringBean("daoDepartment");
// provincia
province.setName("Madrid");
provinceDAO.insert(province);
// categoria de la organizacion
organizationType.setName("prospecto");
organizationTypeDAO.insert(organizationType);
// categoria ISO de la organizacion
organizationISOCategory.setName("A");
organizationISOCategoryDAO.insert(organizationISOCategory);
// organizacion
organization.setName("Tecnologías de España");
organization.setProvince(province);
organization.setType(organizationType);
organization.setCategory(organizationISOCategory);
organizationDAO.insert(organization);
// departamento
department.setName("comercial");
department.setDescription("comercial");
departmentDAO.insert(department);
}
Aggregations