@Test @Sql(scripts = { "/sql/clearBoundary.sql", "/sql/createBoundary.sql" }) public void test_should_fetch_boundaries_for_boundarytype_and_hierarchytype_name() { final List<Boundary> boundarys = boundaryRepository .getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId("City", "ADMINISTRATION", "default"); assertEquals("Srikakulam Municipality", boundarys.get(0).getName()); }
public List<Boundary> getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(final String boundaryTypeName, final String hierarchyTypeName, final String tenantId) { Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("boundaryTypeName", boundaryTypeName); parametersMap.put("hierarchyTypeName", hierarchyTypeName); parametersMap.put("tenantId", tenantId); List<Boundary> BoundaryList = namedParameterJdbcTemplate.query( BoundaryQueryBuilder.getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(), parametersMap, new BoundaryIdRowMapper()); return BoundaryList; }
BoundaryRepository { public List<Boundary> getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(final String boundaryTypeName, final String hierarchyTypeName, final String tenantId) { Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("boundaryTypeName", boundaryTypeName); parametersMap.put("hierarchyTypeName", hierarchyTypeName); parametersMap.put("tenantId", tenantId); List<Boundary> BoundaryList = namedParameterJdbcTemplate.query( BoundaryQueryBuilder.getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(), parametersMap, new BoundaryIdRowMapper()); return BoundaryList; } }
BoundaryRepository { public List<Boundary> getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(final String boundaryTypeName, final String hierarchyTypeName, final String tenantId) { Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("boundaryTypeName", boundaryTypeName); parametersMap.put("hierarchyTypeName", hierarchyTypeName); parametersMap.put("tenantId", tenantId); List<Boundary> BoundaryList = namedParameterJdbcTemplate.query( BoundaryQueryBuilder.getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(), parametersMap, new BoundaryIdRowMapper()); return BoundaryList; } @Autowired  BoundaryRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate,
			MdmsRepository mdmsRepository); }
BoundaryRepository { public List<Boundary> getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(final String boundaryTypeName, final String hierarchyTypeName, final String tenantId) { Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("boundaryTypeName", boundaryTypeName); parametersMap.put("hierarchyTypeName", hierarchyTypeName); parametersMap.put("tenantId", tenantId); List<Boundary> BoundaryList = namedParameterJdbcTemplate.query( BoundaryQueryBuilder.getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(), parametersMap, new BoundaryIdRowMapper()); return BoundaryList; } @Autowired  BoundaryRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate,
			MdmsRepository mdmsRepository); Boundary save(Boundary boundary); Boundary update(Boundary boundary); Boundary findByTenantIdAndId(String tenantId, Long id); List<Boundary> findByTenantIdAndCodes(String tenantId, List<String> codes); Boundary findByTenantIdAndCode(String tenantId, String code); List<Boundary> findAllByTenantId(String tenantId); Boundary findBoundarieByBoundaryTypeAndBoundaryNum(Long boundaryTypeId, Long boundaryNum, String tenantId); List<Boundary> getAllBoundariesByBoundaryTypeIdAndTenantId(final Long boundaryTypeId,
			final String tenantId); List<Boundary> getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(final String boundaryTypeName,
			final String hierarchyTypeName, final String tenantId); List<Boundary> getBoundaryByTypeAndNumber(final long boundaryNumber, final long boundaryType); List<Boundary> getAllBoundaryByTenantIdAndTypeIds(String tenantId, List<Long> boundaryTypeIds); List<Boundary> findAllBoundariesByIdsAndTenant(final String tenantId, final List<Long> boundaryIds); List<Boundary> getAllBoundariesByIdsAndTypeAndNumberAndCodeAndTenant(
			BoundarySearchRequest boundarySearchRequest); List<Boundary> findAllParents(); List<Boundary> findActiveImmediateChildrenWithOutParent(Long parentId); List<Boundary> setBoundariesWithParents(List<Boundary> boundaryList); List<MdmsTenantBoundary> getBoundariesByTenantAndHierarchyType(BoundarySearchRequest boundarySearchRequest,
			RequestInfo requestInfo); }
BoundaryRepository { public List<Boundary> getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(final String boundaryTypeName, final String hierarchyTypeName, final String tenantId) { Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("boundaryTypeName", boundaryTypeName); parametersMap.put("hierarchyTypeName", hierarchyTypeName); parametersMap.put("tenantId", tenantId); List<Boundary> BoundaryList = namedParameterJdbcTemplate.query( BoundaryQueryBuilder.getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(), parametersMap, new BoundaryIdRowMapper()); return BoundaryList; } @Autowired  BoundaryRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate,
			MdmsRepository mdmsRepository); Boundary save(Boundary boundary); Boundary update(Boundary boundary); Boundary findByTenantIdAndId(String tenantId, Long id); List<Boundary> findByTenantIdAndCodes(String tenantId, List<String> codes); Boundary findByTenantIdAndCode(String tenantId, String code); List<Boundary> findAllByTenantId(String tenantId); Boundary findBoundarieByBoundaryTypeAndBoundaryNum(Long boundaryTypeId, Long boundaryNum, String tenantId); List<Boundary> getAllBoundariesByBoundaryTypeIdAndTenantId(final Long boundaryTypeId,
			final String tenantId); List<Boundary> getBoundariesByBndryTypeNameAndHierarchyTypeNameAndTenantId(final String boundaryTypeName,
			final String hierarchyTypeName, final String tenantId); List<Boundary> getBoundaryByTypeAndNumber(final long boundaryNumber, final long boundaryType); List<Boundary> getAllBoundaryByTenantIdAndTypeIds(String tenantId, List<Long> boundaryTypeIds); List<Boundary> findAllBoundariesByIdsAndTenant(final String tenantId, final List<Long> boundaryIds); List<Boundary> getAllBoundariesByIdsAndTypeAndNumberAndCodeAndTenant(
			BoundarySearchRequest boundarySearchRequest); List<Boundary> findAllParents(); List<Boundary> findActiveImmediateChildrenWithOutParent(Long parentId); List<Boundary> setBoundariesWithParents(List<Boundary> boundaryList); List<MdmsTenantBoundary> getBoundariesByTenantAndHierarchyType(BoundarySearchRequest boundarySearchRequest,
			RequestInfo requestInfo); static final Logger logger; }