public static <E> IdRef<E> of(Long id) {

    if (id == null) {
      return null;
    }
    return new IdRef<>(id);
  }
public static < E > IdRef < E > of ( Long id ) { if ( id == null ) { return null ; } return new IdRef < > ( id ) ; }
@param <E> generic type of the referenced {@link GenericEntity}.
@param id the {@link #getId() ID} to wrap.
@return the {@link IdRef} pointing to an entity with the specified {@link #getId() ID} or {@code null} if the given
{@code ID} was {@code null}.