Annotation Type Options


The annotation that specify options for customizing default behaviors.

How to use:

 public interface UserMapper {
   @Options(useGeneratedKeys = true, keyProperty = "id")
   @Insert("INSERT INTO users (name) VALUES(#{name})")
   boolean insert(User user);
 }
 
Author:
Clinton Begin
  • Element Details

    • useCache Link icon

      boolean useCache
      Returns whether use the 2nd cache feature if assigned the cache.
      Returns:
      true if use; false if otherwise
      Default:
      true
    • flushCache Link icon

      Returns the 2nd cache flush strategy.
      Returns:
      the 2nd cache flush strategy
      Default:
      DEFAULT
    • resultSetType Link icon

      ResultSetType resultSetType
      Returns the result set type.
      Returns:
      the result set type
      Default:
      DEFAULT
    • statementType Link icon

      StatementType statementType
      Return the statement type.
      Returns:
      the statement type
      Default:
      PREPARED
    • fetchSize Link icon

      int fetchSize
      Returns the fetch size.
      Returns:
      the fetch size
      Default:
      -1
    • timeout Link icon

      int timeout
      Returns the statement timeout.
      Returns:
      the statement timeout
      Default:
      -1
    • useGeneratedKeys Link icon

      boolean useGeneratedKeys
      Returns whether use the generated keys feature supported by JDBC 3.0
      Returns:
      true if use; false if otherwise
      Default:
      false
    • keyProperty Link icon

      String keyProperty
      Returns property names that holds a key value.

      If you specify multiple property, please separate using comma(',').

      Returns:
      property names that separate with comma(',')
      Default:
      ""
    • keyColumn Link icon

      String keyColumn
      Returns column names that retrieves a key value.

      If you specify multiple column, please separate using comma(',').

      Returns:
      column names that separate with comma(',')
      Default:
      ""
    • resultSets Link icon

      String resultSets
      Returns result set names.

      If you specify multiple result set, please separate using comma(',').

      Returns:
      result set names that separate with comma(',')
      Default:
      ""
    • databaseId Link icon

      String databaseId
      Returns:
      A database id that correspond this options
      Since:
      3.5.5
      Default:
      ""