@Documented @Retention(value=RUNTIME) @Target(value=METHOD) @Repeatable(value=Options.List.class) public @interface Options
How to use:
public interface UserMapper { @Options(useGeneratedKeys = true, keyProperty = "id") @Insert("INSERT INTO users (name) VALUES(#{name})") boolean insert(User user); }
Modifier and Type | Optional Element and Description |
---|---|
String |
databaseId |
int |
fetchSize
Returns the fetch size.
|
Options.FlushCachePolicy |
flushCache
Returns the 2nd cache flush strategy.
|
String |
keyColumn
Returns column names that retrieves a key value.
|
String |
keyProperty
Returns property names that holds a key value.
|
String |
resultSets
Returns result set names.
|
ResultSetType |
resultSetType
Returns the result set type.
|
StatementType |
statementType
Return the statement type.
|
int |
timeout
Returns the statement timeout.
|
boolean |
useCache
Returns whether use the 2nd cache feature if assigned the cache.
|
boolean |
useGeneratedKeys
Returns whether use the generated keys feature supported by JDBC 3.0
|
public abstract boolean useCache
true
if use; false
if otherwisepublic abstract Options.FlushCachePolicy flushCache
public abstract ResultSetType resultSetType
public abstract StatementType statementType
public abstract int timeout
public abstract boolean useGeneratedKeys
true
if use; false
if otherwisepublic abstract String keyProperty
If you specify multiple property, please separate using comma(',').
public abstract String keyColumn
If you specify multiple column, please separate using comma(',').
public abstract String resultSets
If you specify multiple result set, please separate using comma(',').
public abstract String databaseId
Copyright © 2009–2021 MyBatis.org. All rights reserved.