protected void update(Class<? extends DynamicPK> cls) {
// update the instances
String where = "update before " + cls.getName();
for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
if (0 == i % 4) {
DynamicPK instance = createInstance(cls, i);
instance.setName(getValue(NUMBER_OF_INSTANCES - i));
session.updatePersistent(instance);
verify(where, instance, i, true);
}
}
// verify the updated instances
where = "update after " + cls.getName();
for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
if (0 == i % 4) {
byte[] key = getPK(i);
DynamicPK instance = session.find(cls, key);
verify(where, instance, i, true);
}
}
}