Manage a collection wrapped within another object

View: New views
2 Messages — Rating Filter:   Alert me  

Manage a collection wrapped within another object

by fadishei :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

Assume that you have collection property "actors" in a mapped class "Movie" and your code works fine this way:

Movie.java:
...
protected List<Artist> actors;
...


But I need to declare this property as:

Movie.java:
...  
protected ActorList actors
...

ActorList.java:
public class ActorList extends HashMap<Artist>
...

is it possible?

Re: Manage a collection wrapped within another object

by nmaves :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes

On Sat, Oct 17, 2009 at 6:42 AM, fadishei <fadishei@...> wrote:

Hello

Assume that you have collection property "actors" in a mapped class "Movie"
and your code works fine this way:

Movie.java:
...
protected List<Artist> actors;
...


But I need to declare this property as:

Movie.java:
...
protected ActorList actors
...

ActorList.java:
public class ActorList extends HashMap<Artist>
...

is it possible?
--
View this message in context: http://www.nabble.com/Manage-a-collection-wrapped-within-another-object-tp25937976p25937976.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...