Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319736 - Switch to use Iterable instead of Iterator throughout our provisional API
Summary: Switch to use Iterable instead of Iterator throughout our provisional API
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 233567
Blocks:
  Show dependency tree
 
Reported: 2010-07-13 10:59 EDT by Karen Butzke CLA
Modified: 2012-04-20 15:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2010-07-13 10:59:21 EDT
We need to switch our context model and java resource model to take advantage of Iterable instead of Iterator. Some of the provisional API already uses Iterable in Helios, but we should change all of it.
Comment 1 Karen Butzke CLA 2010-10-26 16:11:50 EDT
Going to wait on this until Brian is finished with the huge refactoring in bug 233567
Comment 2 Karen Butzke CLA 2011-08-02 16:42:16 EDT
I have changed our core model API that uses Iterator and ListIterator to use Iterable and ListIterable. The methods were also renamed to include a "get" prefix.
Comment 3 Karen Butzke CLA 2012-02-02 11:22:55 EST
Here are a few examples of the changes that were made. This pattern has been followed throughout the model.

In package org.eclipse.jpt.jpa.core.context
PersistentType.allAttributes():Iterator -> getAllAttributes():Iterable

In package org.eclipse.jpt.jpa.core.context.persistence
Persistence.persistenceUnits():Iterator -> getPersistenceUnits():Iterable
Persistence.persistenceUnitsSize() -> getPersistenceUnitsSize()
PersistenceUnit.classRefs():Iterator -> getClassRefs():Iterable
PersistenceUnit.classRefsSize() -> getClassRefsSize()
PersistenceUnit.mappingFileRefs():Iterator -> getMappingFileRefs():Iterable
PersistenceUnit.mappingFileRefsSize() -> getMappingFileRefsSize()
Comment 4 Karen Butzke CLA 2012-04-20 15:58:02 EDT
Some more examples where this change was made
JavaResourceAnnotatedElement.annotations(String, String)  - changed to getAnnotations(String) : Iterable
JavaResourceAnnotatedElement.annotations(String)  - changed to getAnnotations() : Iterable

PersistentType.attributes() : ListIterator changed to  getAttributes() : ListIterable
PersistenceUnit.mappingFileRefsContaining(...) changed to getMappingFileRefsContaining(String) : Iterable