Package org.apache.olingo.odata2.core.exception

Examples of org.apache.olingo.odata2.core.exception.ODataRuntimeException


      return ODataResponse.status(HttpStatusCodes.OK)
          .entity(isJson ? wrapInJson(createParts()) : null)
          .contentHeader(isJson ? HttpContentType.APPLICATION_JSON : null)
          .build();
    } catch (final ODataException e) {
      throw new ODataRuntimeException("Should not happen", e);
    } catch (final IOException e) {
      throw new ODataRuntimeException("Should not happen", e);
    }
  }
View Full Code Here


      return handleRedirect();
    }

    final String factoryClassName = servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL);
    if (factoryClassName == null) {
      throw new ODataRuntimeException("servlet config missing: org.apache.olingo.odata2.processor.factory");
    }

    ClassLoader cl = (ClassLoader) servletRequest.getAttribute(ODataServiceFactory.FACTORY_CLASSLOADER_LABEL);
    Class<?> factoryClass;
    if (cl == null) {
View Full Code Here

        }
      }
      break;

    default:
      throw new ODataRuntimeException("Unknown or not implemented URI type: " + uriInfo.getUriType());
    }
  }
View Full Code Here

  protected ODataSingleProcessor createProcessor() throws ODataException {
    final ODataSingleProcessor processor = mock(ODataSingleProcessor.class);

    when(
        ((ServiceDocumentProcessor) processor).readServiceDocument(any(GetServiceDocumentUriInfo.class),
            any(String.class))).thenThrow(new ODataRuntimeException("unit testing"));

    return processor;
  }
View Full Code Here

      return ODataResponse.status(HttpStatusCodes.OK)
          .entity(wrapInJson(createParts()))
          .contentHeader(HttpContentType.APPLICATION_JSON)
          .build();
    } catch (final ODataException e) {
      throw new ODataRuntimeException("Should not happen", e);
    } catch (final IOException e) {
      throw new ODataRuntimeException("Should not happen", e);
    }
  }
View Full Code Here

    super(type);

    try {
      inlineBaseUri = new URI("http://hubbeldubbel.com/");
    } catch (URISyntaxException e) {
      throw new ODataRuntimeException(e);
    }
  }
View Full Code Here

        Object value = field.get(instance);
        field.setAccessible(access);
        return value;
      }
    } catch (IllegalArgumentException ex) { // should never happen
      throw new ODataRuntimeException(ex);
    } catch (IllegalAccessException ex) { // should never happen
      throw new ODataRuntimeException(ex);
    }
  }
View Full Code Here

        field.setAccessible(true);
        field.set(instance, value);
        field.setAccessible(access);
      }
    } catch (IllegalArgumentException ex) { // should never happen
      throw new ODataRuntimeException(ex);
    } catch (IllegalAccessException ex) { // should never happen
      throw new ODataRuntimeException(ex);
    }
  }
View Full Code Here

    AnnotatedNavInfo navInfo = ANNOTATION_HELPER.getCommonNavigationInfo(
        sourceStore.getDataTypeClass(), targetStore.getDataTypeClass());
    Field sourceField = navInfo.getFromField();
    if (sourceField == null) {
      throw new ODataRuntimeException("Missing source field for related data (sourceStore='" + sourceStore
          + "', targetStore='" + targetStore + "').");
    }

    List<Object> resultData = readResultData(targetStore, sourceData, sourceField);
    return extractResultData(targetStore, targetKeys, navInfo, resultData);
View Full Code Here

    DataStore<Object> dataStore = getDataStore(entitySet);
    if (dataStore != null) {
      return dataStore.createInstance();
    }

    throw new ODataRuntimeException("No DataStore found for entitySet with name: " + entitySet.getName());
  }
View Full Code Here

TOP

Related Classes of org.apache.olingo.odata2.core.exception.ODataRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.