Examples of ObjectNotFoundException


Examples of org.hibernate.ObjectNotFoundException

    // EntityNotFoundDelegate
    EntityNotFoundDelegate entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
    if ( entityNotFoundDelegate == null ) {
      entityNotFoundDelegate = new EntityNotFoundDelegate() {
        public void handleEntityNotFound(String entityName, Serializable id) {
          throw new ObjectNotFoundException( id, entityName );
        }
      };
    }
    this.entityNotFoundDelegate = entityNotFoundDelegate;
View Full Code Here

Examples of org.hibernate.ObjectNotFoundException

            entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
          }
          else {
            entityNotFoundDelegate = new EntityNotFoundDelegate() {
              public void handleEntityNotFound(String entityName, Serializable id) {
                throw new ObjectNotFoundException( id, entityName );
              }
            };
          }
        }
        return entityNotFoundDelegate;
View Full Code Here

Examples of org.hibernate.ObjectNotFoundException

    // EntityNotFoundDelegate
    EntityNotFoundDelegate entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
    if ( entityNotFoundDelegate == null ) {
      entityNotFoundDelegate = new EntityNotFoundDelegate() {
        public void handleEntityNotFound(String entityName, Serializable id) {
          throw new ObjectNotFoundException( id, entityName );
        }
      };
    }
    this.entityNotFoundDelegate = entityNotFoundDelegate;
View Full Code Here

Examples of org.hibernate.ObjectNotFoundException

    // EntityNotFoundDelegate
    EntityNotFoundDelegate entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
    if ( entityNotFoundDelegate == null ) {
      entityNotFoundDelegate = new EntityNotFoundDelegate() {
        public void handleEntityNotFound(String entityName, Serializable id) {
          throw new ObjectNotFoundException( id, entityName );
        }
      };
    }
    this.entityNotFoundDelegate = entityNotFoundDelegate;
View Full Code Here

Examples of org.hibernate.ObjectNotFoundException

    // EntityNotFoundDelegate
    EntityNotFoundDelegate entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
    if ( entityNotFoundDelegate == null ) {
      entityNotFoundDelegate = new EntityNotFoundDelegate() {
        public void handleEntityNotFound(String entityName, Serializable id) {
          throw new ObjectNotFoundException( id, entityName );
        }
      };
    }
    this.entityNotFoundDelegate = entityNotFoundDelegate;
  }
View Full Code Here

Examples of org.jamesii.core.data.runtime.ObjectNotFoundException

      Object sampleObj =
          ((IWriteReadDataStorage) storage).readLatestData(dataid, attribute);
      // System.out.println(sampleObj.getClass().getName());

      if (sampleObj == null) {
        throw new ObjectNotFoundException("The data object (" + dataid
            + ") / the attribute (" + attribute
            + ") to be used in the variance criterion is not in the database!");
      }

      long[] stateVector = null;
View Full Code Here

Examples of org.jresearch.flexess.core.model.ObjectNotFoundException

    return null;
  }

  public PObject getPObjectById(String modelId, String id) throws ObjectNotFoundException {
    if (!modelDao.hasModel(modelId)) {
      throw new ObjectNotFoundException("Model not found", modelId); //$NON-NLS-1$
    }
    return (PObject) getObjectById(modelDao.getSecurityModel(modelId), UamPackage.eINSTANCE.getPObject(), id);
  }
View Full Code Here

Examples of org.modeshape.webdav.exceptions.ObjectNotFoundException

        } else if (t instanceof LoginException) {
            return new org.modeshape.webdav.exceptions.AccessDeniedException(t.getMessage(), t);
        } else if (t instanceof ItemExistsException) {
            return new ObjectAlreadyExistsException(t.getMessage(), t);
        } else if (t instanceof PathNotFoundException) {
            return new ObjectNotFoundException(t.getMessage(), t);
        } else if (t instanceof ItemNotFoundException) {
            return new ObjectNotFoundException(t.getMessage(), t);
        } else if (t instanceof NoSuchWorkspaceException) {
            return new ObjectNotFoundException(t.getMessage(), t);
        } else {
            return new WebdavException(t.getMessage(), t);
        }
    }
View Full Code Here

Examples of org.mokai.ObjectNotFoundException

      // check if the handler supports the message
      if (handler.supportsDirection(direction)) {
        boolean found = handler.updateMessage(conn, message);
        if (!found) {
          throw new ObjectNotFoundException("message with id " + message.getId() + " not found");
        }
      } else {
        throw new RejectedException("this message store doesn't supports direction '" + direction + "'");
      }
    } catch (SQLException e) {
View Full Code Here

Examples of org.mule.umo.manager.ObjectNotFoundException

  public Object getComponent(Object key)
    throws ObjectNotFoundException
  {
    if (key == null)
      throw new ObjectNotFoundException("Component key is null");

    if (log.isLoggable(Level.FINE)) {
      log.fine(L.l("ResinContainerContext.getComponent({0} with type {1})",
                   key, key.getClass().getName()));
    }

    if (key instanceof ContainerKeyPair) {
      ContainerKeyPair pair = (ContainerKeyPair) key;

      // XXX pair.getContainerName() appears to be null most of the time
      // ignore it?

      key = pair.getKey();
    }

    if (key instanceof Class) {
      Class clazz = (Class) key;
      ComponentFactory component = null;

      if (log.isLoggable(Level.FINE))
        log.fine("Creating new instance from " + clazz);

      synchronized (_componentMap) {
        component = _componentMap.get(clazz);

        if (component == null) {
          component = _webBeans.resolveByType(clazz);

          if (component == null)
            component = _webBeans.createTransient(clazz);

          _componentMap.put(clazz, component);
        }
      }

      return component.get();
    }
    else if (key instanceof String) {
      ComponentFactory component = _webBeans.findByName((String) key);

      if (component == null) {
        throw new ObjectNotFoundException(L.l("Cannot find component with name '{0}'", key));
      }

      return component.get();
    }
    else {
      throw new ObjectNotFoundException(L.l("Component keys of type {0} are not understood", key.getClass().getName()));
    }
  }
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.