01: package net.sourceforge.jaxor.example.domain;
02:
03: import net.sourceforge.jaxor.example.Money;
04:
05: /**
06: * This source file demonstrates the 'impl' attribute of a generated entity. When the 'impl' attribute is specified on an entity
07: * jaxor generates an abstract base class. The impl attribute specifies the concreate implementation of this abstract class.
08: * This class is coded by hand, so it can extend the base abstract class with domain specific methods, as demonstrated here. Any
09: * methods added to the 'impl' class will be parsed during build time and added to the interface definitions automatically.
10: */
11: public class OrderImpl extends OrdersBase {
12:
13: public Money getOrderTotal() {
14: return getEquipmentCost().add(
15: getSalesTax().add(getShippingCharge()));
16: }
17:
18: public Money subtractFromTotal(Money amount) {
19: return getOrderTotal().subtract(amount);
20: }
21:
22: }
|