-
@Documented @Retention(SOURCE) @Target({TYPE,METHOD}) public @interface VariableValues
Denotes a storage with the values of the predefined variables.To determine the value of the predefined variable used in the query specified for the repository method, the RxMicro framework uses the following algorithm:
- If the repository method returns or accepts the entity model as a parameter, the entity model class is used to define the variable value.
-
Otherwise, the RxMicro framework analyzes the optional entityClass parameter defined in the
Select,Insert,UpdateandDeleteannotations. - If the optional entityClass parameter is set, the class specified in this parameter is used to define the variable value.
-
If the optional entityClass parameter is missing, the RxMicro framework tries to extract the variable value from the
VariableValuesannotation, which annotates this repository method. -
If the repository method is not annotated with the
VariableValuesannotation or theVariableValuesannotation does not contain the value of a predefined variable, then the RxMicro framework tries to extract the value of this variable from theVariableValuesannotation, which annotates the repository interface. - If the variable value is undefined in all specified places, then the RxMicro framework notifies the developer about the error.
-
-
Element Detail
-
value
String[] value
Must be even item counts:name1, value1, name2, value2, ...- Returns:
- pairs of 'name, value', which is used to resolve variables in the all SQL queries per interface
-
-