/** See Store.refresh. */
 void refresh(final PersistCatalog newCatalog) {
   catalog = newCatalog;
   entityFormat = newCatalog.getFormat(entityFormat.getClassName());
   if (keyAssigner != null) {
     keyAssigner.refresh(newCatalog);
   }
 }
Ejemplo n.º 2
0
  /**
   * If we are assigning primary keys from a sequence, assign the next key and set the primary key
   * field.
   */
  private void assignKey(E entity, DatabaseEntry keyEntry) throws DatabaseException {

    if (keyAssigner != null) {
      if (!keyAssigner.assignPrimaryKey(entity, keyEntry)) {
        entityBinding.objectToKey(entity, keyEntry);
      }
    } else {
      entityBinding.objectToKey(entity, keyEntry);
    }
  }