Examples of UnresolvableObjectException


Examples of net.sf.hibernate.UnresolvableObjectException

                return ThreadSession.get().load(searchedDomainClasses[i], id);
            } catch (ObjectNotFoundException e) {
                // ignored
            }
        }
        throw new UnresolvableObjectException(id, Object.class);
    }
View Full Code Here

Examples of org.hibernate.UnresolvableObjectException

            source.getFactory()
        )
        );
      }
      if ( !e.isExistsInDatabase() ) {
        throw new UnresolvableObjectException(
            e.getId(),
            "this instance does not yet exist as a row in the database"
        );
      }
View Full Code Here

Examples of org.hibernate.UnresolvableObjectException

      // expected
      assertEquals(qex, ex.getCause());
      assertEquals("query", ex.getQueryString());
    }

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

Examples of org.hibernate.UnresolvableObjectException

    else {
      if ( LOG.isTraceEnabled() ) {
        LOG.tracev( "Refreshing ", MessageHelper.infoString( e.getPersister(), e.getId(), source.getFactory() ) );
      }
      if ( !e.isExistsInDatabase() ) {
        throw new UnresolvableObjectException(e.getId(), "this instance does not yet exist as a row in the database" );
      }

      persister = e.getPersister();
      id = e.getId();
    }
View Full Code Here

Examples of org.hibernate.UnresolvableObjectException

    }
    if (ex instanceof ObjectDeletedException) {
      return new InvalidDataAccessApiUsageException(ex.getMessage(), ex);
    }
    if (ex instanceof UnresolvableObjectException) {
      UnresolvableObjectException hibEx = (UnresolvableObjectException) ex;
      return new ObjectRetrievalFailureException(hibEx.getEntityName(), hibEx.getIdentifier(), ex.getMessage(), ex);
    }
    if (ex instanceof WrongClassException) {
      WrongClassException hibEx = (WrongClassException) ex;
      return new ObjectRetrievalFailureException(hibEx.getEntityName(), hibEx.getIdentifier(), ex.getMessage(), ex);
    }
    if (ex instanceof StaleObjectStateException) {
      StaleObjectStateException hibEx = (StaleObjectStateException) ex;
      return new ObjectOptimisticLockingFailureException(hibEx.getEntityName(), hibEx.getIdentifier(), ex);
    }
    if (ex instanceof StaleStateException) {
      return new ObjectOptimisticLockingFailureException(ex.getMessage(), ex);
    }
    if (optimisticLockExceptionClass.isInstance(ex)) {
View Full Code Here

Examples of org.hibernate.UnresolvableObjectException

      // expected
      assertEquals(qex, ex.getCause());
      assertEquals("query", ex.getQueryString());
    }

    final UnresolvableObjectException uoex = new UnresolvableObjectException("id", TestBean.class.getName());
    try {
      hibernateTemplate.execute(new HibernateCallback<Object>() {
        @Override
        public Object doInHibernate(Session session)  {
          throw uoex;
View Full Code Here

Examples of org.hibernate.UnresolvableObjectException

      // expected
      assertEquals(qex, ex.getCause());
      assertEquals("query", ex.getQueryString());
    }

    final UnresolvableObjectException uoex = new UnresolvableObjectException("id", TestBean.class.getName());
    try {
      hibernateTemplate.execute(new HibernateCallback<Object>() {
        @Override
        public Object doInHibernate(org.hibernate.Session session) throws HibernateException {
          throw uoex;
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.