How to query by entity type using JPA Criteria API

Introduction Inspired by this Hibernate forum post, I decided to write an article to explain how you can filter by the entity type using Criteria API.