vaadin/tori — Issue #6: Dereference classes from other types of classes, use datasource as mediator
Author: wolfie
Created: 2011-11-10 14:30:20+00:00
State: open

The Entities in Common and the DataSource should be refactored in such a way, that entities never (publicly) link to other entities, since that enforces too much restrictions on how and when the data is retrieved with the DataSource.

In the future, as many as possible data retrieval calls should be done via the DataSource. Examples:

DataSource.getThreads(Category) // instead of "category.getThreads()"
DataSource.getPosts(Thread) // instead of "thread.getPosts()"

Counting of objects are a matter of optimization, and probably should be avoided. If code like `.getFooEntity().size()` instead of `.getFooCount()` is deemed too slow, then the counting methods may be included in the DataSource.