@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DBTable {
public String name() default "mytable";
}
@SuppressWarnings("all")
@DBTable(name="mytable")
public class Person implements Serializable {
@SQLInteger(constraints=@Constraints(primaryKey=true,unique=true))
private int id;
@SQLString(value=12)private String name;
@SQLInteger(value = 5) private int age;
}
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface SQLInteger {