AthleteManagerDelegate.java
// license-header java merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by ServiceDelegate.vsl in andromda-ejb3-cartridge on 08/08/2014 12:21:05.
//
package org.andromda.demo.ejb3.athlete;
import java.util.Collection;
import java.util.Properties;
import javax.naming.NamingException;
import org.andromda.demo.ejb3.ServiceDelegateBase;
import org.andromda.demo.ejb3.ServiceLocator;
/**
* Web service delegator for {@link org.andromda.demo.ejb3.athlete.AthleteManagerBean}.
*
* @see org.andromda.demo.ejb3.athlete.AthleteManagerBean
*/
public class AthleteManagerDelegate
extends ServiceDelegateBase
{
/**
* Default constructor
*/
public AthleteManagerDelegate()
{
super();
}
/**
* Constructor setting the environment properties.
*
* @param properties
*/
public AthleteManagerDelegate(Properties properties)
{
super(properties);
}
/**
* Gets an instance of {@link AthleteManagerRemote}
*/
private AthleteManagerRemote getAthleteManagerRemote()
throws NamingException
{
return ServiceLocator.getInstance().get_org_andromda_demo_ejb3_athlete_AthleteManagerBean_Remote(getProperties());
}
/**
* Call the session bean operation using appropriate view type
* @see org.andromda.demo.ejb3.athlete.AthleteManagerBean#addTrackAthlete(TrackAthlete)
*
* @param trackAthlete
*/
public void addTrackAthlete(TrackAthlete trackAthlete)
{
try
{
getAthleteManagerRemote().addTrackAthlete(trackAthlete);
}
catch (NamingException ex)
{
throw new AthleteManagerException(
"Error performing 'org.andromda.demo.ejb3.athlete.AthleteManager.addTrackAthlete(TrackAthlete trackAthlete)' --> " + ex, ex);
}
}
/**
* Call the session bean operation using appropriate view type
* @see org.andromda.demo.ejb3.athlete.AthleteManagerBean#getAllAthletes()
*
* @return Collection
*/
public Collection getAllAthletes()
{
try
{
return getAthleteManagerRemote().getAllAthletes();
}
catch (NamingException ex)
{
throw new AthleteManagerException(
"Error performing 'org.andromda.demo.ejb3.athlete.AthleteManager.getAllAthletes()' --> " + ex, ex);
}
}
}