Dependency Injection

With Apache Causeway it’s common to inject domain services into domain entities; this allows behaviour to be pushed down into those entities.

For JDO, both field injection and setter injection is performed automatically:

Customer.java
import javax.inject.Inject;

// ...
public class Customer {

    // ...
    @Import OrderRepository orderRepository;
}

However, constructor injection is not supported.