diff options
author | jphillips | 2008-07-20 02:40:04 +0000 |
---|---|---|
committer | jphillips | 2008-07-20 02:40:04 +0000 |
commit | 3f07a006b951b2dd74af52ce096a873983c64d30 (patch) | |
tree | 2b20053c8f4abf344c7561a131b74e3908d39bf9 | |
parent | fa11535494898853beda4535f2e0cfcf4e920eeb (diff) | |
download | org.eclipse.osee-3f07a006b951b2dd74af52ce096a873983c64d30.tar.gz org.eclipse.osee-3f07a006b951b2dd74af52ce096a873983c64d30.tar.xz org.eclipse.osee-3f07a006b951b2dd74af52ce096a873983c64d30.zip |
-rw-r--r-- | org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/BranchImporterSaxHandler.java | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/BranchImporterSaxHandler.java b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/BranchImporterSaxHandler.java index 60859f3ba94..05983f21833 100644 --- a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/BranchImporterSaxHandler.java +++ b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/BranchImporterSaxHandler.java @@ -244,30 +244,34 @@ public class BranchImporterSaxHandler extends BranchSaxHandler { return;
}
- monitor.subTask("Transaction " + transactionOnBranchCount + " Artifact " + ++artifactOnTransactionCount);
- boolean modified = true;
- currentArtifactId = artifactGuidCache.getId(guid);
- // New artifact
- if (currentArtifactId == null) {
- modified = false;
- if (deleted) {
- logger.log(Level.WARNING, "Initial creation of artifact " + hrid + " was a delete version");
- }
- currentArtifactId = Query.getNextSeqVal(ART_ID_SEQ);
+ try {
+ monitor.subTask("Transaction " + transactionOnBranchCount + " Artifact " + ++artifactOnTransactionCount);
+ boolean modified = true;
+ currentArtifactId = artifactGuidCache.getId(guid);
+ // New artifact
+ if (currentArtifactId == null) {
+ modified = false;
+ if (deleted) {
+ logger.log(Level.WARNING, "Initial creation of artifact " + hrid + " was a delete version");
+ }
+ currentArtifactId = Query.getNextSeqVal(ART_ID_SEQ);
- ArtifactType artifactType = ArtifactTypeManager.getType(artifactTypeName);
- int artTypeId = artifactType.getArtTypeId();
- artifactGuidCache.map(currentArtifactId, guid);
- ConnectionHandler.runPreparedUpdate(INSERT_NEW_ARTIFACT, SQL3DataType.INTEGER, currentArtifactId,
- SQL3DataType.VARCHAR, hrid, SQL3DataType.INTEGER, artTypeId, SQL3DataType.VARCHAR, guid);
- }
+ ArtifactType artifactType = ArtifactTypeManager.getType(artifactTypeName);
+ int artTypeId = artifactType.getArtTypeId();
+ artifactGuidCache.map(currentArtifactId, guid);
+ ConnectionHandler.runPreparedUpdate(INSERT_NEW_ARTIFACT, SQL3DataType.INTEGER, currentArtifactId,
+ SQL3DataType.VARCHAR, hrid, SQL3DataType.INTEGER, artTypeId, SQL3DataType.VARCHAR, guid);
+ }
- int gammaId = Query.getNextSeqVal(GAMMA_ID_SEQ);
- ModificationType modificationType = getModType(modified, deleted);
+ int gammaId = Query.getNextSeqVal(GAMMA_ID_SEQ);
+ ModificationType modificationType = getModType(modified, deleted);
- ConnectionHandler.runPreparedUpdate(INSERT_ARTIFACT_VERSION, SQL3DataType.INTEGER, currentArtifactId,
- SQL3DataType.VARCHAR, gammaId, SQL3DataType.INTEGER, modificationType.getValue());
- insertTxAddress(gammaId, modificationType.getValue(), TxChange.CURRENT.getValue());
+ ConnectionHandler.runPreparedUpdate(INSERT_ARTIFACT_VERSION, SQL3DataType.INTEGER, currentArtifactId,
+ SQL3DataType.VARCHAR, gammaId, SQL3DataType.INTEGER, modificationType.getValue());
+ insertTxAddress(gammaId, modificationType.getValue(), TxChange.CURRENT.getValue());
+ } catch (IllegalArgumentException ex) {
+ logger.log(Level.SEVERE, ex.getLocalizedMessage());
+ }
}
@Override
|