Package org.camunda.bpm.engine.impl.persistence.entity

Examples of org.camunda.bpm.engine.impl.persistence.entity.ByteArrayEntity


    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


    String contentId = attachment.getContentId();
    if (contentId==null) {
      return null;
    }

    ByteArrayEntity byteArray = commandContext
        .getDbEntityManager()
        .selectById(ByteArrayEntity.class, contentId);

    byte[] bytes = byteArray.getBytes();

    return new ByteArrayInputStream(bytes);
  }
View Full Code Here

      .findUserInfoByUserIdAndKey(userId, "picture");

    if (pictureInfo != null) {
      String pictureByteArrayId = pictureInfo.getValue();
      if (pictureByteArrayId != null) {
        ByteArrayEntity byteArray = commandContext.getDbEntityManager()
          .selectById(ByteArrayEntity.class, pictureByteArrayId);
        return new Picture(byteArray.getBytes(), byteArray.getName());
      }
    }

    return null;
  }
View Full Code Here

    evt.setTextValue(variableInstance.getTextValue());
    evt.setTextValue2(variableInstance.getTextValue2());
    evt.setDoubleValue(variableInstance.getDoubleValue());
    evt.setLongValue(variableInstance.getLongValue());
    if (variableInstance.getByteArrayValueId() != null) {
      ByteArrayEntity byteArrayValue = variableInstance.getByteArrayValue();
      evt.setByteValue(byteArrayValue.getBytes());
    }
  }
View Full Code Here

    if(Context.getProcessEngineConfiguration().getHistoryLevel().equals(HistoryLevel.HISTORY_LEVEL_FULL)) {

      // insert byte array entity (if applicable)
      byte[] byteValue = historyEvent.getByteValue();
      if(byteValue != null) {
        ByteArrayEntity byteArrayEntity = new ByteArrayEntity(historyEvent.getVariableName(), byteValue);
        Context
        .getCommandContext()
        .getDbEntityManager()
        .insert(byteArrayEntity);
        historyEvent.setByteArrayId(byteArrayEntity.getId());

      }
      dbEntityManager.insert(historyEvent);
    }
View Full Code Here

    DbEntityManager dbEntityManger = commandContext.getDbEntityManager();
    dbEntityManger.insert(attachment);

    if (content != null) {
      byte[] bytes = IoUtil.readInputStream(content, attachmentName);
      ByteArrayEntity byteArray = new ByteArrayEntity(bytes);
      dbEntityManger.insert(byteArray);
      attachment.setContentId(byteArray.getId());
    }

    PropertyChange propertyChange = new PropertyChange("name", null, attachmentName);

    commandContext.getOperationLogManager()
View Full Code Here

    }
    return byteArray;
  }

  public static void setBytes(ValueFields valueFields, byte[] bytes) {
    ByteArrayEntity byteArray = valueFields.getByteArrayValue();

    if (byteArray==null) {
      valueFields.setByteArrayValue(bytes);
    }
    else {
      byteArray.setBytes(bytes);
    }
  }
View Full Code Here

      pictureInfo.setUserId(userId);
      pictureInfo.setKey("picture");
      commandContext.getDbEntityManager().insert(pictureInfo);
    }

    ByteArrayEntity byteArrayEntity = new ByteArrayEntity(picture.getMimeType(), picture.getBytes());

    commandContext.getDbEntityManager()
      .insert(byteArrayEntity);

    pictureInfo.setValue(byteArrayEntity.getId());

    return null;
  }
View Full Code Here

    if(historyLevel == ProcessEngineConfigurationImpl.HISTORYLEVEL_FULL) {

      // insert byte array entity (if applicable)
      byte[] byteValue = historyEvent.getByteValue();
      if(byteValue != null) {
        ByteArrayEntity byteArrayEntity = new ByteArrayEntity(historyEvent.getVariableName(), byteValue);
        Context
        .getCommandContext()
        .getDbEntityManager()
        .insert(byteArrayEntity);
        historyEvent.setByteArrayId(byteArrayEntity.getId());

      }
      dbEntityManager.insert(historyEvent);
    }
View Full Code Here

            + "matches the data format " + dataFormatId + " of variable " + valueFields.getName());
      }

      String variableValue = valueFields.getTextValue();
      if (variableValue == null) {
        ByteArrayEntity byteEntity = valueFields.getByteArrayValue();
        if (byteEntity == null) {
          return null;
        }

        variableValue = new String(valueFields.getByteArrayValue().getBytes());
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.persistence.entity.ByteArrayEntity

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.