// license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by SessionBeanBase.vsl in andromda-ejb3-cartridge on 09/18/2014 16:56:07. // package org.andromda.test.howto10.a; import javax.annotation.Resource; import javax.ejb.SessionContext; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; /** * Autogenerated EJB3 session bean base class PaymentServiceBean which contains * method level annotations for the session bean. All method level annotations * are inherited by the extending session bean class. *

* TODO: Model Documentation for PaymentService *

*/ public abstract class PaymentServiceBase implements PaymentService { // ------ Session Context Injection ------ /** * SessionContext Injection */ @Resource protected SessionContext context; // ------ Persistence Context Definitions -------- /** * Inject persistence context howtomodel */ @PersistenceContext(unitName = "howtomodel") protected EntityManager emanager; // --------------- Constructors --------------- /** * Default constructor method with no arguments. */ public PaymentServiceBase() { super(); } // -------- Business Methods -------------- /** *

* TODO: Model Documentation for register *

* @param owner * @param car * @param leasePeriod */ public void register(Person owner, Car car, int leasePeriod) { if (owner == null) { throw new IllegalArgumentException( "org.andromda.test.howto10.a.PaymentServiceBean.register(Person owner, Car car, int leasePeriod) - 'owner' can not be null"); } if (car == null) { throw new IllegalArgumentException( "org.andromda.test.howto10.a.PaymentServiceBean.register(Person owner, Car car, int leasePeriod) - 'car' can not be null"); } try { this.handleRegister(owner, car, leasePeriod); } catch (Throwable th) { throw new PaymentServiceException( "Error performing 'PaymentService.register(Person owner, Car car, int leasePeriod)' --> " + th, th); } } /** * Performs the core logic for {@link #register(Person, Car, int)} * @param owner * @param car * @param leasePeriod * @throws Exception */ protected abstract void handleRegister(Person owner, Car car, int leasePeriod) throws Exception; // -------- Lifecycle Callbacks -------------- }