org.springframework.data.neo4j.annotation.Query Java Examples

The following examples show how to use org.springframework.data.neo4j.annotation.Query. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ContributorQueryRepository.java    From coderadar with MIT License 6 votes vote down vote up
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->(c:CommitEntity) WHERE ID(p) = {0} AND c.name = {2} WITH c LIMIT 1 "
        + "CALL apoc.path.subgraphNodes(c, {relationshipFilter:'IS_CHILD_OF>'}) YIELD node WITH node as c ORDER BY c.timestamp DESC WITH collect(c) as commits "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)<-[:RENAMED_FROM]-()-[:CHANGED_IN]->(c) RETURN collect(f) as renames', {commits: commits}) "
        + "YIELD value WITH commits, value.renames as renames "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)-[:CHANGED_IN {changeType: \"DELETE\"}]->(c) RETURN collect(f) as deletes', {commits: commits}) "
        + "YIELD value WITH commits, renames, value.deletes as deletes "
        + "UNWIND commits as c "
        + "MATCH (f)-[:CHANGED_IN]->(c) WHERE NOT(f IN deletes OR f IN renames) AND any(x IN {3} WHERE f.path =~ x) AND none(x IN {4} WHERE f.path =~ x) "
        + "WITH f.path as path, collect(DISTINCT c.authorEmail) AS emails "
        + "UNWIND emails as email "
        + "MATCH (co:ContributorEntity) WHERE toLower(email) IN co.emails WITH path, collect(DISTINCT co.displayName) as contributors "
        + "WHERE size(contributors) = {1} RETURN path, contributors")
List<ContributorsForFileQueryResult> getFilesWithContributors(
    long projectId,
    int numberOfContributors,
    String commitHash,
    @NonNull List<String> includes,
    @NonNull List<String> excludes);
 
Example #2
Source File: MetricQueryRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * @param projectId The project id.
 * @param commitHash The hash of the commit.
 * @param filepath The full path of the file.
 * @return The metrics and their corresponding files for the given file.
 */
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->(c:CommitEntity) WHERE ID(p) = {0} AND c.name = {1} WITH c LIMIT 1 "
        + "CALL apoc.path.subgraphNodes(c, {relationshipFilter:'IS_CHILD_OF>'}) YIELD node WITH node as c ORDER BY c.timestamp DESC "
        + "MATCH (f)-[r:CHANGED_IN]->(c) WHERE f.path = {2} WITH f, c LIMIT 1 "
        + "MATCH (f)-[:MEASURED_BY]->(m)-[:VALID_FOR]->(c) "
        + "WITH m.name as name, m.value as value, m.findings as findings WHERE m.value <> 0 "
        + "RETURN name, value, findings ORDER BY name")
List<Map<String, Object>> getMetricsAndFindingsForCommitAndFilepath(
    long projectId, @NonNull String commitHash, String filepath);
 
Example #3
Source File: CommitRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * Returns all commits in a project with hashes of their parents.
 *
 * @param projectId The project id.
 * @return A list of commits in the project.
 */
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->(c) WHERE ID(p) = {0} WITH c "
        + "OPTIONAL MATCH (c)-[r:IS_CHILD_OF]->(c1) "
        + "WITH c as commit, c1.name as parent ORDER BY r.parentOrder "
        + "RETURN commit, collect(parent) as parents "
        + "ORDER BY commit.timestamp DESC")
@NonNull
List<LinkedHashMap<String, Object>> findByProjectIdWithParents(long projectId);
 
Example #4
Source File: InventoryRepository.java    From spring-cloud-event-sourcing-example with GNU General Public License v3.0 5 votes vote down vote up
@Query("MATCH (product:Product),\n" +
        "\t(product)<-[:PRODUCT_TYPE]-(inventory:Inventory),\n" +
        "    (inventory)-[:STOCKED_IN]->(:Warehouse { name: \"{warehouseName}\" })\n" +
        "WHERE product.productId = {productId} AND NOT (inventory)<-[:CONTAINS_PRODUCT]-()\n" +
        "RETURN inventory")
