Examples of selectById()


Examples of org.activiti.engine.impl.db.DbSqlSession.selectById()

    this.attachmentId = attachmentId;
  }

  public InputStream execute(CommandContext commandContext) {
    DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
    AttachmentEntity attachment = dbSqlSession.selectById(AttachmentEntity.class, attachmentId);
   
    String contentId = attachment.getContentId();
    if (contentId==null) {
      return null;
    }
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession.selectById()

    String contentId = attachment.getContentId();
    if (contentId==null) {
      return null;
    }
   
    ByteArrayEntity byteArray = dbSqlSession.selectById(ByteArrayEntity.class, contentId);
    byte[] bytes = byteArray.getBytes();
   
    return new ByteArrayInputStream(bytes);
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

    this.attachmentId = attachmentId;
  }

  public InputStream execute(CommandContext commandContext) {
    DbEntityManager dbEntityManger = commandContext.getDbEntityManager();
    AttachmentEntity attachment = dbEntityManger.selectById(AttachmentEntity.class, attachmentId);
   
    String contentId = attachment.getContentId();
    if (contentId==null) {
      return null;
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

    String contentId = attachment.getContentId();
    if (contentId==null) {
      return null;
    }
   
    ByteArrayEntity byteArray = dbEntityManger.selectById(ByteArrayEntity.class, contentId);
    byte[] bytes = byteArray.getBytes();
   
    return new ByteArrayInputStream(bytes);
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

  public static void createOrUpdateHistoryLevel(final ProcessEngineConfigurationImpl processEngineConfiguration) {
    processEngineConfiguration.getCommandExecutorTxRequired()
      .execute(new Command<Object>() {
       public Object execute(CommandContext commandContext) {
         DbEntityManager dbEntityManager = commandContext.getDbEntityManager();
         PropertyEntity historyLevelProperty = dbEntityManager.selectById(PropertyEntity.class, "historyLevel");
         if (historyLevelProperty != null) {
           if (processEngineConfiguration.getHistoryLevel().getId() != new Integer(historyLevelProperty.getValue())) {
             historyLevelProperty.setValue(Integer.toString(processEngineConfiguration.getHistoryLevel().getId()));
             dbEntityManager.merge(historyLevelProperty);
           }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

  public static void deleteHistoryLevel(ProcessEngineConfigurationImpl processEngineConfiguration) {
    processEngineConfiguration.getCommandExecutorTxRequired()
      .execute(new Command<Object>() {
       public Object execute(CommandContext commandContext) {
         DbEntityManager dbEntityManager = commandContext.getDbEntityManager();
         PropertyEntity historyLevelProperty = dbEntityManager.selectById(PropertyEntity.class, "historyLevel");
         if (historyLevelProperty != null) {
           dbEntityManager.delete(historyLevelProperty);
         }
         return null;
       }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

      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());
          }
        }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

    if(HistoryEventTypes.VARIABLE_INSTANCE_CREATE.getEventName().equals(historyEvent.getEventType())) {
      HistoricVariableInstanceEntity persistentObject = new HistoricVariableInstanceEntity(historyEvent);
      dbEntityManager.insert(persistentObject);

    } else if(HistoryEventTypes.VARIABLE_INSTANCE_UPDATE.getEventName().equals(historyEvent.getEventType())) {
      HistoricVariableInstanceEntity historicVariableInstanceEntity = dbEntityManager.selectById(HistoricVariableInstanceEntity.class, historyEvent.getVariableInstanceId());
      if(historicVariableInstanceEntity != null) {
        historicVariableInstanceEntity.updateFromEvent(historyEvent);

      } else {
        // #CAM-1344 / #SUPPORT-688
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

        HistoricVariableInstanceEntity persistentObject = new HistoricVariableInstanceEntity(historyEvent);
        dbEntityManager.insert(persistentObject);
      }

    } else if(HistoryEventTypes.VARIABLE_INSTANCE_DELETE.getEventName().equals(historyEvent.getEventType())) {
      HistoricVariableInstanceEntity historicVariableInstanceEntity = dbEntityManager.selectById(HistoricVariableInstanceEntity.class, historyEvent.getVariableInstanceId());
      if(historicVariableInstanceEntity != null) {
        historicVariableInstanceEntity.delete();
      }
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById()

      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());
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.