this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); IHasId<?> entity = srvEntity.createEntity(addParams); putEntityIntoRequest(pReq, entity);
this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); this.logger.info(SrvClearDatabase.class, "Start clear database."); for (int i = classesArr.size() - 1; i >= 0; i--) {
this.srvDatabase.setTransactionIsolation(ISrvDatabase .TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); @SuppressWarnings("unchecked") ISrvEntity<IHasId<?>> srvEntity = (ISrvEntity<IHasId<?>>)
this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); srvEntity.deleteEntity(addParams, entity); retrievePageUntransactinal(pReq);
this.srvDatabase.setTransactionIsolation(ISrvDatabase .TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); IHasId<?> entity = srvEntity .createEntityWithOwnerById(addParams, idEntityOwner);
this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); for (Class<?> entityClass : this.classes) { if (APersistableBase.class.isAssignableFrom(entityClass)) {
this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); srvEntity.saveEntity(addParams, entity, false); retrieveEntityAndPutIntoRequest(pReq, entity);
this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); srvEntity.saveEntity(addParams, entity, false);
this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); srvEntity.deleteEntity(addParams, entity); retrieveEntityAndPutIntoRequest(pReq);
this.srvDatabase.setTransactionIsolation(ISrvDatabase .TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); for (String upgradeSingle : upgradeSql.split("\n")) { if (upgradeSingle.trim().length() > 1
/** * <p>Print entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void print(final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Confirm delete entity from owned list.</p> * @param pReq - servlet request, * @throws Exception - an exception */ @Override public final void confirmDeleteFromOwnedList( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityFromOwnedListAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Confirm delete entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void confirmDelete( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Edit entity from owned list.</p> * @param pReq - servlet request, * @throws Exception - an exception */ @Override public final void editFromOwnedList( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityFromOwnedListAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Retrieve entity page.</p> * @param pReq - servlet request * @param pUser - pUser * @throws Exception - an exception */ @Override public final void retrievePage( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrievePageUntransactinal(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>View entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void view(final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Edit entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void edit(final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Handle request.</p> * @param pRequestData Request Data * @throws Exception - an exception */ @Override public final void handleRequest( final IRequestData pRequestData) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); Date date2 = new Date(Long.parseLong(pRequestData .getParameter("date2"))); BalanceSheet balanceSheet = getSrvBalanceSheet() .retrieveBalance(null, date2); pRequestData.setAttribute("balanceSheet", balanceSheet); pRequestData.setAttribute("accSettings", srvAccSettings .lazyGetAccSettings()); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Handle request.</p> * @param pRequestData Request Data * @throws Exception - an exception */ @Override public final void handleRequest( final IRequestData pRequestData) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); DatabaseInfo databaseInfo = getSrvOrm() .retrieveEntityWithConditions(DatabaseInfo.class, ""); pRequestData.setAttribute("databaseInfo", databaseInfo); pRequestData.setAttribute("appVersion", getSrvOrm().getMngSettings() .getAppSettings().get("appVersion")); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p> * Read entities from stream (by given reader) and insert them * into DB with no changes. DB must be emptied before coping. * </p> * @param pReader Reader * @param pAddParam additional params * @throws Exception - an exception **/ @Override public final void readAndStoreEntities(final Reader pReader, final Map<String, Object> pAddParam) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); while (this.utilXml.readUntilStart(pReader, "entity")) { Object entity = this.srvEntityReader.read(pReader, null); this.srvOrm.insertEntity(entity); } this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }