AthleteManagerBase.java
- // license-header java merge-point
- //
- // Attention: Generated code! Do not modify by hand!
- // Generated by SessionBeanBase.vsl in andromda-ejb3-cartridge on 08/08/2014 12:21:04.
- //
- package org.andromda.demo.ejb3.athlete;
- import java.util.Collection;
- import javax.annotation.Resource;
- import javax.ejb.EJB;
- import javax.ejb.SessionContext;
- import javax.persistence.EntityManager;
- import javax.persistence.PersistenceContext;
- /**
- * Autogenerated EJB3 session bean base class AthleteManagerBean which contains
- * method level annotations for the session bean. All method level annotations
- * are inherited by the extending session bean class.
- * <p>
- * TODO: Model Documentation for AthleteManager
- * </p>
- */
- public abstract class AthleteManagerBase
- implements AthleteManager
- {
- // ------ Session Context Injection ------
- /**
- * SessionContext Injection
- */
- @Resource
- protected SessionContext context;
- // ------ Persistence Context Definitions --------
- /**
- * Inject persistence context demo-ejb3
- */
- @PersistenceContext(unitName = "demo-ejb3")
- protected EntityManager emanager;
- // ------ DAO Injection Definitions --------
- /**
- * Inject DAO AthleteDao
- */
- @EJB
- private AthleteDao athleteDao;
- /**
- * Inject DAO TrackAthleteDao
- */
- @EJB
- private TrackAthleteDao trackAthleteDao;
- // --------------- Constructors ---------------
- /**
- * Default constructor method with no arguments.
- */
- public AthleteManagerBase()
- {
- super();
- }
- // ------ DAO Getters --------
- /**
- * Get the injected DAO AthleteDao
- * @return AthleteDao
- */
- protected AthleteDao getAthleteDao()
- {
- return this.athleteDao;
- }
- /**
- * Get the injected DAO TrackAthleteDao
- * @return TrackAthleteDao
- */
- protected TrackAthleteDao getTrackAthleteDao()
- {
- return this.trackAthleteDao;
- }
- // -------- Business Methods --------------
- /**
- * <p>
- * TODO: Model Documentation for addTrackAthlete
- * </p>
- * @param trackAthlete
- */
- public void addTrackAthlete(TrackAthlete trackAthlete)
- {
- if (trackAthlete == null)
- {
- throw new IllegalArgumentException(
- "org.andromda.demo.ejb3.athlete.AthleteManagerBean.addTrackAthlete(TrackAthlete trackAthlete) - 'trackAthlete' can not be null");
- }
- try
- {
- this.handleAddTrackAthlete(trackAthlete);
- }
- catch (Throwable th)
- {
- throw new AthleteManagerException(
- "Error performing 'AthleteManager.addTrackAthlete(TrackAthlete trackAthlete)' --> " + th,
- th);
- }
- }
- /**
- * Performs the core logic for {@link #addTrackAthlete(TrackAthlete)}
- * @param trackAthlete
- * @throws Exception
- */
- protected abstract void handleAddTrackAthlete(TrackAthlete trackAthlete)
- throws Exception;
- /**
- * <p>
- * TODO: Model Documentation for getAllAthletes
- * </p>
- * @return Collection
- */
- public Collection getAllAthletes()
- {
- try
- {
- return this.handleGetAllAthletes();
- }
- catch (Throwable th)
- {
- throw new AthleteManagerException(
- "Error performing 'AthleteManager.getAllAthletes()' --> " + th,
- th);
- }
- }
- /**
- * Performs the core logic for {@link #getAllAthletes()}
- * @return Collection
- * @throws Exception
- */
- protected abstract Collection handleGetAllAthletes()
- throws Exception;
- // -------- Lifecycle Callbacks --------------
- }