annotations
The additional annotations to be placed on generated methods.
This list is empty by default and thus no annotations are added to generated methods.
Configuration Options
Option: ‘your.own.Annotation’
In order to add an annotation to the generated methods, specify its fully-qualified name.
package com.example.persistence;
import your.own.Annotation;
public class SomeRepository {
@Annotation
public void someMethod() {
// ... some code
}
// ... rest of generated code
}
Option: ‘your.other.Annotation’
In order to add an annotation with some member, specify name of the annotation member, its value, and its type. The type defaults to java.lang.String.
package com.example.persistence;
import your.other.Annotation;
public class SomeRepository {
@Annotation(member = "value")
public void someMethod() {
// ... some code
}
// ... rest of generated code
}
Related Options
Also in this group: catchAndRethrow , createConnection , description , executeBatch , executeOnce , generateConnectionOverloads , generateResultRowType , injectConverter , name , parameters , repository , resultRowColumns , resultRowConverter , resultRowType , returningMode , throwOnMultipleResults , type , validateSchema , vendor , writesReturnUpdateCount .
Front Matter
In order to configure this option, place the following code in the front matter of your SQL statement:
-- annotations:
-- - type: your.own.Annotation
-- members:
-- - key: someMember
-- value: this is your value
-- type: java.lang.String
-- - key: another
-- value: 5
-- type: int
-- - type: your.other.Annotation
-- members:
-- - key: value
-- value: yep
-- - type: some.annotation.WithoutMembers
SELECT something
FROM your_database_schema
WHERE some_column = :some_value