Package org.activiti.engine.impl.db

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


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


  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

    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

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

  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

    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

      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

    // 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

    getDbSqlSession().insert((PersistentObject) group);
  }

  public void updateGroup(GroupEntity updatedGroup) {
    CommandContext commandContext = Context.getCommandContext();
    DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
    dbSqlSession.update(updatedGroup);
  }
View Full Code Here

      ((ProcessEngineImpl)processEngine)
        .getProcessEngineConfiguration()
        .getCommandExecutorTxRequired()
        .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

TOP

Related Classes of org.activiti.engine.impl.db.DbSqlSession$CachedObject

Copyright © 2018 www.massapicom. 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.