@Override public String resolve(Method method) { return method.getAnnotation(PrimaryKey.class).value(); } }
@PrimaryKey @NotNull long getIsbn();
@Override @AutoIncrement @NotNull @PrimaryKey ("ID") int getID();
@PrimaryKey @NotNull @Generator(TimestampGenerator.class) public long getCompanyID();
@Override public String resolve(Method method) { return method.getAnnotation(PrimaryKey.class).value(); } }
/** * <p>Retrieves the value of the "id" field in the entity; that is, the primary key. As * this is the primary key, no database query will correspond with this method * invocation.</p> * * <p>For the moment, primary key fields are immutable. However, this will * change before the 1.0 release as there are numerous use-cases for changing * the value of a row's primary key field.</p> * * @return The value of the primary key for the row, the "id" field. */ @AutoIncrement @NotNull @PrimaryKey("ID") public int getID(); }
/** * <p>Retrieves the value of the "id" field in the entity; that is, the primary key. As * this is the primary key, no database query will correspond with this method * invocation.</p> * * <p>For the moment, primary key fields are immutable. However, this will * change before the 1.0 release as there are numerous use-cases for changing * the value of a row's primary key field.</p> * * @return The value of the primary key for the row, the "id" field. */ @AutoIncrement @NotNull @PrimaryKey("ID") public int getID(); }