Annotation Type Timestamped

  • @Target(METHOD)
    public @interface Timestamped
    Binds the named parameter :now or a custom named parameter with the current DateTime as an OffsetDateTime. Common use cases:
     public interface PersonDAO {
          @SqlUpdate("INSERT INTO people(id, firstName, lastName, email, created, modified) VALUES (, :p.firstName, :p.lastName,, :now, :now)")
          int insert(@BindBean("p") Person person);
          @SqlUpdate("UPDATE people SET modified = :now, firstName = :p.firstName, lastName = :p.lastName, email = WHERE id =")
          void update(@BindBean("p") Person person);
    See Also:
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String value
      The parameter to bind in the SQL query.
    • Element Detail

      • value

        String value
        The parameter to bind in the SQL query. If omitted, defaults to now and can be changed to customize the parameter bound to the current DateTime.
        the parameter name