remove ilo run command file
[yosql.git] / yosql-website / content / configuration / annotations / fieldComment.md
blobdfdee60ad1852a3287d5906dad36ff90f6670d92
1 ---
2 title: fieldComment
3 date: 2019-09-27T18:51:08+02:00
4 menu:
5   main:
6     parent: Annotations
7 categories:
8   - Configuration
9 tags:
10   - annotations
11   - fields
12 ---
14 Controls what comment should be placed inside the `@Generated` annotation on generated fields. Defaults to `DO NOT MODIFY - automatically generated by YoSQL`.
16 ## Configuration Options
18 ### Option: 'DO NOT MODIFY - automatically generated by YoSQL'
20 The default value of the `fieldComment` configuration option is `DO NOT MODIFY - automatically generated by YoSQL`. Setting the option to `DO NOT MODIFY - automatically generated by YoSQL` therefore produces the same code generated as the default configuration.
22 ```java
23 package com.example.persistence;
25 import javax.annotation.processing.Generated;
27 public class SomeRepository {
29     @Generated(
30         value = "YoSQL",
31         date = "<current_timestamp>",
32         comments = "DO NOT MODIFY - automatically generated by YoSQL"
33     )
34     private Object someField;
36     // ... rest of generated code
39 ```
41 ### Option: 'Hello World!'
43 Changing the `fieldComment` configuration option to `Hello World!` produces the following code:
45 ```java
46 package com.example.persistence;
48 import javax.annotation.processing.Generated;
50 public class SomeRepository {
52     @Generated(
53         value = "YoSQL",
54         date = "<current_timestamp>",
55         comments = "Hello World!"
56     )
57     private Object someField;
59     // ... rest of generated code
62 ```
64 ## Related Options
66 - [annotateFields](../annotatefields/): Controls whether the `@Generated` annotation should be added at all.
67 - [fieldMembers](../fieldmembers/): Controls which `@Generated` annotation members should be used.
68 - [generatorName](../generatorname/): Controls the value used in the `@Generated` annotation.
70 ## Tooling
72 ### Maven
74 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation
75 for Maven](/tooling/maven/).
77 {{< maven/config/annotations/fieldComment >}}
79 ### Gradle
81 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
83 ```groovy
84 plugins {
85   id("wtf.metio.yosql")
88 yosql {
89   annotations {
90     fieldComment = "Hello World!"
91   }
93 ```
95 ### Bazel
97 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for
98 Bazel](/tooling/bazel/).
100 ### CLI
102 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
104 ```shell
105 $ yosql --annotations-field-comment="Hello World!"
108 The shorter form is available as well:
110 ```shell
111 $ yosql --field-comment="Hello World!"