Annotation Type KeyColumn


@Target(METHOD) @Retention(RUNTIME) public @interface KeyColumn
Configures the column to use for map keys, for SQL methods that return Map, or Guava's Multimap.

Example:

 @SqlQuery("select * from user")
 @KeyColumn("id")
 Map<Long, User> getUsersById();
 
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the column name to use for map keys.
  • Element Details

    • value

      String value
      Returns the column name to use for map keys.
      Returns:
      The column name to use for map keys.