Joined: Thu Nov 13, 2008 12:19 pm Posts: 1
|
Hi
I have a class and a subclass which uses a discriminator in order to differentiate between the two classes. I want to get the list of all possible values of discriminator column.
So, I have a class:
<class name="ContentCollection" table="CONTENT_COLLECTION" discriminator-value="N">
<id name="contentCollectionId" column="CONTENT_COLLECTION_ID" type="long">
<generator class="identity"/>
</id>
<discriminator column="COLLECTION_DISCRIMINATOR" force="false" insert="true" not-null="true" type="character"/>
<subclass discriminator-value="I" name="ContentCollectionInherited" select-before-update="false">
<property column="MAX_RESULTS" generated="never" lazy="false" name="maxResults" type="integer"/>
</subclass>
</class>
And I want something like :
ArrayList list=<parentclass>.listAllPossibleDiscriminatorValues();
and list should have N and I values.
I searched a lot about this issue but couldn't get any informative link. Any help is highly appreciated.
*The class has some other columns and properties but removed in order to concentrate on the problem
|
|