List<Inventory> getAvailableInventoryForProductAndWarehouse(@Param("productId") String productId,
                                                            @Param("warehouseName") String warehouseName);
 
Example #5
Source File: ContributorQueryRepository.java    From coderadar with MIT License 5 votes vote down vote up
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->(c:CommitEntity) WHERE ID(p) = {0} AND c.name = {1} WITH c LIMIT 1 "
        + "CALL apoc.path.subgraphNodes(c, {relationshipFilter:'IS_CHILD_OF>'}) YIELD node WITH node as c "
        + "ORDER BY c.timestamp DESC WITH collect(c) as commits "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)-[:CHANGED_IN {changeType: \"DELETE\"}]->(c) "
        + "RETURN collect(f) as deletes', {commits: commits}) YIELD value WITH commits, value.deletes as deletes "
        + "MATCH (p)-[:CONTAINS*1..]->(f)-[:RENAMED_FROM*0..]->(f2) WHERE ID(p) = {0} AND NOT f IN deletes "
        + "AND f.path STARTS WITH {2} WITH collect(f) + collect(f2) as files, commits "
        + "UNWIND commits as c "
        + "MATCH (c)<-[:CHANGED_IN]-(f) WHERE f IN files WITH DISTINCT c.authorEmail as email "
        + "MATCH (co:ContributorEntity)-[:WORKS_ON]->(p) WHERE ID(p) = {0} AND toLower(email) IN co.emails RETURN co ORDER BY co.displayName")
List<ContributorEntity> findAllByProjectIdAndDirectoryInCommit(
    long projectId, String commitHash, String directory);
 
Example #6
Source File: CommitRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * Creates [:CHANGED_IN] Relationships between files and commits.
 *
 * @param fileRels A list of maps, each containing the ids of the commit (commitId) and file
 *     (fileId) as well as the change type (changeType) and old file path (oldPath).
 */
@Query(
    "UNWIND {0} as x "
        + "MATCH (c) WHERE ID(c) = x.commitId "
        + "MATCH (f) WHERE ID(f) = x.fileId "
        + "CREATE (f)-[:CHANGED_IN {changeType: x.changeType, oldPath: x.oldPath}]->(c)")
void createFileRelationships(List<HashMap<String, Object>> fileRels);
 
Example #7
Source File: MetricQueryRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * NOTE: uses APOC.
 *
 * @param projectId The project id.
 * @param commitHash The hash of the commit.
 * @param metricNames The names of the metrics needed.
 * @return All metric values aggregated for the entire file tree in a single commit.
 */
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->(c:CommitEntity) WHERE ID(p) = {0} AND c.name = {1} WITH c LIMIT 1 "
        + "CALL apoc.path.subgraphNodes(c, {relationshipFilter:'IS_CHILD_OF>'}) YIELD node WITH node as c ORDER BY c.timestamp DESC WITH collect(c) as commits "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)<-[:RENAMED_FROM]-()-[:CHANGED_IN]->(c) RETURN collect(f) as renames', {commits: commits}) "
        + "YIELD value WITH commits, value.renames as renames "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)-[:CHANGED_IN {changeType: \"DELETE\"}]->(c) "
        + "RETURN collect(f) as deletes', {commits: commits}) YIELD value WITH commits, renames, value.deletes as deletes "
        + "UNWIND commits as c "
        + "MATCH (f)-[:MEASURED_BY]->(m)-[:VALID_FOR]->(c) WHERE "
        + "NOT(f IN deletes OR f IN renames) AND m.name in {2} WITH f.path as path, m.name as name, head(collect(m.value)) as value WHERE value <> 0 "
        + "RETURN name, SUM(value) AS value ORDER BY name ")
@NonNull
List<Map<String, Object>> getMetricValuesForCommit(
    long projectId, @NonNull String commitHash, @NonNull List<String> metricNames);
 
Example #8
Source File: ModuleRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * Detaches all files that fall inside the modulePath from the project/module, creates a new
 * ModuleEntity and attaches said files to it.
 *
 * @param projectOrModuleId The project or module id.
 * @param modulePath The path of the new module.
 * @return The id of the newly created module.
 */
@Query(
    "MATCH (p) WHERE ID(p) = {0} WITH p "
        + "CREATE (m:ModuleEntity { path: {1}} )<-[:CONTAINS]-(p) WITH m, p LIMIT 1 "
        + "MATCH (p)-[r1:CONTAINS]->(f:FileEntity) WHERE f.path STARTS WITH {1} WITH DISTINCT m, f, r1 "
        + "CREATE (m)-[r2:CONTAINS]->(f) WITH DISTINCT m,f,r1 "
        + "DELETE r1 WITH m "
        + "RETURN m")
@NonNull
ModuleEntity createModule(long projectOrModuleId, @NonNull String modulePath);
 
Example #9
Source File: ContributorQueryRepository.java    From coderadar with MIT License 5 votes vote down vote up
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->(c:CommitEntity) WHERE ID(p) = {0} AND c.name = {1} WITH c LIMIT 1 "
        + "CALL apoc.path.subgraphNodes(c, {relationshipFilter:'IS_CHILD_OF>'}) YIELD node WITH node as c "
        + "ORDER BY c.timestamp DESC WITH collect(c) as commits "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)-[:CHANGED_IN {changeType: \"DELETE\"}]->(c) "
        + "RETURN collect(f) as deletes', {commits: commits}) YIELD value WITH commits, value.deletes as deletes "
        + "MATCH (p)-[:CONTAINS*1..]->(f)-[:RENAMED_FROM*0..]->(f2) WHERE ID(p) = {0} AND NOT f IN deletes "
        + "AND f.path = {2} WITH collect(f) + collect(f2) as files, commits "
        + "UNWIND commits as c "
        + "MATCH (c)<-[:CHANGED_IN]-(f) WHERE f IN files WITH DISTINCT c.authorEmail as email "
        + "MATCH (co:ContributorEntity)-[:WORKS_ON]->(p) WHERE ID(p) = {0} AND toLower(email) IN co.emails RETURN co ORDER BY co.displayName")
List<ContributorEntity> findAllByProjectIdAndFilepathInCommit(
    long projectId, String commitHash, String filepath);
 
Example #10
Source File: UserRepository.java    From sentiment-analysis-twitter-microservices-example with Apache License 2.0 5 votes vote down vote up
/**
 * Updates the current rank and last rank of each ranked user. This query allows us to see how much a
 * user's rank has increased or decreased from the last PageRank job.
 */
@Query("MATCH (user:User) WHERE exists(user.pagerank) AND exists(user.screenName) AND exists(user.lastPageRank)\n" +
        "WITH user\n" +
        "ORDER BY user.pagerank DESC\n" +
        "WITH collect(user) as users\n" +
        "UNWIND range(0,size(users)-1) AS idx\n" +
        "WITH users[idx] AS user, 1 + idx AS currentRank\n" +
        "WITH user, coalesce(user.currentRank, 0) as previousRank, currentRank\n" +
        "WITH collect({ user: user, previousRank: previousRank, currentRank: currentRank }) as results\n" +
        "FOREACH (x in [y IN results WHERE y.user.pagerank <> y.user.lastPageRank | y] | \n" +
        "\tSET x.user.previousRank = x.previousRank\n" +
        "\tSET x.user.currentRank = x.currentRank\n" +
        "\tSET x.user.lastPageRank = x.user.pagerank)")
void updateUserCurrentRank();
 
Example #11
Source File: UserRepository.java    From sentiment-analysis-twitter-microservices-example with Apache License 2.0 5 votes vote down vote up
/**
 * Updates a linked list of users in the order that they are discovered.
 */
@Transactional
@Query("MATCH (user:User) WHERE exists(user.discoveredTime)\n" +
        "WITH user ORDER BY user.discoveredTime\n" +
        "WITH collect(user) as users\n" +
        "UNWIND range(0,size(users)-2) as idx\n" +
        "WITH users[idx] AS s1, users[idx+1] AS s2, idx as n1\n" +
        "MERGE (s1)-[:NEXT]->(s2)\n" +
        "SET s1.discoveredRank = n1 + 1\n" +
        "SET s2.discoveredRank = n1 + 2")
void updateDiscoveryChain();
 
Example #12
Source File: MetricQueryRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * Metrics for each file are collected as string in the following format: "metricName=value" The
 * string is then split in the adapter. This greatly reduces HashMap usage.
 *
 * <p>NOTE: uses APOC.
 *
 * @param projectId The project id.
 * @param commitHash The hash of the commit.
 * @param metricNames The names of the metrics needed.
 * @return Metrics for each file in the given commit.
 */
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->(c:CommitEntity) WHERE ID(p) = {0} AND c.name = {1} WITH c LIMIT 1 "
        + "CALL apoc.path.subgraphNodes(c, {relationshipFilter:'IS_CHILD_OF>'}) YIELD node WITH node as c ORDER BY c.timestamp DESC WITH collect(c) as commits "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)<-[:RENAMED_FROM]-()-[:CHANGED_IN]->(c) RETURN collect(f) as renames', {commits: commits}) "
        + "YIELD value WITH commits, value.renames as renames "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)-[:CHANGED_IN {changeType: \"DELETE\"}]->(c) "
        + "RETURN collect(f) as deletes', {commits: commits}) YIELD value WITH commits, renames, value.deletes as deletes "
        + "UNWIND commits as c "
        + "MATCH (f)-[:MEASURED_BY]->(m)-[:VALID_FOR]->(c) WHERE "
        + "NOT(f IN deletes OR f IN renames) AND m.name in {2} WITH f.path as path, m.name as name, head(collect(m.value)) as value ORDER BY path, name WHERE value <> 0 "
        + "RETURN path, collect(name + \"=\" + value) AS metrics ORDER BY path")
@NonNull
List<Map<String, Object>> getMetricTreeForCommit(
    long projectId, @NonNull String commitHash, @NonNull List<String> metricNames);
 
Example #13
Source File: CommitRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * Creates [:IS_CHILD_OF] Relationships between commits.
 *
 * @param parentRels A list of maps, each containing the ids of the child (id1) and parent (id2)
 *     commit.
 */
@Query(
    "UNWIND {0} as c "
        + "MATCH (c1) WHERE ID(c1) = c.id1 "
        + "MATCH (c2) WHERE ID(c2) = c.id2 "
        + "CREATE (c1)-[:IS_CHILD_OF {parentOrder: c.parentOrder}]->(c2)")
void createParentRelationships(List<HashMap<String, Object>> parentRels);
 
Example #14
Source File: TextEntityRepository.java    From sentiment-analysis-twitter-microservices-example with Apache License 2.0 5 votes vote down vote up
@Query("WITH timestamp() as time\n" +
        "MATCH (entity:TextEntity)<-[:HAS_ENTITY]-(t:Tweet)\n" +
        "WHERE (exists(entity.pagerank) AND " +
        "((time - coalesce(entity.lastCategorizedAt, time - 3000001) > 3000000))\n" +
        "AND NOT entity.name  =~ \"(?ism)(http.*|RT.*|@.*|\\\\d*|#.*|.*http.*|.*@.*|\\\\w|\\\\W.*)\")\n" +
        "WITH entity, count(DISTINCT t) as tweets\n" +
        "WHERE tweets > 3\n" +
        "RETURN entity\n" +
        "ORDER BY entity.pagerank DESC\n" +
        "LIMIT 1\n")
TextEntity findUncategorizedTextEntity(Long time);
 
Example #15
Source File: TextEntityRepository.java    From sentiment-analysis-twitter-microservices-example with Apache License 2.0 5 votes vote down vote up
@Query("MATCH (e:TextEntity)\n" +
        "WHERE NOT e.name  =~ \"(?ism)(http.*|RT.*|@.*|\\\\d*|#.*|.*http.*|.*@.*|\\\\w|\\\\W.*)\"\n" +
        "WITH collect(e) as nodes\n" +
        "CALL apoc.algo.pageRankWithConfig(nodes,{iterations:5,types:\"HAS_ENTITY\"}) YIELD node, score\n" +
        "WITH node, score\n" +
        "SET node.pagerank = score")
void updatePageRankForEntityGraph();
 
Example #16
Source File: MetricRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * Uses APOC.
 *
 * @param projectId The project id.
 * @param branchName The branch name.
 * @return All files and their corresponding metrics for the head commit of the given branch
 */
@Query(
    "MATCH (p)-[:HAS_BRANCH]->(b:BranchEntity)-[:POINTS_TO]->(c) WHERE ID(p) = {0} AND b.name = {1} WITH c LIMIT 1 "
        + "CALL apoc.path.subgraphNodes(c, {relationshipFilter:'IS_CHILD_OF>'}) YIELD node WITH node as c ORDER BY c.timestamp DESC WITH collect(c) as commits "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)<-[:RENAMED_FROM]-()-[:CHANGED_IN]->(c) RETURN collect(f) as renames', {commits: commits}) "
        + "YIELD value WITH commits, value.renames as renames "
        + "CALL apoc.cypher.run('UNWIND commits as c OPTIONAL MATCH (f)-[:CHANGED_IN {changeType: \"DELETE\"}]->(c) "
        + "RETURN collect(f) as deletes', {commits: commits}) YIELD value WITH commits, renames, value.deletes as deletes "
        + "UNWIND commits as c "
        + "MATCH (f)-[:MEASURED_BY]->(m)-[:VALID_FOR]->(c) WHERE "
        + "NOT(f IN deletes OR f IN renames) AND m.value <> 0 WITH ID(f) as id, m.name as name, head(collect(m)) as metric "
        + "RETURN  id, collect(metric) as metrics")
