@Repeatable(value=AssembleConstant.List.class) @Documented @Target(value={ANNOTATION_TYPE,FIELD,TYPE,METHOD,PARAMETER}) @Retention(value=RUNTIME) public @interface AssembleConstant
cn.crane4j.core.parser.TypeHierarchyBeanOperationParser;,
cn.crane4j.core.parser.handler.AssembleConstantAnnotationHandler;| 限定符和类型 | 可选元素和说明 |
|---|---|
ContainerConstant |
constant
Configuration of container.
|
boolean |
followTypeConfig
If the
type() is annotated with ContainerConstant,
the configuration defined by that annotation will be used first. |
String[] |
groups
The group to which the current operation belongs.
|
String |
handler
The name of the handler to be used.
|
Class<?> |
handlerType
The type of the handler to be used.
|
String |
id
Operation id.
|
String |
key
key field name.
|
String |
keyDesc
Some description of the key which
helps
resolver to resolve the key. |
Class<?> |
keyResolver
The name of key resolver to be used.
|
Class<?> |
keyType
The type to which the key value of target should be converted
when fetching the data source from the data source.
|
String[] |
prop
Attributes that need to be mapped
between the data source object and the current object.
|
String |
propertyMappingStrategy
Get the name of property mapping strategy.
|
Mapping[] |
props
Attributes that need to be mapped
between the data source object and the current object.
|
Class<?>[] |
propTemplates
Mapping template classes.
|
String |
ref
a quick set for reference field name, equivalent to
@Mapping(ref = ""). |
int |
sort
Sort values.
|
Class<?> |
type
Constant class.
|
String |
typeName
|
public abstract Class<?> type
public abstract String typeName
public abstract ContainerConstant constant
ContainerConstant annotation.public abstract boolean followTypeConfig
type() is annotated with ContainerConstant,
the configuration defined by that annotation will be used first.public abstract String id
public abstract String key
key field name.
This field value will be used to obtain the associated
data source object from the data source container later.
When the annotation is on:
public abstract Class<?> keyResolver
public abstract Class<?> keyType
The type to which the key value of target should be converted when fetching the data source from the data source.
For example, the data source obtained from the data source
is grouped according to the key of the Long type,
and the key value corresponding to the current operation is Integer,
then the keyType needs to be Long at this time.
When the actual operation is performed,
the key value is automatically converted from Integer to Long type.
public abstract int sort
public abstract String handler
cn.crane4j.core.executor.handler.AssembleOperationHandler;public abstract Class<?> handlerType
cn.crane4j.core.executor.handler.AssembleOperationHandler;public abstract Mapping[] props
Attributes that need to be mapped
between the data source object and the current object.
It equivalent to prop().
propTemplates()public abstract String[] prop
Attributes that need to be mapped
between the data source object and the current object.
It equivalent to props().
the format is following:
'a:b':equivalent to @Mapping(src = 'a', ref = 'b');'a':equivalent to @Mapping(src = 'a', ref = 'a') or @Mapping('a');':a':equivalent to @Mapping(ref = 'a');'a:':equivalent to @Mapping(src = 'a');public abstract Class<?>[] propTemplates
Mapping template classes.
specify a class, if MappingTemplate exists on the class,
it will scan and add Mapping to props()。
public abstract String[] groups
public abstract String propertyMappingStrategy
cn.crane4j.core.parser.handler.strategy.PropertyMappingStrategyCopyright © 2024. All rights reserved.