Tabnine Logo
DbHistoryEventHandler.getDbEntityManager
Code IndexAdd Tabnine to your IDE (free)

How to use
getDbEntityManager
method
in
org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler

Best Java code snippets using org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler.getDbEntityManager (Showing top 6 results out of 315)

origin: camunda/camunda-bpm-platform

 /** general history event insert behavior */
 protected void insertOrUpdate(HistoryEvent historyEvent) {

  final DbEntityManager dbEntityManager = getDbEntityManager();

  if(isInitialEvent(historyEvent)) {
   dbEntityManager.insert(historyEvent);
  } else {
   if(dbEntityManager.getCachedEntity(historyEvent.getClass(), historyEvent.getId()) == null) {
    if (historyEvent instanceof HistoricScopeInstanceEvent) {
     // if this is a scope, get start time from existing event in DB
     HistoricScopeInstanceEvent existingEvent = (HistoricScopeInstanceEvent) dbEntityManager.selectById(historyEvent.getClass(), historyEvent.getId());
     if(existingEvent != null) {
      HistoricScopeInstanceEvent historicScopeInstanceEvent = (HistoricScopeInstanceEvent) historyEvent;
      historicScopeInstanceEvent.setStartTime(existingEvent.getStartTime());
     }
    }
    if(historyEvent.getId() == null) {
//          dbSqlSession.insert(historyEvent);
    } else {
     dbEntityManager.merge(historyEvent);
    }
   }
  }
 }

origin: camunda/camunda-bpm-platform

 /** general history event insert behavior */
 protected void insertOrUpdate(HistoryEvent historyEvent) {

  final DbEntityManager dbEntityManager = getDbEntityManager();

  if(isInitialEvent(historyEvent)) {
   dbEntityManager.insert(historyEvent);
  } else {
   if(dbEntityManager.getCachedEntity(historyEvent.getClass(), historyEvent.getId()) == null) {
    if (historyEvent instanceof HistoricScopeInstanceEvent) {
     // if this is a scope, get start time from existing event in DB
     HistoricScopeInstanceEvent existingEvent = (HistoricScopeInstanceEvent) dbEntityManager.selectById(historyEvent.getClass(), historyEvent.getId());
     if(existingEvent != null) {
      HistoricScopeInstanceEvent historicScopeInstanceEvent = (HistoricScopeInstanceEvent) historyEvent;
      historicScopeInstanceEvent.setStartTime(existingEvent.getStartTime());
     }
    }
    if(historyEvent.getId() == null) {
//          dbSqlSession.insert(historyEvent);
    } else {
     dbEntityManager.merge(historyEvent);
    }
   }
  }
 }

origin: camunda/camunda-bpm-platform

DbEntityManager dbEntityManager = getDbEntityManager();
origin: camunda/camunda-bpm-platform

DbEntityManager dbEntityManager = getDbEntityManager();
origin: org.camunda.bpm/camunda-engine

 /** general history event insert behavior */
 protected void insertOrUpdate(HistoryEvent historyEvent) {

  final DbEntityManager dbEntityManager = getDbEntityManager();

  if(isInitialEvent(historyEvent)) {
   dbEntityManager.insert(historyEvent);
  } else {
   if(dbEntityManager.getCachedEntity(historyEvent.getClass(), historyEvent.getId()) == null) {
    if (historyEvent instanceof HistoricScopeInstanceEvent) {
     // if this is a scope, get start time from existing event in DB
     HistoricScopeInstanceEvent existingEvent = (HistoricScopeInstanceEvent) dbEntityManager.selectById(historyEvent.getClass(), historyEvent.getId());
     if(existingEvent != null) {
      HistoricScopeInstanceEvent historicScopeInstanceEvent = (HistoricScopeInstanceEvent) historyEvent;
      historicScopeInstanceEvent.setStartTime(existingEvent.getStartTime());
     }
    }
    if(historyEvent.getId() == null) {
//          dbSqlSession.insert(historyEvent);
    } else {
     dbEntityManager.merge(historyEvent);
    }
   }
  }
 }

origin: org.camunda.bpm/camunda-engine

DbEntityManager dbEntityManager = getDbEntityManager();
org.camunda.bpm.engine.impl.history.handlerDbHistoryEventHandlergetDbEntityManager

Popular methods of DbHistoryEventHandler

  • <init>
  • handleEvent
  • isInitialEvent
  • insertHistoricDecisionEvaluationEvent
  • insertHistoricVariableUpdateEntity
    customized insert behavior for HistoricVariableUpdateEventEntity
  • insertOrUpdate
    general history event insert behavior
  • shouldWriteHistoricDetail

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now