org.apache.olingo.odata2.api.exception.ODataApplicationException Java Examples

The following examples show how to use org.apache.olingo.odata2.api.exception.ODataApplicationException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OlingoManager.java    From DataHubSystem with GNU Affero General Public License v3.0 8 votes vote down vote up
public List<Product> getProducts(User user, String uuid,
      FilterExpression filter_expr, OrderByExpression order_expr, int skip,
      int top) throws ExceptionVisitExpression, ODataApplicationException
{
   ProductSQLVisitor expV = new ProductSQLVisitor();
   Object visit_result = null;

   if (filter_expr != null)
   {
      visit_result = filter_expr.accept(expV);
   }
   if (order_expr != null)
   {
      visit_result = order_expr.accept(expV);
   }

   return productService.getProducts((DetachedCriteria) visit_result, uuid,
         skip, top);
}
 
Example #2
Source File: ScenarioDataSource.java    From olingo-odata2 with Apache License 2.0 6 votes vote down vote up
public void createData(final EdmEntitySet entitySet, final Object data) throws ODataNotImplementedException,
    EdmException, ODataApplicationException {
  if (ENTITYSET_1_1.equals(entitySet.getName())) {
    dataContainer.getEmployees().add((Employee) data);
  } else if (ENTITYSET_1_2.equals(entitySet.getName())) {
    dataContainer.getTeams().add((Team) data);
  } else if (ENTITYSET_1_3.equals(entitySet.getName())) {
    dataContainer.getRooms().add((Room) data);
  } else if (ENTITYSET_1_4.equals(entitySet.getName())) {
    dataContainer.getManagers().add((Manager) data);
  } else if (ENTITYSET_1_5.equals(entitySet.getName())) {
    dataContainer.getBuildings().add((Building) data);
  } else if (ENTITYSET_2_1.equals(entitySet.getName())) {
    dataContainer.getPhotos().add((Photo) data);
  } else {
    throw new ODataNotImplementedException();
  }
}
 
Example #3
Source File: CustomerProcessor.java    From cloud-espm-v2 with Apache License 2.0 6 votes vote down vote up
/**
 * Function Import implementation for getting customer by email address
 * 
 * @param emailAddress
 *            email address of the customer
 * @return customer entity.
 * @throws ODataException
 */
@SuppressWarnings("unchecked")
@EdmFunctionImport(name = "GetCustomerByEmailAddress", entitySet = "Customers", returnType = @ReturnType(type = Type.ENTITY, isCollection = true))
public List<Customer> getCustomerByEmailAddress(
		@EdmFunctionImportParameter(name = "EmailAddress") String emailAddress) throws ODataException {
	EntityManagerFactory emf = Utility.getEntityManagerFactory();
	EntityManager em = emf.createEntityManager();
	List<Customer> custList = null;
	try {

		Query query = em.createNamedQuery("Customer.getCustomerByEmailAddress");
		query.setParameter("emailAddress", emailAddress);

		try {

			custList = query.getResultList();
			return custList;

		} catch (NoResultException e) {
			throw new ODataApplicationException("No matching customer with Email Address:" + emailAddress,
					Locale.ENGLISH, HttpStatusCodes.BAD_REQUEST, e);
		}
	} finally {
		em.close();
	}
}
 
Example #4
Source File: AnnotationInMemoryDs.java    From olingo-odata2 with Apache License 2.0 6 votes vote down vote up
@Override
public void writeBinaryData(final EdmEntitySet entitySet, final Object mediaEntityInstance,
    final BinaryData binaryData)
    throws ODataNotImplementedException, ODataNotFoundException, EdmException, ODataApplicationException {

  try {
    DataStore<Object> dataStore = getDataStore(entitySet);
    Object readEntry = dataStore.read(mediaEntityInstance);
    if (readEntry == null) {
      throw new ODataNotFoundException(ODataNotFoundException.ENTITY);
    } else {
      ANNOTATION_HELPER.setValueForAnnotatedField(
          mediaEntityInstance, EdmMediaResourceContent.class, binaryData.getData());
      ANNOTATION_HELPER.setValueForAnnotatedField(
          mediaEntityInstance, EdmMediaResourceMimeType.class, binaryData.getMimeType());
    }
  } catch (ODataAnnotationException e) {
    throw new AnnotationRuntimeException("Invalid media resource annotation at entity set '" + entitySet.getName()
        + "' with message '" + e.getMessage() + "'.", e);
  }
}
 
