示例#1
0
  private void updateDataForCopy(IOseeBranch destination, OrcsData data) throws OseeCoreException {
    VersionData version = data.getVersion();
    version.setBranchId(destination.getUuid());
    version.setTransactionId(RelationalConstants.TRANSACTION_SENTINEL);
    version.setStripeId(RelationalConstants.TRANSACTION_SENTINEL);
    version.setHistorical(false);
    version.setGammaId(RelationalConstants.GAMMA_SENTINEL);

    data.setModType(ModificationType.NEW);
  }
示例#2
0
 private void updateDataForIntroduce(IOseeBranch destination, OrcsData data)
     throws OseeCoreException {
   VersionData version = data.getVersion();
   version.setBranchId(destination.getUuid());
   version.setHistorical(false);
   version.setTransactionId(RelationalConstants.TRANSACTION_SENTINEL);
   // do not clear gammaId for introduce case so we reuse the same version
 }
 private void updateGamma(OrcsData data) throws OseeCoreException {
   VersionData version = data.getVersion();
   long gammaId = version.getGammaId();
   if (RelationalConstants.GAMMA_SENTINEL == gammaId || isGammaCreationAllowed(data)) {
     long newGamma = idFactory.getNextGammaId();
     version.setGammaId(newGamma);
   }
 }
  private void addTxs(SqlOrderEnum key, OrcsData orcsData) {
    VersionData data = orcsData.getVersion();
    ModificationType modType = orcsData.getModType();

    addRow(
        SqlOrderEnum.TXS,
        data.getTransactionId(),
        data.getGammaId(),
        modType.getValue(),
        TxChange.getCurrent(modType).getValue(),
        data.getBranchId());

    if (key.hasTxNotCurrentQuery()) {
      ArtifactJoinQuery join = txNotCurrentsJoin.get(key);
      if (join == null) {
        join = createJoin();
        txNotCurrentsJoin.put(key, join);
      }
      join.add(orcsData.getLocalId(), data.getBranchId(), RelationalConstants.TRANSACTION_SENTINEL);
    }
  }
 protected boolean isGammaCreationAllowed(OrcsData data) {
   return !data.getModType().isExistingVersionUsed();
 }
 private void updateTxValues(OrcsData orcsData) {
   orcsData.setModType(computeModType(orcsData.getModType()));
   orcsData.getVersion().setTransactionId(txId);
 }
 private boolean isNewAndDeleted(OrcsData data) {
   return (!data.getVersion().isInStorage() && data.getModType().isDeleted());
 }