Examples of NotFoundException


Examples of com.github.jacek99.myapp.exception.NotFoundException

    public Country getExistingById(String countryCode) {
        Country country = getById(countryCode).orNull();
        if (country != null) {
            return country;
        } else {
            throw new NotFoundException("Country",countryCode);
        }
    }
View Full Code Here

Examples of com.google.api.server.spi.response.NotFoundException

  }

  public BlogPost getBlogPost(@Named("id") Long id) throws NotFoundException {
    BlogPost bp = ofy().load().type(BlogPost.class).id(id).get();
    if (bp == null) {
      throw new NotFoundException("No entity with the id " + id + " exists.");
    }
    BlogPostContent bpc = ofy().load().type(BlogPostContent.class).id(id).get();
    if (bpc == null) {
      throw new NotFoundException("No entity with the id " + id + " exists.");
    }
    bp.setContent(bpc.getContent());
    return bp;
  }
View Full Code Here

Examples of com.google.code.stackexchange.client.exception.NotFoundException

     
    case ErrorCodes.INVALID_SORT:
      return new InvalidSortException(error.getMessage(), new Date());
 
    case ErrorCodes.NOT_FOUND:
      return new NotFoundException(error.getMessage(), new Date());
     
    case ErrorCodes.REQUEST_LIMIT_EXCEEDED:
      return new RequestLimitExceededException(error.getMessage(), new Date());
     
    case ErrorCodes.INVALID_VECTOR_FORMAT:
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.NotFoundException

         + "\n Possible causes:"
         + "\n\t 1. Check if any type or subtype used by this class refers to another module and if this module is inherited in the .gwt.xml file."
         + "\n\t 2. Check if your class or its members belongs to a client package."
         + "\n\t 3. Check the versions of all your modules.";
     
      throw new NotFoundException(message, e);
    }
  }
View Full Code Here

Examples of com.google.nigori.common.NotFoundException

      Response response =
          postResponse(MessageLibrary.REQUEST_GET_REVISIONS, MessageLibrary.toJson(request));

      if (response.notFound()) {
        // request was successful, but no data key by that name was found.
        throw new NotFoundException(response.jsonResponse);
      }

      if (!success(response.resp)) {
        failure(response);
      }
View Full Code Here

Examples of com.googlecode.objectify.NotFoundException

        CharacterInfo attachedCharacterInfo = new CharacterInfo();
        attachedCharacterInfo.setId(2L);
        priceSet.setAttachedCharacterInfo(attachedCharacterInfo);
        when(httpServletRequest.getParameter("priceSetID")).thenReturn("1");
        when(priceSetDao.get(new Key<PriceSet>(PriceSet.class, 1))).thenReturn(priceSet);
        when(characterDao.get(new Key<Character>(Character.class, 2))).thenThrow(new NotFoundException(null));
        checkPriceSetTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(priceSetDao).putWithoutChecks(priceSet);
        assertNull(priceSet.getAttachedCharacterInfo());
    }
View Full Code Here

Examples of com.gwtent.reflection.client.NotFoundException

  public Object invoke(Object instance, String methodName, Object[] args) throws MethodInvokeException {
    if (this.getSuperclass() != null)
      return getSuperclass().invoke(instance, methodName, args);
    else
      throw new NotFoundException(methodName + " not found or unimplement?");
  }
View Full Code Here

Examples of com.hp.hpl.jena.shared.NotFoundException

    public void read(Model model, String url)
    {
        // model.read(url)
        TypedInputStream in = StreamManager.get().open(url) ;
        if ( in == null )
            throw new NotFoundException(url) ;
        String contentType = in.getContentType() ;
       
        // Reading a URL, no hint language provided.
        // Use the URL structure as the hint.
        Lang lang = null ;
View Full Code Here

Examples of com.iqbon.jcms.util.NotFoundException

   * @return
   */
  public Model getModelInfoByModelName(String modelName) throws NotFoundException {
    Model model = modelDAO.queryModelByModelName(modelName);
    if (model.getDelete() == 1) {
      throw new NotFoundException();
    }
    return model;
  }
View Full Code Here

Examples of com.netflix.astyanax.connectionpool.exceptions.NotFoundException

  @Override
  public Properties getColumnFamilyProperties(String columnFamily) throws ConnectionException {
        KeyspaceDefinition ksDef = this.describeKeyspace();
        ColumnFamilyDefinition cfDef = ksDef.getColumnFamily(columnFamily);
        if (cfDef == null)
            throw new NotFoundException(String.format("Column family '%s' in keyspace '%s' not found", columnFamily, getKeyspaceName()));
        try {
      return cfDef.getProperties();
    } catch (Exception e) {
      throw new RuntimeException();
    }
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.