Register Login
Internet / AI Technology University (ITU/AITU)
Created by info@itofthefuture.com
Welcome Anonimous.User to this quiz related to Spring Test.

Read the question and choose correct answers. Time is limited to 40 seconds!

Important! Do not forget to rank the quality of the question (from bad to excellent).
An initiator of the quiz will get royalty score for QnAs created by her/him and can win the Top Creativity Prize.
Question:
Suppose you have the class Holiday with year_id, hol_name and hol_date fields. What is the right way to implement persistent sorted collection of Holiday objects?


<map name="holidays" sort="my.custom.HolidayComparator" class=java.util.TreeMap>
<key column="year_id"/>
<map-key column="hol_name" type="string"/>
<element column="hol_date type="date"/>
</map>




<map name="holidays" sort="my.custom.HolidayComparator">
<key column="year_id"/>
<map-key column="hol_name" type="string"/>
<element column="hol_date" type="date"/>
</map>



The only thing you need to do is to implement comparator for Holiday objects and implement Serializable interface.




<map name="holidays">
<key column="year_id"/>
<map-key column="hol_name" type="string"/>
<element column="hol_date" type="date"/>
</map>




<map name="holidays" order-by="hol_date, hol_name">
<key column="year_id"/>
<map-key column="hol_name" type="string"/>
<element column="hol_date type="date"/>
</map>



Rank the Quality of the Question from "-10" (bad) or "0" (not clear) to 10 (correct) or even 20 (very good!)
-10 (bad/wrong) 0 (not clear) 10 (correct) 20 (very good!)
Your summary report will be available to you and your instructor. Thank you for your work!!!