public Object execute(Method finderMethod, Object[] args, final CmpEntityBeanContext ctx, final JDBCQueryCommand.EntityProxyFactory factory) throws FinderException {
JDBCQueryCommand query = manager.getQueryManager().getQueryCommand(finderMethod);
Collection result = query.execute(finderMethod, args, ctx, factory);
if (result.isEmpty()) {
throw new ObjectNotFoundException(NO_SUCH_ENTITY);
} else if (result.size() == 1) {
return result.iterator().next();
} else {
throw new FinderException("More than one entity matches the finder criteria: " + result);
}