public < T , Y > List < T > getListByAttributeIn ( Class < T > entityCls , SingularAttribute < T , Y > attribute , List < Y > values ) { if ( entityCls == null ) { throw new IllegalArgumentException ( "entityCls cannot be null" ) ; } if ( attribute == null ) { throw new IllegalArgumentException ( "attribute cannot be null" ) ; } TypedQuery < T > query = createTypedQueryIn ( entityCls , attribute , values ) ; return query . getResultList ( ) ; }
Executes a query for entities that have any of the given attribute values .