@Override
  @Transactional(readOnly = true)
  public Person get(Person model) {
    if (model == null) {
      return null;
    }

    if (model.isIdSet()) {
      return super.get(model);
    }
    if (isBlank(model.getUsername())) {
      Person result = getByUsername(model.getUsername());
      if (result != null) {
        return result;
      }
    }
    if (isBlank(model.getEmail())) {
      Person result = getByEmail(model.getEmail());
      if (result != null) {
        return result;
      }
    }

    return null;
  }
 @Override
 public Person getNewWithDefaults() {
   Person result = getNew();
   result.initDefaultValues();
   return result;
 }