code: public <E> E findById(final Class<E> entityClass, final Object primaryKey)
      {
          E e = find(entityClass, primaryKey);
          if (e == null)
          {
              return null;
          }
  
          // Return a copy of this entity
          return (E) (e);
      }
docs: Find object based on primary key either form persistence cache or from
  database
  
  @param entityClass
  @param primaryKey
  @return