Package org.apache.ibatis.annotations
Annotation Interface Arg
@Documented
@Retention(RUNTIME)
@Target(METHOD)
@Repeatable(ConstructorArgs.class)
public @interface Arg
The annotation that specify a mapping definition for the constructor argument.
- Author:
- Clinton Begin
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionReturn the column name(or column label) to map to this argument.Returns the column prefix that use when applyingresultMap()
.boolean
Returns whether id column or not.Class<?>
Return the java type for this argument.Return the jdbc type for column that map to this argument.Returns the parameter name for applying this mapping.Returns the result map id for mapping to a object that map to this argument.Return the statement id for retrieving a object that map to this argument.Class<? extends TypeHandler>
Returns theTypeHandler
type for retrieving a column value from result set.
-
Element Details
-
id
boolean idReturns whether id column or not.- Returns:
true
if id column;false
if otherwise
- Default:
- false
-
column
String columnReturn the column name(or column label) to map to this argument.- Returns:
- the column name(or column label)
- Default:
- ""
-
javaType
Class<?> javaTypeReturn the java type for this argument.- Returns:
- the java type
- Default:
- void.class
-
jdbcType
JdbcType jdbcTypeReturn the jdbc type for column that map to this argument.- Returns:
- the jdbc type
- Default:
- UNDEFINED
-
typeHandler
Class<? extends TypeHandler> typeHandlerReturns theTypeHandler
type for retrieving a column value from result set.- Returns:
- the
TypeHandler
type
- Default:
- org.apache.ibatis.type.UnknownTypeHandler.class
-
select
String selectReturn the statement id for retrieving a object that map to this argument.- Returns:
- the statement id
- Default:
- ""
-
resultMap
String resultMapReturns the result map id for mapping to a object that map to this argument.- Returns:
- the result map id
- Default:
- ""
-
name
String nameReturns the parameter name for applying this mapping.- Returns:
- the parameter name
- Since:
- 3.4.3
- Default:
- ""
-
columnPrefix
String columnPrefixReturns the column prefix that use when applyingresultMap()
.- Returns:
- the column prefix
- Since:
- 3.5.0
- Default:
- ""
-