Package org.apache.ibatis.annotations
Annotation Type Options
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface OptionsThe annotation that specify options for customizing default behaviors.
How to use:public interface UserMapper { @Option(useGeneratedKeys = true, keyProperty = "id") @Insert("INSERT INTO users (name) VALUES(#{name})") boolean insert(User user); }- Author:
- Clinton Begin
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description intfetchSizeReturns the fetch size.Options.FlushCachePolicyflushCacheReturns the 2nd cache flush strategy.java.lang.StringkeyColumnReturns column names that retrieves a key value.java.lang.StringkeyPropertyReturns property names that holds a key value.java.lang.StringresultSetsReturns result set names.ResultSetTyperesultSetTypeReturns the result set type.StatementTypestatementTypeReturn the statement type.inttimeoutReturns the statement timeout.booleanuseCacheReturns whether use the 2nd cache feature if assigned the cache.booleanuseGeneratedKeysReturns whether use the generated keys feature supported by JDBC 3.0
-
-
-
-
flushCache
Options.FlushCachePolicy flushCache
Returns the 2nd cache flush strategy.- Returns:
- the 2nd cache flush strategy
- Default:
- org.apache.ibatis.annotations.Options.FlushCachePolicy.DEFAULT
-
-
-
resultSetType
ResultSetType resultSetType
Returns the result set type.- Returns:
- the result set type
- Default:
- org.apache.ibatis.mapping.ResultSetType.DEFAULT
-
-
-
statementType
StatementType statementType
Return the statement type.- Returns:
- the statement type
- Default:
- org.apache.ibatis.mapping.StatementType.PREPARED
-
-