Package com.joutvhu.dynamic.jpa
Annotation Interface DynamicQuery
Annotation to declare finder dynamic queries directly on repository methods.
- Since:
- 2.x.1
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDefines the projection part of the count query template that is generated for pagination.Defines a special count query template that shall be used for pagination queries to lookup the total number of elements for a page.booleanConfigures whether the given query is a native one.Class<? extends org.springframework.data.jpa.repository.QueryRewriter>Define aQueryRewriterthat should be applied to the query string after the query is fully assembled.Defines the JPA query template to be executed when the annotated method is called.
-
Element Details
-
value
String valueDefines the JPA query template to be executed when the annotated method is called.- Returns:
- the JPA query template
- Default:
- ""
-
countQuery
String countQueryDefines a special count query template that shall be used for pagination queries to lookup the total number of elements for a page.- Returns:
- the count query template
- Default:
- ""
-
countProjection
String countProjectionDefines the projection part of the count query template that is generated for pagination.- Returns:
- the count query projection template
- Default:
- ""
-
nativeQuery
boolean nativeQueryConfigures whether the given query is a native one. Defaults to false.- Returns:
- true if the query is native
- Default:
- false
-
queryRewriter
Class<? extends org.springframework.data.jpa.repository.QueryRewriter> queryRewriterDefine aQueryRewriterthat should be applied to the query string after the query is fully assembled.- Since:
- 3.0
- Default:
- org.springframework.data.jpa.repository.QueryRewriter.IdentityQueryRewriter.class
-