MobileServiceDelegate.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.mobile;
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.mobile.MobileServiceBean}.
*
* @see org.andromda.demo.ejb3.mobile.MobileServiceBean
*/
public class MobileServiceDelegate
extends ServiceDelegateBase
{
/**
* Default constructor
*/
public MobileServiceDelegate()
{
super();
}
/**
* Constructor setting the environment properties.
*
* @param properties
*/
public MobileServiceDelegate(Properties properties)
{
super(properties);
}
/**
* Gets an instance of {@link MobileServiceRemote}
*/
private MobileServiceRemote getMobileServiceRemote()
throws NamingException
{
return ServiceLocator.getInstance().get_org_andromda_demo_ejb3_mobile_MobileServiceBean_Remote(getProperties());
}
/**
* Call the session bean operation using appropriate view type
* @see org.andromda.demo.ejb3.mobile.MobileServiceBean#addMobile(Mobile)
*
* @param mobile
* @throws MobileException
*/
public void addMobile(Mobile mobile)
throws MobileException
{
try
{
getMobileServiceRemote().addMobile(mobile);
}
catch (MobileException ex)
{
throw ex;
}
catch (NamingException ex)
{
throw new MobileServiceException(
"Error performing 'org.andromda.demo.ejb3.mobile.MobileService.addMobile(Mobile mobile)' --> " + ex, ex);
}
}
/**
* Call the session bean operation using appropriate view type
* @see org.andromda.demo.ejb3.mobile.MobileServiceBean#getMobile(String)
*
* @param number
* @return Mobile
* @throws MobileException
*/
public Mobile getMobile(String number)
throws MobileException
{
try
{
return getMobileServiceRemote().getMobile(number);
}
catch (MobileException ex)
{
throw ex;
}
catch (NamingException ex)
{
throw new MobileServiceException(
"Error performing 'org.andromda.demo.ejb3.mobile.MobileService.getMobile(String number)' --> " + ex, ex);
}
}
}