use of javax.jdo.JDOQueryInterruptedException in project datanucleus-api-jdo by datanucleus.
the class JDOQuery method deletePersistentInternal.
protected long deletePersistentInternal() {
try {
if (parameterValues != null) {
return query.deletePersistentAll(parameterValues);
} else if (parameterValueByName != null) {
return query.deletePersistentAll(parameterValueByName);
}
return query.deletePersistentAll();
} catch (NoQueryResultsException nqre) {
return 0;
} catch (QueryTimeoutException qte) {
throw new JDODataStoreException("Query has timed out : " + qte.getMessage());
} catch (QueryInterruptedException qie) {
throw new JDOQueryInterruptedException("Query has been cancelled : " + qie.getMessage());
} catch (NucleusException jpe) {
throw NucleusJDOHelper.getJDOExceptionForNucleusException(jpe);
} finally {
// Parameter values are not retained beyond subsequent execute/deletePersistentAll
this.parameterValueByName = null;
this.parameterValues = null;
}
}
use of javax.jdo.JDOQueryInterruptedException in project datanucleus-api-jdo by datanucleus.
the class JDOQuery method executeInternal.
protected Object executeInternal() {
try {
if (parameterValues != null) {
return query.executeWithArray(parameterValues);
} else if (parameterValueByName != null) {
return query.executeWithMap(parameterValueByName);
}
return query.execute();
} catch (NoQueryResultsException nqre) {
return null;
} catch (QueryTimeoutException qte) {
throw new JDODataStoreException("Query has timed out : " + qte.getMessage());
} catch (QueryInterruptedException qie) {
throw new JDOQueryInterruptedException("Query has been cancelled : " + qie.getMessage());
} catch (NucleusException jpe) {
// Convert any exceptions into what JDO expects
throw NucleusJDOHelper.getJDOExceptionForNucleusException(jpe);
} finally {
// Parameter values are not retained beyond subsequent execute/deletePersistentAll
this.parameterValueByName = null;
this.parameterValues = null;
}
}
Aggregations