Examples of DbSqlSession


Examples of org.activiti.engine.impl.db.DbSqlSession

      ((ProcessEngineImpl)processEngine)
      .getProcessEngineConfiguration().getCommandExecutor()
        .execute(new Command<Object>() {
          public Object execute(CommandContext commandContext) {
            DbSqlSession dbSqlSession = commandContext.getSession(DbSqlSession.class);
            dbSqlSession.dbSchemaDrop();
            dbSqlSession.dbSchemaCreate();
            return null;
          }
        });
     
      throw new AssertionError(outputMessage.toString());
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

      log.info("dropping and recreating db");
     
      CommandExecutor commandExecutor = ((ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getCommandExecutorTxRequired();
      commandExecutor.execute(new Command<Object>() {
        public Object execute(CommandContext commandContext) {
          DbSqlSession session = commandContext.getSession(DbSqlSession.class);
          session.dbSchemaDrop();
          session.dbSchemaCreate();
          return null;
        }
      });

      if (exception!=null) {
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

    getDbSqlSession().insert((PersistentObject) user);
  }
 
  public void updateUser(UserEntity updatedUser) {
    CommandContext commandContext = Context.getCommandContext();
    DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
    dbSqlSession.update(updatedUser);
  }
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

  public String databaseSchemaUpgrade(final Connection connection, final String catalog, final String schema) {
    return commandExecutor.execute(new Command<String>(){
      public String execute(CommandContext commandContext) {
        DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) commandContext.getSessionFactories().get(DbSqlSession.class);
        DbSqlSession dbSqlSession = new DbSqlSession(dbSqlSessionFactory, connection, catalog, schema);
        commandContext.getSessions().put(DbSqlSession.class, dbSqlSession);
        return dbSqlSession.dbSchemaUpdate();
      }
    });
  }
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

    return task;
  }

  public void insert(ExecutionEntity execution) {
    CommandContext commandContext = Context.getCommandContext();
    DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
    dbSqlSession.insert(this);
   
    if(execution != null) {
      execution.addTask(this);
    }
   
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

    setCreateTime(this.getCreateTime());
    setDueDate(this.getDueDate());
    setParentTaskId(this.getParentTaskId());
   
    CommandContext commandContext = Context.getCommandContext();
    DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
    dbSqlSession.update(this);
  }
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

  public GetAttachmentContentCmd(String attachmentId) {
    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;
    }
   
    ByteArrayEntity byteArray = dbSqlSession.selectById(ByteArrayEntity.class, contentId);
    byte[] bytes = byteArray.getBytes();
   
    return new ByteArrayInputStream(bytes);
  }
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

    jobHandler.execute(this, jobHandlerConfiguration, execution, commandContext);
  }
 
  public void insert() {
    DbSqlSession dbSqlSession = Context
      .getCommandContext()
      .getDbSqlSession();
   
    dbSqlSession.insert(this);
   
    // add link to execution
    if(executionId != null) {
      ExecutionEntity execution = Context.getCommandContext()
        .getExecutionManager()
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

      execution.addJob(this);
    }
  }
 
  public void delete() {
    DbSqlSession dbSqlSession = Context
      .getCommandContext()
      .getDbSqlSession();

    dbSqlSession.delete(this);

    // Also delete the job's exception byte array
    if (exceptionByteArrayId != null) {
      Context.getCommandContext().getByteArrayManager().deleteByteArrayById(exceptionByteArrayId);
    }
View Full Code Here

Examples of org.activiti.engine.impl.db.DbSqlSession

    // details are not updatable so we always provide the same object as the state
    return HistoricDetailEntity.class;
  }
 
  public void delete() {
    DbSqlSession dbSqlSession = Context
      .getCommandContext()
      .getDbSqlSession();

    dbSqlSession.delete(this);
  }
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.