use of org.apache.openejb.core.cmp.CmpContainer in project tomee by apache.
the class EjbSelect method execute_boolean.
public static boolean execute_boolean(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 Boolean result = (Boolean) cmpContainer.select(beanContext, methodSignature, "byte", args);
return result.booleanValue();
}
use of org.apache.openejb.core.cmp.CmpContainer in project tomee by apache.
the class EjbSelect method execute_int.
public static int execute_int(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, "int", args);
return result.intValue();
}
use of org.apache.openejb.core.cmp.CmpContainer in project tomee by apache.
the class EjbSelect method execute_double.
public static double execute_double(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, "double", args);
return result.doubleValue();
}
Aggregations