Examples of ObjectNotFoundException


Examples of br.net.woodstock.rockframework.domain.ObjectNotFoundException

  public <T> T getObject(final Class<T> clazz) {
    Assert.notNull(clazz, "clazz");

    Map<String, Object> map = this.context.getBeansOfType(clazz);
    if (map.size() == 0) {
      throw new ObjectNotFoundException("Object not found for type " + clazz.getCanonicalName());
    }
    if (map.size() > 1) {
      throw new TooManyObjectsException("To many objects found for type " + clazz.getCanonicalName());
    }
View Full Code Here

Examples of com.dotcms.repackage.net.sf.hibernate.ObjectNotFoundException

      q.setString(queryPos++, userId);

      Iterator itr = q.list().iterator();

      if (!itr.hasNext()) {
        throw new ObjectNotFoundException(null, UserHBM.class);
      }

      UserHBM userHBM = (UserHBM)itr.next();

      return UserHBMUtil.model(userHBM);
View Full Code Here

Examples of com.infoclinika.mssharing.model.ObjectNotFoundException

        if(!instrument.isOperator(Util.USER_FROM_ID.apply(actor))) {
            throw new AccessDenied("User is not an operator of instrument");
        }
        Set<PendingOperator> pendingOperators = instrument.getPending();
        if(pendingOperators.size() == 0) {
            throw new ObjectNotFoundException();
        }
        final PendingOperator pending = find(pendingOperators, new Predicate<PendingOperator>() {
            @Override
            public boolean apply(PendingOperator pendingOperator) {
                return pendingOperator.getUser().equals(user);
View Full Code Here

Examples of com.kolich.havalo.exceptions.objects.ObjectNotFoundException

            // Add the object to repository.
            repo.addObject(key, hfo);
          } else if(hfo == null && failIfNotFound) {
            // The object with the given key did not exist in
            // this repository.
            throw new ObjectNotFoundException("Object not found " +
              "(id=" + repo.getRepoId() + ", key=" + key + ")");
          }
          return hfo;
        }
      }.read(false); // Shared reader lock on repo, no wait
View Full Code Here

Examples of com.liusoft.dlog4j.ObjectNotFoundException

        if (photo.getAlbum().getCover() != null
            && photo.getAlbum().getCover().getId() == photo.getId())
          photo.getAlbum().setCover(null);
        AlbumBean new_album = AlbumDAO.getAlbumByID(new_album_id);
        if(new_album == null)
          throw new ObjectNotFoundException(String.valueOf(new_album));
        if(new_album.getSite().getId()!=photo.getSite().getId())
          throw new IllegalAccessException(new_album.getName());
        //�޸����ಾ����Ƭ�� ����һ��
        AlbumBean parent = new_album;
        int deep = 0;
View Full Code Here

Examples of com.puzzlebazar.shared.ObjectNotFoundException

      UserImpl user = ofyTxn.get(UserImpl.class, userId);
      user.editFrom(updatedUser);
      ofyTxn.put(user);
      ofyTxn.getTxn().commit();
    } catch (NotFoundException e) {
      throw new ObjectNotFoundException("User not found, can't modify. Id = " + userId);
    } finally {
      if (ofyTxn.getTxn().isActive()) {
        ofyTxn.getTxn().rollback();
      }
    }
View Full Code Here

Examples of com.sun.sgs.app.ObjectNotFoundException

    {
  TxnInfo txnInfo = checkTxn(txn);
  byte[] result = oidsDb.get(
      txnInfo.dbTxn, DataEncoding.encodeLong(oid), forUpdate);
  if (result == null || isPlaceholderValue(result)) {
      throw new ObjectNotFoundException("Object not found: " + oid);
  }
  return decodeValue(result);
    }
View Full Code Here

Examples of com.sun.sgs.app.ObjectNotFoundException

    protected void removeObjectInternal(Transaction txn, long oid) {
  TxnInfo txnInfo = checkTxn(txn);
  byte[] key = DataEncoding.encodeLong(oid);
  boolean found = oidsDb.delete(txnInfo.dbTxn, key);
  if (!found) {
      throw new ObjectNotFoundException("Object not found: " + oid);
  }
  txnInfo.modified = true;
    }
View Full Code Here

Examples of com.sun.sgs.app.ObjectNotFoundException

     *    current transaction
     */
     private NodeImpl getForUpdate(DataService dataService) {
  NodeImpl nodeImpl = getNodeForUpdate(dataService, id);
  if (nodeImpl == null) {
      throw new ObjectNotFoundException("node is removed");
  }
  return nodeImpl;
    }
View Full Code Here

Examples of com.sun.sgs.app.ObjectNotFoundException

  assert object instanceof ManagedObject
      : "Object is not a managed object";
  ManagedReferenceImpl<T> ref = Objects.uncheckedCast(
      context.refs.find(object));
  if (ref != null && ref.isRemoved()) {
      throw new ObjectNotFoundException("Object has been removed");
  }
  return ref;
     }
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.