|
115 | 115 | * different, so the two functions can be distinguished by overloading). A
|
116 | 116 | * typical case would be the twin of a cross-type function like {@code add}
|
117 | 117 | * that is commutative, so using the same name makes sense.
|
| 118 | + *<p> |
| 119 | + * When derived by commutation, the synthetic function simply calls the |
| 120 | + * base function with the parameters swapped. For negation, the base |
| 121 | + * function must return {@code boolean} or {@code Boolean}, and the |
| 122 | + * synthetic function returns true for false, false for true, and null |
| 123 | + * for null. This will give familiar SQL behavior in many cases. For a base |
| 124 | + * function with {@code onNullInput=CALLED}, if it can return non-null |
| 125 | + * boolean results on some null inputs, it may be necessary to code |
| 126 | + * a negator or commutator by hand if the synthetic one would not have |
| 127 | + * the intended semantics. |
118 | 128 | */
|
119 | 129 | String[] synthetic() default {};
|
120 | 130 |
|
|
129 | 139 | * (which must be different) reversed. A typical case would be the twin of a
|
130 | 140 | * cross-type operator like {@code +} that is commutative, so using the same
|
131 | 141 | * name makes sense.
|
132 |
| - *<p> |
133 |
| - * When derived by commutation, the synthetic function simply calls the |
134 |
| - * base function with the parameters swapped. For negation, the base |
135 |
| - * function must return {@code boolean} or {@code Boolean}, and the |
136 |
| - * synthetic function returns true for false, false for true, and null |
137 |
| - * for null. This will give familiar SQL behavior in many cases. For a base |
138 |
| - * function with {@code onNullInput=CALLED}, if it can return non-null |
139 |
| - * boolean results on some null inputs, it may be necessary to code |
140 |
| - * a negator or commutator by hand if the synthetic one would not have |
141 |
| - * the intended semantics. |
142 | 142 | */
|
143 | 143 | String[] commutator() default {};
|
144 | 144 |
|
|
0 commit comments