diff options
author | donald.g.dunne | 2016-09-24 21:01:01 +0000 |
---|---|---|
committer | Megumi Telles | 2016-09-30 14:45:45 +0000 |
commit | 76c03d2c84a189b900f40cd4844393232b3f6f64 (patch) | |
tree | 9f327b1016e4eba6537ab4b057b97efcda30aa63 | |
parent | 30d4a032f99aef002e9917a20a5b882b732e76f9 (diff) | |
download | org.eclipse.osee-76c03d2c84a189b900f40cd4844393232b3f6f64.tar.gz org.eclipse.osee-76c03d2c84a189b900f40cd4844393232b3f6f64.tar.xz org.eclipse.osee-76c03d2c84a189b900f40cd4844393232b3f6f64.zip |
refinement: Add getHisoricalOrNull to ArtifactQuery
-rw-r--r-- | plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java index 713b884df26..1a24a6a28fa 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java @@ -310,6 +310,16 @@ public class ArtifactQuery { return new ArtifactQueryBuilder(artifactId, transactionId, allowDeleted, ALL).getOrCheckArtifact(QueryType.GET); } + public static Artifact getHistoricalArtifactFromIdOrNull(int artifactId, TransactionToken transactionId, DeletionFlag allowDeleted) throws OseeCoreException { + try { + return new ArtifactQueryBuilder(artifactId, transactionId, allowDeleted, ALL).getOrCheckArtifact( + QueryType.GET); + } catch (ArtifactDoesNotExist ex) { + // do nothing + } + return null; + } + public static Artifact getHistoricalArtifactFromId(String guid, TransactionToken transactionId, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(Arrays.asList(guid), transactionId, allowDeleted, ALL).getOrCheckArtifact( QueryType.GET); |