Package org.hibernate

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


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

    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

    }
    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

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

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

Related Classes of org.hibernate.UnresolvableObjectException

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.