Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dali-dev] IPersitentType.attributes() - wildcard parameterized type?

Hi there,

I was just wondering why the IPersitentType.attributes() method has a return type of: Iterator<? extends IPersistentAttribute>

(whereas the other methods that return Iterators have types of Iterator<IPersistentAttribute>).

Is the wildcard-parameterized type needed in this case? It's not a problem; it just makes the usage of it seem somewhat unwieldy:

public static String getPrimaryKey(IPersistentType entity) {
for ( Iterator<? extends IPersistentAttribute> iter = entity.attributes(); iter.hasNext(); ) {
		IPersistentAttribute jpAtt = iter.next();
		String attributeType = jpAtt.mappingKey();
		// ... etc etc



Thanks
Tom


Back to the top