Package org.odata4j.exceptions

Examples of org.odata4j.exceptions.NotFoundException


    long id = Long.parseLong(entityKey.asSingleValue().toString());
    try {
      return datastore.get(KeyFactory.createKey(kind, id));
    } catch (EntityNotFoundException e) {
      throw new NotFoundException("Entity " + entitySetName + " with key " + entityKey + " not found.");
    }
  }
View Full Code Here


  public BaseResponse getNavProperty(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo) {
    final EdmEntitySet ees = metadata.getEdmEntitySet(entitySetName);
    EdmEntityType eet = ees.getType();
    EdmNavigationProperty enp = eet.findNavigationProperty(navProp);
    if (enp == null) {
      throw new NotFoundException("EdmNavigationProperty " + navProp + " not found.");
    }
    final EdmEntitySet eesNavProp = metadata.getEdmEntitySet(enp.getToRole().getRole());
    EdmMultiplicity relMultiplicity = enp.getRelationship().getEnd2().getMultiplicity();

    Entity entity = findEntity(entitySetName, entityKey);
View Full Code Here

    }
    if (r instanceof EntityResponse) {
      EntityResponse er = (EntityResponse) r;
      return Responses.singleId(er.getEntity());
    }
    throw new NotFoundException("EdmNavigationProperty " + targetNavProp + " of entity " + sourceEntity + " not found.");
  }
View Full Code Here

TOP

Related Classes of org.odata4j.exceptions.NotFoundException

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.