This content has been marked as final.
Show 1 reply
-
1. Re: Problem with ENUM in entityQuery ( restrictions )
maenenj May 7, 2008 2:05 PM (in response to maenenj)entity query public class PatientList extends EntityQuery { private static final String[] RESTRICTIONS = { "state is concat(#{patientList.patient.state},'%')", "therapist.id is concat(#{therapistHome.therapistId},'%')" }; public String getEjbql() { return "select patient from Patient patient"; } Entity bean and enum .... public class Patient implements Serializable { public enum PatientState { NEW, ACTIVE, SUSPENDED, CLOSED; Definition in entity @Enumerated(EnumType.STRING) public PatientState getState() { return this.state; }