Examples of EntityNotFoundException


Examples of com.arnaudpiroelle.marvel.api.exceptions.EntityNotFoundException

            if (r.getStatus() == 401) {
                return new AuthorizationException(data.getMessage(), cause);
            } else if (r.getStatus() == 403) {
                //TODO: Forbidden
            } else if (r.getStatus() == 404) {
                return new EntityNotFoundException(data.getMessage(), cause);
            } else if (r.getStatus() == 405) {
                //TODO: Method Not Allowed
            } else if (r.getStatus() == 409) {
                return new QueryException(data.getMessage(), cause);
            } else if (r.getStatus() == 429) {
View Full Code Here

Examples of com.google.appengine.api.datastore.EntityNotFoundException

  public Entity get(Transaction arg0, Key arg1) throws EntityNotFoundException
  {
    Entity e = store.get(arg1.toString());
    if (e == null)
      throw new EntityNotFoundException(arg1);
    return e;
  }
View Full Code Here

Examples of com.sparc.knappsack.exceptions.EntityNotFoundException

    @PreAuthorize("isDomainAdmin(#id) or hasRole('ROLE_ADMIN')")
    @RequestMapping(value = "/manager/requestsPending/{id}", method = RequestMethod.GET)
    public String requestsPending(@PathVariable Long id, Model model) {
        Domain domain = domainService.get(id);
        if (domain == null) {
            throw new EntityNotFoundException(String.format("Domain entity not found while viewing pending invites: %s", id));
        }
        model.addAttribute("domainType", domain.getDomainType().name());
        model.addAttribute("domainName", domain.getName());
        model.addAttribute("domainId", domain.getId());
View Full Code Here

Examples of com.tll.dao.EntityNotFoundException

  @Override
  public <E extends IEntity> E findEntity(Criteria<E> criteria) throws InvalidCriteriaException,
      EntityNotFoundException, NonUniqueResultException, DataAccessException {
    final List<E> list = findEntities(criteria, null);
    if(list == null || list.size() < 1) {
      throw new EntityNotFoundException("No matching entity found.");
    }
    else if(list.size() > 1) {
      throw new NonUniqueResultException("More than one matching entity found.");
    }
    assert list.size() == 1;
View Full Code Here

Examples of com.tll.dao.EntityNotFoundException

      DataAccessException {
    final List<E> list = getDb4oTemplate().query(p);
    if(list == null || list.size() < 1) {
      final String msg = "No matching entity found for key: [" + key + ']';
      logger.debug(msg);
      throw new EntityNotFoundException(msg);
    }
    if(list.size() > 1) {
      final String msg = list.size() + " matching entities found (not one) for key: [" + key + ']';
      logger.debug(msg);
      throw new EntityNotFoundException(msg);
    }
    assert list.size() == 1;
    return list.get(0);
  }
View Full Code Here

Examples of com.tll.dao.EntityNotFoundException

  @Override
  public <E extends IEntity> void purge(Class<E> entityType, Long pk) throws EntityNotFoundException,
      DataAccessException {
    final E existing = load(entityType, pk);
    if(existing == null) throw new EntityNotFoundException("Entity of primary key: " + pk + " not found for purging");
    getDb4oTemplate().delete(existing);
    getDb4oTemplate().purge(existing);
  }
View Full Code Here

Examples of javax.persistence.EntityNotFoundException

        assertEntity(entityClass);

        AbstractClassMetaData acmd = om.getMetaDataManager().getMetaDataForClass(entityClass, om.getClassLoaderResolver());
        if (acmd == null)
        {
            throw new EntityNotFoundException();
        }
        Object pc;
        try
        {
            if (acmd.getObjectidClass().equals(primaryKey.getClass().getName()))
View Full Code Here

Examples of javax.persistence.EntityNotFoundException

        {
            throw new IllegalArgumentException(LOCALISER.msg("EM.EntityIsNotManaged", StringUtils.toJVMIDString(entity)));
        }
        if (!om.exists(entity))
        {
            throw new EntityNotFoundException(LOCALISER.msg("EM.EntityNotInDatastore", StringUtils.toJVMIDString(entity)));
        }

        try
        {
            om.refreshObject(entity);
View Full Code Here

Examples of javax.persistence.EntityNotFoundException

                return new PersistenceException(jdoe.getMessage(), jdoe);
            }
        }
        else if (jdoe instanceof JDOObjectNotFoundException)
        {
            return new EntityNotFoundException(jdoe.getMessage());
        }
        else if (jdoe instanceof JDOUserException)
        {
            // JPA doesnt have "user" exceptions so just give a PersistenceException
            if (jdoe.getNestedExceptions() != null)
View Full Code Here

Examples of javax.persistence.EntityNotFoundException

                return new PersistenceException(jpe.getMessage(), jpe);
            }
        }
        else if (jpe instanceof JPOXObjectNotFoundException)
        {
            return new EntityNotFoundException(jpe.getMessage());
        }
        else if (jpe instanceof JPOXUserException)
        {
            // JPA doesnt have "user" exceptions so just give a PersistenceException
            if (jpe.getNestedExceptions() != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.