Package javax.jdo

Examples of javax.jdo.JDOObjectNotFoundException


        else if (jpe instanceof JPOXObjectNotFoundException)
        {           
            //sadly JDOObjectNotFoundException dont allow nested exceptions and failed objects together
            if (jpe.getFailedObject() != null)
            {
                return new JDOObjectNotFoundException(jpe.getMessage(), jpe.getFailedObject());
            }
            else if (jpe.getNestedExceptions() != null)
            {
                return new JDOObjectNotFoundException(jpe.getMessage(), jpe.getNestedExceptions());
            }
            else
            {
                return new JDOFatalDataStoreException(jpe.getMessage(), jpe);
            }
View Full Code Here


            selector.require(dfg);
            Collection rows = selectRows(selector);
            if (!rows.isEmpty()) {
                row = (Row) rows.iterator().next();
            } else {
                throw new JDOObjectNotFoundException();
            }
        }
        return row;
    }
View Full Code Here

  public void testTemplateExceptions() {
    try {
      createTemplate().execute(new JdoCallback() {
        public Object doInJdo(PersistenceManager pm) {
          throw new JDOObjectNotFoundException();
        }
      });
      fail("Should have thrown JdoObjectRetrievalFailureException");
    }
    catch (JdoObjectRetrievalFailureException ex) {
View Full Code Here

        else if (jpe instanceof NucleusObjectNotFoundException)
        {           
            //sadly JDOObjectNotFoundException dont allow nested exceptions and failed objects together
            if (jpe.getFailedObject() != null)
            {
                return new JDOObjectNotFoundException(jpe.getMessage(), jpe.getFailedObject());
            }
            else if (jpe.getNestedExceptions() != null)
            {
                return new JDOObjectNotFoundException(jpe.getMessage(), jpe.getNestedExceptions());
            }
            else
            {
                return new JDOObjectNotFoundException(jpe.getMessage(), new Throwable[]{jpe});
            }
        }
        else if (jpe instanceof NucleusUserException)
        {
            if (jpe.isFatal())
View Full Code Here

TOP

Related Classes of javax.jdo.JDOObjectNotFoundException

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.