Example #5
Source File: InvalidDataInScenarioTest.java    From olingo-odata2 with Apache License 2.0 6 votes vote down vote up
@Override
public ODataResponse readEntity(GetEntityUriInfo uriInfo, String contentType) throws ODataException {
  HashMap<String, Object> data = new HashMap<String, Object>();

  if ("Employees".equals(uriInfo.getTargetEntitySet().getName())) {
    if ("2".equals(uriInfo.getKeyPredicates().get(0).getLiteral())) {
      data.put("EmployeeId", "1");
      data.put("TeamId", "420");
    }

    ODataContext context = getContext();
    EntityProviderWriteProperties writeProperties =
        EntityProviderWriteProperties.serviceRoot(context.getPathInfo().getServiceRoot()).build();

    return EntityProvider.writeEntry(contentType, uriInfo.getTargetEntitySet(), data, writeProperties);
  } else {
    throw new ODataApplicationException("Wrong testcall", Locale.getDefault(), HttpStatusCodes.NOT_IMPLEMENTED);
  }
}
 
Example #6
Source File: AnnotationInMemoryDs.java    From olingo-odata2 with Apache License 2.0 6 votes vote down vote up
@Override
public Object readRelatedData(final EdmEntitySet sourceEntitySet, final Object sourceData,
    final EdmEntitySet targetEntitySet,
    final Map<String, Object> targetKeys)
    throws ODataNotImplementedException, ODataNotFoundException, EdmException, ODataApplicationException {

  DataStore<?> sourceStore = dataStores.get(sourceEntitySet.getName());
  DataStore<?> targetStore = dataStores.get(targetEntitySet.getName());

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

  List<Object> resultData = readResultData(targetStore, sourceData, sourceField);
  return extractResultData(targetStore, targetKeys, navInfo, resultData);
}
 
Example #7
Source File: XmlEntryConsumer.java    From olingo-odata2 with Apache License 2.0 6 votes vote down vote up
/**
 * Create {@link EntityProviderReadProperties} which can be used for reading of inline properties/entrys of navigation
 * links within
 * this current read entry.
 * 
 * @param readProperties
 * @param navigationProperty
 * @return
 * @throws EntityProviderException
 */
private EntityProviderReadProperties createInlineProperties(final EntityProviderReadProperties readProperties,
    final EdmNavigationProperty navigationProperty) throws EntityProviderException {
  final OnReadInlineContent callback = readProperties.getCallback();

  EntityProviderReadProperties currentReadProperties = EntityProviderReadProperties.initFrom(readProperties).build();
  if (callback == null) {
    return currentReadProperties;
  } else {
    try {
      return callback.receiveReadProperties(currentReadProperties, navigationProperty);
    } catch (ODataApplicationException e) {
      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
          .getSimpleName()), e);
    }
  }
}
 
Example #8
Source File: OlingoManager.java    From DataHubSystem with GNU Affero General Public License v3.0 6 votes vote down vote up
public List<User> getUsers(
      FilterExpression filter_expr, OrderByExpression order_expr, int skip,
      int top) throws ExceptionVisitExpression, ODataApplicationException
{
   UserSQLVisitor expV = new UserSQLVisitor();
   Object visit = null;
   if (filter_expr != null)
   {
      visit = filter_expr.accept(expV);
   }
   if (order_expr != null)
   {
      visit = order_expr.accept(expV);
   }
   return userService.getUsers((DetachedCriteria) visit, skip, top);
}
 
Example #9
Source File: AnnotationInMemoryDs.java    From olingo-odata2 with Apache License 2.0 6 votes vote down vote up
@Override
public Object readData(final EdmEntitySet entitySet, final Map<String, Object> keys)
    throws ODataNotFoundException, EdmException, ODataApplicationException {

  DataStore<Object> store = getDataStore(entitySet);
  if (store != null) {
    Object keyInstance = store.createInstance();
    ANNOTATION_HELPER.setKeyFields(keyInstance, keys);

    Object result = store.read(keyInstance);
    if (result != null) {
      return result;
    }
  }

  throw new ODataNotFoundException(ODataNotFoundException.ENTITY);
}
 
