On Dec 13, 2009, at 9:19 AM, Vincent Massol wrote:
On Dec 13, 2009, at 9:11 AM, vmassol (SVN) wrote:
- List<ObjectDefinition> getObjectDefinitions(); + List<String> getObjectDefinitionNames();
- List<Object> getObjects(); + ObjectDefinition getObjectDefinition(String objectDefinitionName);
+ List<String> getObjectNames(); + + Object getObject(String objectName); +
Another solution would be to use iterators with this API:
Iterator<Object> getObjects();
instead of
List<String> getObjectNames(); Object getObject(String objectName);
I think it could allow more fine-tuning on the requests we send to the DB (ie we can fetch elements N elements by N elements instead of 1 by 1).
I think Iterator is better since it allows for lazy retrieval. I have some questions... 1) Don't we need to expose parameters to allow paging? 2) Why is the save() method in the model? -Fabio