Package com.googlecode.objectify

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


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

  /**
   */
  final public Key<T> safeKey() {
    Key<T> k = this.key();
    if (k == null)
      throw new NotFoundException();
    else
      return k;
  }
View Full Code Here

  /**
   */
  final public T safeGet() {
    T t = this.get();
    if (t == null)
      throw new NotFoundException(key());
    else
      return t;
  }
View Full Code Here

  /**
   */
  final public Key<T> safeKey() {
    Key<T> k = this.key();
    if (k == null)
      throw new NotFoundException();
    else
      return k;
  }
View Full Code Here

  /**
   */
  final public T safeGet() {
    T t = this.get();
    if (t == null)
      throw new NotFoundException(key());
    else
      return t;
  }
View Full Code Here

  /**
   */
  final public T safe() {
    T t = this.get();
    if (t == null)
      throw new NotFoundException(key());
    else
      return t;
  }
View Full Code Here

TOP

Related Classes of com.googlecode.objectify.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.