Example #10
Source File: Expander.java    From DataHubSystem with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public WriteEntryCallbackResult retrieveEntryResult(WriteEntryCallbackContext context)
      throws ODataApplicationException
{
   EntityProviderWriteProperties inlineProperties = EntityProviderWriteProperties
         .serviceRoot(this.serviceRoot)
         .expandSelectTree(context.getCurrentExpandSelectTreeNode())
         .build();

   WriteEntryCallbackResult result = new WriteEntryCallbackResult();
   result.setInlineProperties(inlineProperties);

   List<Map<String, Object>> data = getData(context);
   if (data.size() > 1)
   {
      throw new IllegalStateException("cannot expand a feed as an entity");
   }
   if (data.size() == 1)
   {
      result.setEntryData(data.get(0));
   }

   return result;
}
 
Example #11
Source File: Expander.java    From DataHubSystem with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public WriteFeedCallbackResult retrieveFeedResult(WriteFeedCallbackContext context)
      throws ODataApplicationException
{
   EntityProviderWriteProperties inlineProperties = EntityProviderWriteProperties
         .serviceRoot(this.serviceRoot)
         .expandSelectTree(context.getCurrentExpandSelectTreeNode())
         .selfLink(context.getSelfLink())
         .build();

   WriteFeedCallbackResult result = new WriteFeedCallbackResult();
   result.setInlineProperties(inlineProperties);

   result.setFeedData(getData(context));

   return result;
}
 
Example #12
Source File: ScenarioDataSource.java    From olingo-odata2 with Apache License 2.0 6 votes vote down vote up
public void
    writeBinaryData(final EdmEntitySet entitySet, final Object mediaLinkEntryData, final BinaryData binaryData)
        throws ODataNotImplementedException, ODataNotFoundException, EdmException, ODataApplicationException {
  if (mediaLinkEntryData == null) {
    throw new ODataNotFoundException(null);
  }

  if (ENTITYSET_1_1.equals(entitySet.getName()) || ENTITYSET_1_4.equals(entitySet.getName())) {
    final Employee employee = (Employee) mediaLinkEntryData;
    employee.setImage(binaryData.getData());
    employee.setImageType(binaryData.getMimeType());
  //Storing the binary data to be used for comparison in the tests
    Util.getInstance().setBinaryContent(employee.getImage());
  } else if (ENTITYSET_2_1.equals(entitySet.getName())) {
    final Photo photo = (Photo) mediaLinkEntryData;
    photo.setImage(binaryData.getData());
    photo.setImageType(binaryData.getMimeType());
  } else {
    throw new ODataNotImplementedException();
  }
}
 
Example #13
Source File: JsonEntryEntityProducerTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context)
    throws ODataApplicationException {
  Map<String, Object> roomData = new HashMap<String, Object>();
  roomData.put("Id", "1");
  roomData.put("Version", 1);
  List<Map<String, Object>> roomsData = new ArrayList<Map<String, Object>>();
  roomsData.add(roomData);
  WriteFeedCallbackResult result = new WriteFeedCallbackResult();
  result.setFeedData(roomsData);
  result.setInlineProperties(DEFAULT_PROPERTIES);
  return result;
}
 
Example #14
Source File: JsonEntryEntityProducerTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context)
    throws ODataApplicationException {
  WriteFeedCallbackResult result = new WriteFeedCallbackResult();
  result.setFeedData(null);
  result.setInlineProperties(DEFAULT_PROPERTIES);
  return result;
}
 
Example #15
Source File: ExpandSelectProducerWithBuilderTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
    throws ODataApplicationException {
  WriteEntryCallbackResult writeEntryCallbackResult = new WriteEntryCallbackResult();
  EntityProviderWriteProperties inlineProperties =
      EntityProviderWriteProperties.fromProperties(DEFAULT_PROPERTIES).expandSelectTree(
          context.getCurrentExpandSelectTreeNode()).build();
  writeEntryCallbackResult.setInlineProperties(inlineProperties);
  Map<String, Object> buildingData = new HashMap<String, Object>();
  buildingData.put("Id", "1");
  buildingData.put("Name", "BuildingName");
  writeEntryCallbackResult.setEntryData(buildingData);
  return writeEntryCallbackResult;
}
 
Example #16
Source File: JsonEntryEntityProducerTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
    throws ODataApplicationException {
  WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  result.setEntryData(null);
  result.setInlineProperties(DEFAULT_PROPERTIES);
  return result;
}
 
Example #17
Source File: JsonEntryEntityProducerTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
    throws ODataApplicationException {
  WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  result.setEntryData(new HashMap<String, Object>());
  result.setInlineProperties(DEFAULT_PROPERTIES);
  return result;
}
 
