Package com.pyranid

Annotation Type DatabaseColumn

  • @Target(FIELD)
    public @interface DatabaseColumn
    Allows specification of alternate column names for resultset mapping.

    Useful in situations where column names are ugly, inconsistent, or do not map well to camel-case Java property names.

    For example:

     class Example {
       @DatabaseColumn({ "systok", "sys_tok" })
       UUID systemToken;
       UUID getSystemToken() {
         return systemToken;
       void setSystemToken(UUID systemToken) {
         this.systemToken = systemToken;
     database.queryForObject("SELECT systok FROM example", Example.class);
    Mark Allen
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value