Package javax.persistence

Examples of javax.persistence.EntityNotFoundException


      QueryTimeoutException converted = new QueryTimeoutException(e.getMessage(), e);
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof ObjectNotFoundException ) {
      EntityNotFoundException converted = new EntityNotFoundException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
        else if ( e instanceof org.hibernate.NonUniqueObjectException ) {
            EntityExistsException converted = new EntityExistsException( e.getMessage() );
            handlePersistenceException( converted );
            return converted;
        }
    else if ( e instanceof org.hibernate.NonUniqueResultException ) {
      NonUniqueResultException converted = new NonUniqueResultException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof UnresolvableObjectException ) {
      EntityNotFoundException converted = new EntityNotFoundException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof QueryException ) {
      return new IllegalArgumentException( e );
View Full Code Here


 
  private ClassLoader providedClassLoader;

  private static class JpaEntityNotFoundDelegate implements EntityNotFoundDelegate, Serializable {
    public void handleEntityNotFound(String entityName, Serializable id) {
      throw new EntityNotFoundException( "Unable to find " + entityName  + " with id " + id );
    }
View Full Code Here

  private static Log log = LogFactory.getLog( Ejb3Configuration.class );
  private static EntityNotFoundDelegate ejb3EntityNotFoundDelegate = new Ejb3EntityNotFoundDelegate();

  private static class Ejb3EntityNotFoundDelegate implements EntityNotFoundDelegate, Serializable {
    public void handleEntityNotFound(String entityName, Serializable id) {
      throw new EntityNotFoundException("Unable to find " + entityName  + " with id " + id);
    }
View Full Code Here

      QueryTimeoutException converted = new QueryTimeoutException(e.getMessage(), e);
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof ObjectNotFoundException ) {
      EntityNotFoundException converted = new EntityNotFoundException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof org.hibernate.NonUniqueResultException ) {
      NonUniqueResultException converted = new NonUniqueResultException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof UnresolvableObjectException ) {
      EntityNotFoundException converted = new EntityNotFoundException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof QueryException ) {
      return new IllegalArgumentException( e );
View Full Code Here

  private static EntityNotFoundDelegate ejb3EntityNotFoundDelegate = new Ejb3EntityNotFoundDelegate();
  private static Configuration DEFAULT_CONFIGURATION = new Configuration();

  private static class Ejb3EntityNotFoundDelegate implements EntityNotFoundDelegate, Serializable {
    public void handleEntityNotFound(String entityName, Serializable id) {
      throw new EntityNotFoundException("Unable to find " + entityName  + " with id " + id);
    }
View Full Code Here

      QueryTimeoutException converted = new QueryTimeoutException(e.getMessage(), e);
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof ObjectNotFoundException ) {
      EntityNotFoundException converted = new EntityNotFoundException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
        else if ( e instanceof org.hibernate.NonUniqueObjectException ) {
            EntityExistsException converted = new EntityExistsException( e.getMessage() );
            handlePersistenceException( converted );
            return converted;
        }
    else if ( e instanceof org.hibernate.NonUniqueResultException ) {
      NonUniqueResultException converted = new NonUniqueResultException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof UnresolvableObjectException ) {
      EntityNotFoundException converted = new EntityNotFoundException( e.getMessage() );
      handlePersistenceException( converted );
      return converted;
    }
    else if ( e instanceof QueryException ) {
      return new IllegalArgumentException( e );
View Full Code Here

  private static EntityNotFoundDelegate ejb3EntityNotFoundDelegate = new Ejb3EntityNotFoundDelegate();
  private static Configuration DEFAULT_CONFIGURATION = new Configuration();

  private static class Ejb3EntityNotFoundDelegate implements EntityNotFoundDelegate, Serializable {
    public void handleEntityNotFound(String entityName, Serializable id) {
      throw new EntityNotFoundException("Unable to find " + entityName  + " with id " + id);
    }
View Full Code Here

    if ( e instanceof StaleStateException ) {
      PersistenceException pe = wrapStaleStateException( (StaleStateException) e );
      throwPersistenceException( pe );
    }
    else if ( e instanceof ObjectNotFoundException ) {
      throwPersistenceException( new EntityNotFoundException( e.getMessage() ) );
    }
    else if ( e instanceof org.hibernate.NonUniqueResultException ) {
      throwPersistenceException( new NonUniqueResultException( e.getMessage() ) );
    }
    else if ( e instanceof UnresolvableObjectException ) {
      throwPersistenceException( new EntityNotFoundException( e.getMessage() ) );
    }
    else if ( e instanceof QueryException ) {
      throw new IllegalArgumentException( e );
    }
    else if ( e instanceof TransientObjectException ) {
View Full Code Here

  private String persistenceUnitName;
  private String cfgXmlResource;

  private static class Ejb3EntityNotFoundDelegate implements EntityNotFoundDelegate, Serializable {
    public void handleEntityNotFound(String entityName, Serializable id) {
      throw new EntityNotFoundException("Unable to find " + entityName  + " with id " + id);
    }
View Full Code Here

  private String persistenceUnitName;
  private String cfgXmlResource;

  private static class Ejb3EntityNotFoundDelegate implements EntityNotFoundDelegate, Serializable {
    public void handleEntityNotFound(String entityName, Serializable id) {
      throw new EntityNotFoundException("Unable to find " + entityName  + " with id " + id);
    }
View Full Code Here

TOP

Related Classes of javax.persistence.EntityNotFoundException

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.