Example #1
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);
    }
  }