[ http://jira.andromda.org/browse/SPRING-94?page=comments#action_12471 ]
     
Wouter Zoons commented on SPRING-94:
------------------------------------

this cannot be implemented in a fail-safe way when using jdk1.4

example: say A has 1 attribute, B and C both extend A but do not have any 
attributes; this will yield the same create(..) signature in all three DAOs; so 
because the DAOs for B and C extend the one from A there will be a compilation 
error when using jdk1.4 which does not support overriding with a different 
return type

> The load() and create() methods of the *Dao should return the most specific 
> type
> --------------------------------------------------------------------------------
>
>          Key: SPRING-94
>          URL: http://jira.andromda.org/browse/SPRING-94
>      Project: Spring Cartridge
>         Type: Improvement
>     Reporter: Guillaume Lederrey
>     Assignee: Chad Brandon
>  Attachments: SpringDao.vsl, SpringDao.vsl.diff, SpringHibernateDaoBase.vsl, 
> SpringHibernateDaoBase.vsl.diff
>
> As seen in http://galaxy.andromda.org/forum/viewtopic.php?p=3457
> In case of entity inheritanec, the load() and create() methods of the Dao 
> return type is the rootof the hierarchy, not the most specific type.
> Example :
> Doctor extends Person
> In this case, DoctorDao.create() return type will be Person and not Doctor.
> I think we should use the most specific type as much as possible ...




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

Reply via email to