Criteria has some advantages over using JPQL or raw SQL, as described in [this answer](https://stackoverflow.com/a/3422624/9204): type safety; refactoring friendliness; less dependence on strings (but there still is some). And one very big disadvantage: they are less readable and simply ugly. Is there a (non-JPA) Java API for accessing relational databases which is both typesafe and readable?