code: @PrePersist
      void prePersist() {
          // before persisting the entity check the current ID of the tenant by
          // using the TenantAware
          // service
          final String currentTenant = SystemManagementHolder.getInstance().currentTenant();
          if (currentTenant == null) {
              throw new TenantNotExistException("Tenant "
                      + TenantAwareHolder.getInstance().getTenantAware().getCurrentTenant()
                      + " does not exists, cannot create entity " + this.getClass() + " with id " + super.getId());
          }
          setTenant(currentTenant.toUpperCase());
      }
docs: PrePersist listener method for all {@link TenantAwareBaseEntity}
  entities.