Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-09-24 17:01:01 -0400
committerMegumi Telles2016-09-30 10:45:45 -0400
commit76c03d2c84a189b900f40cd4844393232b3f6f64 (patch)
tree9f327b1016e4eba6537ab4b057b97efcda30aa63
parent30d4a032f99aef002e9917a20a5b882b732e76f9 (diff)
downloadorg.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.java10
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 713b884df2..1a24a6a28f 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);

Back to the top