You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Ari Maniatis (JIRA)" <ji...@apache.org> on 2009/10/18 00:57:31 UTC
[jira] Closed: (CAY-942) Generic types
[ https://issues.apache.org/jira/browse/CAY-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ari Maniatis closed CAY-942.
----------------------------
Resolution: Fixed
Closing this issue since all the basic generics have been added except for 'query'. CAY-1294 has been opened for that work which is now likely to be targetted for 3.1
> Generic types
> -------------
>
> Key: CAY-942
> URL: https://issues.apache.org/jira/browse/CAY-942
> Project: Cayenne
> Issue Type: Improvement
> Reporter: Scott Anderson
> Assignee: Ari Maniatis
> Priority: Minor
> Fix For: 3.0
>
>
> I realize that this would restrict functionality to Java 5+, but I still believe it would be a good option to have for the code generator in the modeler:
> Add, as an option, generic types to Lists in generated classes. It's quite annoying to have to cast types; much of my code looks like this:
> for(Object o : someObject.getSomeManyToManyField()) {
> TheTypeIWanted ttiw = (TheTypeIWanted) o;
> ...
> }
> With generics, it would be:
> for(TheTypeIWanted ttiw : someObject.getSomeManyToManyField()) {
> ...
> }
> It'd also be nice if the core libraries had generics. For example, "Object DataObjectUtils.objectForPk(Class, int)" could be changed to "T DataObjectUtils.objectForPk(Class<T>, int)" to avoid casting.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.