code: public <T extends HistoricalEntity<?>> List<T> getCurrent(Class<T> historicalEntityCls) {
          EntityManager entityManager = this.entityManagerProvider.get();
          CriteriaBuilder builder = entityManager.getCriteriaBuilder();
          CriteriaQuery<T> criteriaQuery = builder.createQuery(historicalEntityCls);
          Root<T> root = criteriaQuery.from(historicalEntityCls);
          criteriaQuery.where(expiredAt(root, builder));
          TypedQuery<T> typedQuery = entityManager.createQuery(criteriaQuery);
          return typedQuery.getResultList();
      }
docs: Gets every instance of the specified historical entity in the database.
  
  @param <T> the type of the entity.
  @param historicalEntityCls the class of the specified historical entity.
  The entity must be a subtype of {@link HistoricalEntity}. Cannot be
  <code>null</code>.
  @return the instances requested. Guaranteed not <code>null</code>.