Annotation Type Insert
-
@Target(METHOD) @Retention(RUNTIME) public @interface Insert
The annotation indicates the given method is a method that performs an insert operation the method signature must be void/int/MyObject "methodName"(Connection, Object) where return type is if it's void then it returns nothing if it's MyObject it returns the inserted object with the auto generated id (if the primary key is auto increment) else if int then it would return the generated id or the number of affected rows