Hi I've got a POJO with a bunch of String's etc inside it, mapped as persistent. I am creating an app that does query's on the values inside that object so for instance I have a String field state. I want my query box to show only the values for state currently in all of my objects. Is it possible to retrieve a list of all the values of a property of a persistant object?
If that wasnt clear enough:
<hibernate-mapping>
<class name="FlexReference" table="flexReference">
<id name="id" type="long" unsaved-value="null">
<generator class="identity"/>
</id>
<property name="address"/>
<property name="region"/>
<property name="state"/> <--- String value
<property name="zip"/>
</class>
</hibernate-mapping>
There's my object, I would like a list of all the UNIQUE values in the state column of my object..
Thanks in advance,
David
|