List<FileIdAndMetricQueryResult> getLastMetricsForFiles(long projectId, String branchName);
 
Example #17
Source File: ProjectRepository.java    From coderadar with MIT License 5 votes vote down vote up
/**
 * @param id The project id.
 * @return The project with the given id with initialized [:CONTAINS] relationships for modules.
 *     <p>This query is possible without apoc and likely performs better, however the
 *     GraphEntityMapper complains about unsaturated relationships for some reason.
 */
@Query(
    "MATCH (p) WHERE ID(p) = {0} AND p.isBeingDeleted = FALSE WITH p "
        + "CALL apoc.path.subgraphAll(p, {relationshipFilter:'CONTAINS>', labelFilter: '+ModuleEntity'}) "
        + "YIELD nodes, relationships RETURN p, nodes, relationships")
@NonNull
Optional<ProjectEntity> findByIdWithModules(long id);
 
Example #18
Source File: FriendRepository.java    From event-sourcing-microservices-example with GNU General Public License v3.0 4 votes vote down vote up
@Query("MATCH (userA:User)-[r:FRIEND]->(userB:User)" +
        "WHERE userA.userId={0} AND userB.userId={1} " +
        "DELETE r")
void removeFriend(Long fromId, Long toId);
 
Example #19
Source File: AnalyzerConfigurationRepository.java    From coderadar with MIT License 4 votes vote down vote up
@Query("MATCH (a) WHERE ID(a) = {0} RETURN COUNT(a) > 0")
boolean existsById(long id);
 