Example #18
Source File: JsonEntryEntityProducerTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context)
    throws ODataApplicationException {
  WriteFeedCallbackResult result = new WriteFeedCallbackResult();
  result.setFeedData(new ArrayList<Map<String, Object>>());
  result.setInlineProperties(DEFAULT_PROPERTIES);
  return result;
}
 
Example #19
Source File: ODataExceptionWrapperTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Test
public void testCallbackWithLocales1() throws Exception {
  UriInfo uriInfo = getMockedUriInfo();
  HttpHeaders httpHeaders = Mockito.mock(HttpHeaders.class);
  List<Locale> locales = new ArrayList<Locale>();
  locales.add(Locale.GERMANY);
  locales.add(Locale.FRANCE);
  when(httpHeaders.getAcceptableLanguages()).thenReturn(locales);
  
  ODataErrorCallback errorCallback = new ODataErrorCallback() {
    @Override
    public ODataResponse handleError(final ODataErrorContext context) throws ODataApplicationException {
      assertEquals("de", context.getLocale().getLanguage());
      assertEquals("DE", context.getLocale().getCountry());
      return ODataResponse.entity("bla").status(HttpStatusCodes.BAD_REQUEST).contentHeader("text/html").build();
    }
  };

  ODataExceptionWrapper exceptionWrapper = createWrapper1(uriInfo, httpHeaders, errorCallback);
  ODataResponse response = exceptionWrapper.wrapInExceptionResponse(
      new ODataApplicationException("Error",Locale.GERMANY));

  // verify
  assertNotNull(response);
  assertEquals(HttpStatusCodes.BAD_REQUEST.getStatusCode(), response.getStatus().getStatusCode());
  String errorMessage = (String) response.getEntity();
  assertEquals("bla", errorMessage);
  String contentTypeHeader = response.getContentHeader();
  assertEquals("text/html", contentTypeHeader);
}
 
Example #20
Source File: XmlExpandProducerTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Test
public void expandSelectedTeamEmptyDataMap() throws Exception {
  ExpandSelectTreeNode selectTree = getSelectExpandTree("Employees('1')", "ne_Team", "ne_Team");

  HashMap<String, ODataCallback> callbacksEmployee = new HashMap<String, ODataCallback>();
  OnWriteEntryContent callback = new OnWriteEntryContent() {

    @Override
    public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
        throws ODataApplicationException {
      WriteEntryCallbackResult result = new WriteEntryCallbackResult();
      result.setInlineProperties(DEFAULT_PROPERTIES);
      result.setEntryData(new HashMap<String, Object>());
      return result;
    }
  };
  callbacksEmployee.put("ne_Team", callback);
  EntityProviderWriteProperties properties =
      EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).callbacks(callbacksEmployee)
          .build();
  AtomEntityProvider provider = createAtomEntityProvider();
  ODataResponse response =
      provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
          employeeData, properties);

  String xmlString = verifyResponse(response);
  verifyNavigationProperties(xmlString, F, F, T);
  assertXpathNotExists("/a:entry/m:properties", xmlString);
  assertXpathExists(teamXPathString + "/m:inline", xmlString);
  assertXpathNotExists(teamXPathString + "/m:inline/a:entry", xmlString);
}
 
Example #21
Source File: InvalidDataInScenarioTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public ODataResponse readEntitySet(GetEntitySetUriInfo uriInfo, String contentType) throws ODataException {
  if ("Employees".equals(uriInfo.getTargetEntitySet().getName())) {
    ODataContext context = getContext();
    EntityProviderWriteProperties writeProperties =
        EntityProviderWriteProperties.serviceRoot(context.getPathInfo().getServiceRoot()).build();
    List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
    data.add(new HashMap<String, Object>());
    return EntityProvider.writeFeed(contentType, uriInfo.getTargetEntitySet(), data, writeProperties);
  } else {
    throw new ODataApplicationException("Wrong testcall", Locale.getDefault(), HttpStatusCodes.NOT_IMPLEMENTED);
  }
}
 
