/** * Gets the backendController. * * @return the backendController. */ protected IBackendController getBackendController() { return BackendControllerHolder.getCurrentBackendController(); }
/** * {@inheritDoc} */ @Override public Map<String, Object> getDirtyProperties(IEntity entity) { return getDirtyProperties(entity, true); }
/** * Programmatically stops the application and performs all necessary cleanups. */ public void stop() { // Breaks SSO. Useless to perform before garbage collecting. // if (frontendController != null) { // frontendController.stop(); // } frontendController = null; BackendControllerHolder.setSessionBackendController(null); } }
/** * {@inheritDoc} */ @Override public final void beginUnitOfWork() { if (isUnitOfWorkSuspended()) { return; } if (isUnitOfWorkActive()) { throw new BackendException("Cannot begin a new unit of work. Another one is already active."); } doBeginUnitOfWork(); }
/** * {@inheritDoc} */ @Override public Map<Class<? extends IEntity>, Map<Serializable, IEntity>> getUnitOfWorkEntities() { if (!isUnitOfWorkActive()) { throw new BackendException("Cannot query a unit of work that has not begun."); } return unitOfWork.getRegisteredEntities(); }
/** * {@inheritDoc} */ @Override public IEntity getUnitOfWorkEntity(Class<? extends IEntity> entityContract, Serializable entityId) { if (!isUnitOfWorkActive()) { throw new BackendException("Cannot query a unit of work that has not begun."); } return unitOfWork.getRegisteredEntity(entityContract, entityId); }
@Override protected void doInTransactionWithoutResult(TransactionStatus status) { IEntity entityClone = cloneInUnitOfWork(entity); resetTransientEntity(entityClone); merge(entityClone, EMergeMode.MERGE_EAGER); } });
/** * {@inheritDoc} */ @Override public void afterCompletion(int status) { if (status == STATUS_COMMITTED) { commitUnitOfWork(); } else { rollbackUnitOfWork(); } }
@Override protected void doInTransactionWithoutResult(TransactionStatus status) { try { getController(context).performPendingOperations(); } catch (RuntimeException ex) { getController(context).clearPendingOperations(); throw ex; } } });
/** * {@inheritDoc} */ @Override public boolean isDirtyInDepth(IEntity entity) { return isDirtyInDepth(entity, false); }
/** * {@inheritDoc} */ @Override public boolean isAnyDirtyInDepth(Collection<?> elements) { return isAnyDirtyInDepth(elements, false); }
/** * {@inheritDoc} */ @Override public boolean isDirty(IEntity entity) { return isDirty(entity, false); }
/** * {@inheritDoc} */ @Override public void joinTransaction() { joinTransaction(false); }
/** * Gets the getBackendController(). * * @return the backendController. */ protected IBackendController getBackendController() { return BackendControllerHolder.getCurrentBackendController(); }
@Override public void run() { // To register the backend controller in the event dispatch thread BackendControllerHolder.setSessionBackendController(backendController); initLoginProcess(); } });
/** * Gets the backendController. * * @return the backendController. */ protected IBackendController getBackendController() { return BackendControllerHolder.getCurrentBackendController(); }
/** * Gets the getBackendController(). * * @return the backendController. */ protected IBackendController getBackendController() { return BackendControllerHolder.getCurrentBackendController(); }
/** * {@inheritDoc} */ @Override public IBackendController getBackendController() { return BackendControllerHolder.getCurrentBackendController(); }
/** * Gets the backend controller. * * @return the backend controller. */ protected MongoBackendController getBackendController() { return (MongoBackendController) BackendControllerHolder.getCurrentBackendController(); }
protected IBackendController getBackendController() { return BackendControllerHolder.getCurrentBackendController(); }