Example #20
Source File: ProductRepository.java    From micro-ecommerce with Apache License 2.0 4 votes vote down vote up
@Query("MATCH (product:Product) WHERE product.productId = {productId} MATCH product<-[:LIKES]-slm-[:LIKES]->recommendations "
		+ "RETURN distinct recommendations")
Iterable<Product> productsLikedByPeopleWhoLiked(@Param("productId") String productId);
 
Example #21
Source File: MetricQueryRepository.java    From coderadar with MIT License 4 votes vote down vote up
/**
 * @param projectId The project id.
 * @return All of the available metrics in the project/
 */
@Query(
    "MATCH (p)-[:CONTAINS_COMMIT]->()<-[:VALID_FOR]-(mv) WHERE ID(p) = {0} RETURN DISTINCT mv.name")
@NonNull
List<String> getAvailableMetricsInProject(long projectId);
 
Example #22
Source File: ProductRepository.java    From micro-ecommerce with Apache License 2.0 4 votes vote down vote up
@Query("MATCH (p:Person) WHERE p.userName = {userName} MATCH p-[:LIKES]->product<-[:LIKES]-slm-[:LIKES]->recommendations "
		+ "WHERE not(p = slm) and not (p--recommendations) return recommendations")
Iterable<Product> recommendedProductsFor(@Param("userName") String userName);
 