Example #22
Source File: MemberExpressionImpl.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public Object accept(final ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException {
  Object retSource = path.accept(visitor);
  Object retPath = property.accept(visitor);

  Object ret = visitor.visitMember(this, retSource, retPath);
  return ret;
}
 
Example #23
Source File: BinaryExpressionImpl.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public Object accept(final ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException {
  Object retLeftSide = leftSide.accept(visitor);
  Object retRightSide = rightSide.accept(visitor);

  return visitor.visitBinary(this, operatorInfo.getOperator(), retLeftSide, retRightSide);
}
 
Example #24
Source File: MethodExpressionImpl.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public Object accept(final ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException {
  ArrayList<Object> retParameters = new ArrayList<Object>();
  for (CommonExpression parameter : actualParameters) {
    Object retParameter = parameter.accept(visitor);
    retParameters.add(retParameter);
  }

  Object ret = visitor.visitMethod(this, getMethod(), retParameters);
  return ret;
}
 
Example #25
Source File: ODataExceptionMapperImplTest.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Test
public void testODataApplicationException() throws Exception {
  // prepare
  String message = "expected exception message";
  Exception exception = new ODataApplicationException(message, Locale.ENGLISH);

  // execute
  Response response = exceptionMapper.toResponse(exception);

  // verify
  verifyResponse(response, message, HttpStatusCodes.INTERNAL_SERVER_ERROR);
}
 
Example #26
Source File: ODataExceptionWrapper.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
private ODataResponse handleErrorCallback(final ODataErrorCallback callback) throws EntityProviderException {
  ODataResponse oDataResponse;
  try {
    oDataResponse = callback.handleError(errorContext);
  } catch (ODataApplicationException e) {
    fillErrorContext(e);
    enhanceContextWithApplicationException(e);
    oDataResponse = new ProviderFacadeImpl().writeErrorDocument(errorContext);
  }
  return oDataResponse;
}
 
Example #27
Source File: ODataJPAErrorCallback.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public ODataResponse handleError(final ODataErrorContext context) throws ODataApplicationException {

  final String SEPARATOR = " : ";

  Throwable t = context.getException();
  if (t instanceof ODataJPAException && t.getCause() != null) {
    StringBuilder errorBuilder = new StringBuilder();
    errorBuilder.append(t.getCause().getClass().toString());
    errorBuilder.append(SEPARATOR);
    errorBuilder.append(t.getCause().getMessage());
    context.setInnerError(errorBuilder.toString());
  }
  return EntityProvider.writeErrorDocument(context);
}
 
Example #28
Source File: Callback.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public DeserializerProperties receiveReadProperties(DeserializerProperties readProperties,
    EdmNavigationProperty navigationProperty) throws ODataApplicationException {
  Map<String, Object> typeMappings = new HashMap<String, Object>();
  return DeserializerProperties.init().addTypeMappings(typeMappings).
      callback(new Callback()).build();
}
 
Example #29
Source File: AnnotationInMemoryDs.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public void writeRelation(final EdmEntitySet sourceEntitySet, final Object sourceEntity,
    final EdmEntitySet targetEntitySet,
    final Map<String, Object> targetEntityValues)
    throws ODataNotImplementedException, ODataNotFoundException, EdmException, ODataApplicationException {
  // get common data
  DataStore<Object> sourceStore = dataStores.get(sourceEntitySet.getName());
  DataStore<Object> targetStore = dataStores.get(targetEntitySet.getName());

  AnnotatedNavInfo commonNavInfo = ANNOTATION_HELPER.getCommonNavigationInfo(
      sourceStore.getDataTypeClass(), targetStore.getDataTypeClass());

  // get and validate source fields
  Field sourceField = commonNavInfo.getFromField();
  if (sourceField == null) {
    throw new AnnotationRuntimeException("Missing source field for related data (sourceStore='" + sourceStore
        + "', targetStore='" + targetStore + "').");
  }

  // get related target entity
  Object targetEntity = targetStore.createInstance();
  ANNOTATION_HELPER.setKeyFields(targetEntity, targetEntityValues);
  targetEntity = targetStore.read(targetEntity);

  // set at source
  setValueAtNavigationField(sourceEntity, sourceField, targetEntity);
  // set at target
  Field targetField = commonNavInfo.getToField();
  if (targetField != null) {
    setValueAtNavigationField(targetEntity, targetField, sourceEntity);
  }
}
 
Example #30
Source File: AnnotationInMemoryDs.java    From olingo-odata2 with Apache License 2.0 5 votes vote down vote up
@Override
public void deleteRelation(final EdmEntitySet sourceEntitySet, final Object sourceData,
    final EdmEntitySet targetEntitySet,
    final Map<String, Object> targetKeys)
    throws ODataNotImplementedException, ODataNotFoundException, EdmException, ODataApplicationException {
  throw new ODataNotImplementedException(ODataNotImplementedException.COMMON);
}