JPA Criteria builder for dynamic query

I have to write a method where I pass it some arguments and depending on which arguments are empty it modifies the query I need to execute at the end. E.g. if I want to select from a table Customer …

JPA Criteria multiselect with fetch

I have following model: @Entity @Table(name = “SAMPLE_TABLE”) @Audited public class SampleModel implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(…