-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: generic way to get the index of a collestion
PostPosted: Thu Dec 11, 2003 2:23 am 
Beginner
Beginner

Joined: Sun Oct 26, 2003 11:21 pm
Posts: 27
I notice that PersistentCollectionType has a method to generically interate over the elements of a collection, but not the index values. Is there any particular reason for this?

I know that indexes are pretty much only useful for Maps, but the lack of a getIndexesIterator method seems comspicuously absent and I'm wondering if there's something I'm missing.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 2:29 am 
I hope you are never casting your collections to PersistentCollection! That is an internal Hibernate implementation class....


Top
  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 2:36 am 
Beginner
Beginner

Joined: Sun Oct 26, 2003 11:21 pm
Posts: 27
Nope, I'm talking about net.sf.hibernate.type.PersistentCollectionType here.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 3:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Well, the Hibernate core never needs to iterate over indexes, so it doesn't exist.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 2:50 pm 
I thought as much.

I'm fairly close to done with a generic mechanism to calculate, store, retreive and reverse changes made during a hibernate session. Like a generic diff and undo. I could have used an interator over the indexes but I just cast a MapType object to a Map, so the key/value becomes the index/element pair.


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.