use of org.apache.openejb.Container in project tomee by apache.
the class EjbSelect method execute_void.
/**
* Perform a select operation when the return value is
* a void. This one is slightly different from the
* rest, as the container operation performed is an
* update() rather than a select() because there's
* no value to return.
*
* @param obj The ejb object we're executing on behalf of.
* @param methodSignature The signature of the selectxxxx method being invoked.
* @param args The arguments to the select. These need to match
* the method signature.
* @throws FinderException
*/
public static void execute_void(final Object obj, final String methodSignature, final Object... args) throws FinderException {
final BeanContext beanContext = (BeanContext) obj;
final Container container = beanContext.getContainer();
if (!(container instanceof CmpContainer)) {
throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
}
final CmpContainer cmpContainer = (CmpContainer) container;
cmpContainer.update(beanContext, methodSignature, args);
}
use of org.apache.openejb.Container in project tomee by apache.
the class EjbSelect method execute_short.
public static short execute_short(final Object obj, final String methodSignature, final Object... args) throws FinderException {
final BeanContext beanContext = (BeanContext) obj;
final Container container = beanContext.getContainer();
if (!(container instanceof CmpContainer)) {
throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
}
final CmpContainer cmpContainer = (CmpContainer) container;
final Number result = (Number) cmpContainer.select(beanContext, methodSignature, "short", args);
return result.shortValue();
}
use of org.apache.openejb.Container in project tomee by apache.
the class EjbSelect method execute_char.
public static char execute_char(final Object obj, final String methodSignature, final Object... args) throws FinderException {
final BeanContext beanContext = (BeanContext) obj;
final Container container = beanContext.getContainer();
if (!(container instanceof CmpContainer)) {
throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
}
final CmpContainer cmpContainer = (CmpContainer) container;
final Character result = (Character) cmpContainer.select(beanContext, methodSignature, "char", args);
return result.charValue();
}
use of org.apache.openejb.Container in project tomee by apache.
the class EjbSelect method execute_long.
public static long execute_long(final Object obj, final String methodSignature, final Object... args) throws FinderException {
final BeanContext beanContext = (BeanContext) obj;
final Container container = beanContext.getContainer();
if (!(container instanceof CmpContainer)) {
throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
}
final CmpContainer cmpContainer = (CmpContainer) container;
final Number result = (Number) cmpContainer.select(beanContext, methodSignature, "long", args);
return result.longValue();
}
use of org.apache.openejb.Container in project tomee by apache.
the class EjbSelect method execute_float.
public static float execute_float(final Object obj, final String methodSignature, final Object... args) throws FinderException {
final BeanContext beanContext = (BeanContext) obj;
final Container container = beanContext.getContainer();
if (!(container instanceof CmpContainer)) {
throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
}
final CmpContainer cmpContainer = (CmpContainer) container;
final Number result = (Number) cmpContainer.select(beanContext, methodSignature, "float", args);
return result.floatValue();
}
Aggregations