Package org.jdbi.v3.sqlobject.customizer
Annotation Type Timestamped
-
@Target(METHOD) @Retention(RUNTIME) @Documented public @interface TimestampedBinds the named parameter:nowor a custom named parameter with the current DateTime as anOffsetDateTime. Common use cases:public interface PersonDAO { @SqlUpdate("INSERT INTO people(id, firstName, lastName, email, created, modified) VALUES (:p.id, :p.firstName, :p.lastName, :p.email, :now, :now)") @Timestamped @GetGeneratedKeys int insert(@BindBean("p") Person person); @SqlUpdate("UPDATE people SET modified = :now, firstName = :p.firstName, lastName = :p.lastName, email = :p.email WHERE id = :p.id") @Timestamped void update(@BindBean("p") Person person); }- See Also:
TimestampedConfig
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringvalueThe parameter to bind in the SQL query.
-