How to filter Entity without a request in the database and no cycle?

Please tell me whether JPA analogue Link from the NET, well, to be able to filter the loaded records TestEntity. For example, I did request and downloaded all the records from the table TEST, then as needed, I select only the desired records. Thanks In Advance!
public List findResult() {
return em.createQuery("SELECT t FROM TestEntity t").getResultList();
July 8th 19 at 12:07
3 answers
July 8th 19 at 12:09
JPA has its own object-oriented query language. In Hibernate's HQL, JPA JPQL.
July 8th 19 at 12:11
If you want to filter the list of records retrieved from the database. you can do this using lambdas and StreamAPI. Something like:
 .filter(entity -> "bar".equals(entity.getFoo()))

In General, you need to filter in the query to the database.
July 8th 19 at 12:13
Uploaded where? In array?

Find more questions by tags Java