return findAllXpathByAnchorIdAndXpathIn(anchorEntity.getId(), xpaths.toArray(new String[0]));\r
}\r
\r
- @Query(value = "SELECT EXISTS(SELECT 1 FROM fragment WHERE anchor_id = :anchorId"\r
- + " AND xpath LIKE :xpathPattern LIMIT 1)", nativeQuery = true)\r
- boolean existsByAnchorIdAndParentXpathAndXpathLike(@Param("anchorId") long anchorId,\r
- @Param("xpathPattern") String xpathPattern);\r
-\r
- default boolean existsByAnchorAndXpathStartsWith(final AnchorEntity anchorEntity, final String xpath) {\r
- return existsByAnchorIdAndParentXpathAndXpathLike(anchorEntity.getId(),\r
- EscapeUtils.escapeForSqlLike(xpath) + "%");\r
- }\r
+ boolean existsByAnchorAndXpathStartsWith(AnchorEntity anchorEntity, String xpath);\r
\r
@Query(value = "SELECT * FROM fragment WHERE anchor_id = :anchorId AND parent_id IS NULL", nativeQuery = true)\r
List<FragmentEntity> findRootsByAnchorId(@Param("anchorId") long anchorId);\r