@Repository public interface CrossHierarchyRepository extends org.springframework.data.jpa.repository.JpaRepository<CrossHierarchy,Long>
| Modifier and Type | Method and Description |
|---|---|
List<Boundary> |
findActiveBoundariesById(Long id) |
List<CrossHierarchy> |
findActiveBoundariesByNameAndBndryTypeNameAndHierarchyTypeName(String boundaryTypeName,
String hierarchyTypeName,
String parenthierarchyTypeName,
String name) |
CrossHierarchy |
findBoundariesByParentAndChildBoundary(Long parentId,
Long childId) |
List<Boundary> |
findByParentAndChildBoundaryType(Boundary boundary,
BoundaryType boundaryType) |
List<CrossHierarchy> |
findByParentTypeAndChildType(BoundaryType parentType,
BoundaryType childType) |
List<Boundary> |
findChildBoundariesByParentBoundary(String boundaryTypeName,
String hierarchyTypeName,
String boundaryName) |
List<Boundary> |
findChildBoundariesNameAndBndryTypeAndHierarchyType(String boundaryTypeName,
String hierarchyTypeName) |
List<Boundary> |
findParentBoundaryByChildBoundaryAndParentBoundaryType(Long childId,
Long parentTypeId) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllList<Boundary> findByParentAndChildBoundaryType(Boundary boundary, BoundaryType boundaryType)
@Query(value="select ch from CrossHierarchy ch where UPPER(ch.childType.name)= UPPER(:boundaryTypeName) and UPPER(ch.childType.hierarchyType.name) =UPPER(:hierarchyTypeName) and UPPER(ch.parentType.hierarchyType.name) = UPPER(:parenthierarchyTypeName) and UPPER(ch.child.name) like UPPER(:name) order by ch.child.name") List<CrossHierarchy> findActiveBoundariesByNameAndBndryTypeNameAndHierarchyTypeName(@Param(value="boundaryTypeName") String boundaryTypeName, @Param(value="hierarchyTypeName") String hierarchyTypeName, @Param(value="parenthierarchyTypeName") String parenthierarchyTypeName, @Param(value="name") String name)
@Query(value="select ch.child from CrossHierarchy ch where UPPER(ch.childType.name)= UPPER(:boundaryTypeName) and UPPER(ch.childType.hierarchyType.name) =UPPER(:hierarchyTypeName)") List<Boundary> findChildBoundariesNameAndBndryTypeAndHierarchyType(@Param(value="boundaryTypeName") String boundaryTypeName, @Param(value="hierarchyTypeName") String hierarchyTypeName)
@Query(value="select ch.child from CrossHierarchy ch where ch.parent.id= :id") List<Boundary> findActiveBoundariesById(@Param(value="id") Long id)
@Query(value="select ch.parent from CrossHierarchy ch where ch.child.id= :childId and ch.parentType.id=:parentTypeId") List<Boundary> findParentBoundaryByChildBoundaryAndParentBoundaryType(@Param(value="childId") Long childId, @Param(value="parentTypeId") Long parentTypeId)
List<CrossHierarchy> findByParentTypeAndChildType(BoundaryType parentType, BoundaryType childType)
@Query(value="select ch.child from CrossHierarchy ch where UPPER(ch.parentType.name)= UPPER(:boundaryTypeName) and UPPER(ch.parentType.hierarchyType.name) =UPPER(:hierarchyTypeName) and UPPER(ch.parent.name) = UPPER(:boundaryName)") List<Boundary> findChildBoundariesByParentBoundary(@Param(value="boundaryTypeName") String boundaryTypeName, @Param(value="hierarchyTypeName") String hierarchyTypeName, @Param(value="boundaryName") String boundaryName)
@Query(value="select ch from CrossHierarchy ch where ch.parent.id= :parentId and ch.child.id= :childId ") CrossHierarchy findBoundariesByParentAndChildBoundary(@Param(value="parentId") Long parentId, @Param(value="childId") Long childId)
Copyright © 2015–2016 eGovernments Foundation. All rights reserved.