Package org.hibernate

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


            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

    // 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

            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

    sf.openSession();
    sfControl.setReturnValue(session, 1);
    session.getSessionFactory();
    sessionControl.setReturnValue(sf, 1);
    session.load(TestBean.class, "id");
    ObjectNotFoundException onfex = new ObjectNotFoundException("id", TestBean.class.getName());
    sessionControl.setThrowable(onfex);
    session.close();
    sessionControl.setReturnValue(null, 1);
    sfControl.replay();
    sessionControl.replay();
View Full Code Here

      assertEquals(TestBean.class.getName(), ex.getPersistentClassName());
      assertEquals("id", ex.getIdentifier());
      assertEquals(uoex, ex.getCause());
    }

    final ObjectNotFoundException onfe = new ObjectNotFoundException("id", TestBean.class.getName());
    try {
      createTemplate().execute(new HibernateCallback() {
        public Object doInHibernate(org.hibernate.Session session) throws HibernateException {
          throw onfe;
        }
View Full Code Here

    // 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

    // 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

            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

    // 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

TOP

Related Classes of org.hibernate.ObjectNotFoundException

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.