Example #23
Source File: ProjectRepository.java    From coderadar with MIT License 4 votes vote down vote up
@Query("MATCH (p)<-[r:WORKS_ON]-() WHERE ID(p) = {0} DELETE r")
void deleteContributorRelationships(long projectId);
 
Example #24
Source File: CommitRepository.java    From coderadar with MIT License 4 votes vote down vote up
@Query("MATCH (c2)-[:IS_CHILD_OF]->(c) WHERE ID(c) = {0} RETURN c2")
List<CommitEntity> getCommitChildren(long commitId);
 
Example #25
Source File: InventoryRepository.java    From microservices-event-sourcing with Apache License 2.0 4 votes vote down vote up
@Query("MATCH (product:Product)<-[:PRODUCT_TYPE]-(inventory:Inventory) WHERE product.productId in {productIds} AND NOT (inventory)<-[:CONTAINS_PRODUCT]-() RETURN inventory")
List<Inventory> getAvailableInventoryForProductIds(@Param("productIds")String[] productIds);
 
Example #26
Source File: InventoryRepository.java    From microservices-event-sourcing with Apache License 2.0 4 votes vote down vote up
@Query("MATCH (product:Product)<-[:PRODUCT_TYPE]-(inventory:Inventory)-[:STOCKED_IN]->(:Warehouse {name:{warehouseName}}) WHERE product.productId = {productId} AND NOT (inventory)<-[:CONTAINS_PRODUCT]-() RETURN inventory")
List<Inventory> getAvailableInventoryForProductAndWarehouse(@Param("productId") String productId, @Param("warehouseName") String warehouseName);
 
Example #27
Source File: ContributorRepository.java    From coderadar with MIT License 4 votes vote down vote up
@Query("MATCH (c)-[r:WORKS_ON]->(p) WHERE ID(c) IN {0} RETURN c, r, p")
List<ContributorEntity> findAllByIdsWithProjects(List<Long> ids);
 
Example #28
Source File: BotRelationRepository.java    From Doctor with Apache License 2.0 4 votes vote down vote up
@Query("MATCH p=(n:Bot)-[r:BotRelation]->(m:Bot) RETURN p LIMIT {num}")
List<BotRelation> findAllLimit(@Param("num") int num);
 
Example #29
Source File: BotRelationRepository.java    From Doctor with Apache License 2.0 4 votes vote down vote up
@Query("MATCH p=(n:Bot)-[r:BotRelation]->(m:Bot) WHERE n.name={name} RETURN p")
List<BotRelation> findPointYouBySymptom(@Param("name") String name);
 
Example #30
Source File: BotRelationRepository.java    From Doctor with Apache License 2.0 4 votes vote down vote up
@Query("MATCH p=(n:Bot)<-[r:BotRelation]-(m:Bot) WHERE n.name={name} RETURN p")
List<BotRelation> findPointMeBySymptom(@Param("name") String name);