/** * Convert the specified exception into a {@link StoreException}. */ public static OpenJPAException getStore(String msg, SQLException se, Object failed, DBDictionary dict, int level) { if (msg == null) msg = se.getClass().getName(); SQLException[] ses = getSQLExceptions(se); OpenJPAException storeEx = (dict == null) ? new StoreException(msg).setFailedObject(failed) .setNestedThrowables(ses) : dict.newStoreException(msg, ses, failed); if (level != -1 && storeEx.getSubtype() == StoreException.LOCK) { LockException lockEx = (LockException) storeEx; lockEx.setLockLevel(level); } return storeEx; }
/** * Convert the specified exception into a {@link StoreException}. */ public static OpenJPAException getStore(String msg, SQLException se, Object failed, DBDictionary dict, int level) { if (msg == null) msg = se.getClass().getName(); SQLException[] ses = getSQLExceptions(se); OpenJPAException storeEx = (dict == null) ? new StoreException(msg).setFailedObject(failed) .setNestedThrowables(ses) : dict.newStoreException(msg, ses, failed); if (level != -1 && storeEx.getSubtype() == StoreException.LOCK) { LockException lockEx = (LockException) storeEx; lockEx.setLockLevel(level); } return storeEx; }
/** * Convert the specified exception into a {@link StoreException}. */ public static OpenJPAException getStore(String msg, SQLException se, Object failed, DBDictionary dict, int level) { if (msg == null) msg = se.getClass().getName(); SQLException[] ses = getSQLExceptions(se); OpenJPAException storeEx = (dict == null) ? new StoreException(msg).setFailedObject(failed) .setNestedThrowables(ses) : dict.newStoreException(msg, ses, failed); if (level != -1 && storeEx.getSubtype() == StoreException.LOCK) { LockException lockEx = (LockException) storeEx; lockEx.setLockLevel(level); } return storeEx; }
/** * Convert the specified exception into a {@link StoreException}. */ public static OpenJPAException getStore(String msg, SQLException se, Object failed, DBDictionary dict, int level) { if (msg == null) msg = se.getClass().getName(); SQLException[] ses = getSQLExceptions(se); OpenJPAException storeEx = (dict == null) ? new StoreException(msg).setFailedObject(failed) .setNestedThrowables(ses) : dict.newStoreException(msg, ses, failed); if (level != -1 && storeEx.getSubtype() == StoreException.LOCK) { LockException lockEx = (LockException) storeEx; lockEx.setLockLevel(level); } return storeEx; }
&& ke.getSubtype() == UserException.CALLBACK && ke.getNestedThrowables().length == 1) { Throwable e = ke.getCause();
&& ke.getSubtype() == UserException.CALLBACK && ke.getNestedThrowables().length == 1) { Throwable e = ke.getCause();
&& ke.getSubtype() == UserException.CALLBACK && ke.getNestedThrowables().length == 1) { Throwable e = ke.getCause();
&& ke.getSubtype() == UserException.CALLBACK && ke.getNestedThrowables().length == 1) { Throwable e = ke.getCause();
&& ke.getSubtype() == UserException.CALLBACK && ke.getNestedThrowables().length == 1) { Throwable e = ke.getCause();
int subtype = ke.getSubtype(); String msg = ke.getMessage(); Throwable[] nested = getNestedThrowables(ke);
int subtype = ke.getSubtype(); String msg = ke.getMessage(); Throwable[] nested = getNestedThrowables(ke);
/** * Translate the given store exception. */ private static Throwable translateStoreException(OpenJPAException ke) { Exception e; switch (ke.getSubtype()) { case StoreException.OBJECT_NOT_FOUND: e = new org.apache.openjpa.persistence.EntityNotFoundException (ke.getMessage(), getNestedThrowables(ke), getFailedObject(ke), ke.isFatal()); break; case StoreException.OPTIMISTIC: case StoreException.LOCK: e = new org.apache.openjpa.persistence.OptimisticLockException (ke.getMessage(), getNestedThrowables(ke), getFailedObject(ke), ke.isFatal()); break; case StoreException.OBJECT_EXISTS: e = new org.apache.openjpa.persistence.EntityExistsException (ke.getMessage(), getNestedThrowables(ke), getFailedObject(ke), ke.isFatal()); break; default: e = new org.apache.openjpa.persistence.PersistenceException (ke.getMessage(), getNestedThrowables(ke), getFailedObject(ke), ke.isFatal()); } e.setStackTrace(ke.getStackTrace()); return e; }
int subtype = ke.getSubtype(); String msg = ke.getMessage(); Throwable[] nested = getNestedThrowables(ke);
int subtype = ke.getSubtype(); String msg = ke.getMessage(); Throwable[] nested = getNestedThrowables(ke);
switch (ke.getSubtype()) { case UserException.NO_TRANSACTION: e = new
switch (ke.getSubtype()) { case UserException.NO_TRANSACTION: e = new
switch (ke.getSubtype()) { case UserException.NO_TRANSACTION: e = new
switch (ke.getSubtype()) { case UserException.NO_TRANSACTION: e = new
switch (ke.getSubtype()) { case UserException.NO_TRANSACTION: e = new