diff options
author | Ryan D. Brooks | 2018-03-02 21:59:36 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2020-12-15 21:45:12 +0000 |
commit | b837ada10a7e251af52e6bee3051ef185f3778b5 (patch) | |
tree | c14dd2822eca39d014b5b13f73bc01347ca75939 | |
parent | c3024ce241d7f336c81946336081e1518e380b69 (diff) | |
download | org.eclipse.osee-b837ada10a7e251af52e6bee3051ef185f3778b5.tar.gz org.eclipse.osee-b837ada10a7e251af52e6bee3051ef185f3778b5.tar.xz org.eclipse.osee-b837ada10a7e251af52e6bee3051ef185f3778b5.zip |
refactor: Use ArtifactEndpoint id loading in ArtifactQuery more
Change-Id: Ia90193a402330bf19321f15924b39ea6e8aad622
-rw-r--r-- | plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java | 15 |
1 files changed, 9 insertions, 6 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 13fc94a9d09..9a6dd7dce09 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 @@ -223,8 +223,8 @@ public class ArtifactQuery { } public static List<ArtifactId> getArtifactIdsFromTypeAndName(ArtifactTypeId artifactType, String artifactName, BranchId branch) { - return new ArtifactQueryBuilder(artifactType, branch, ALL, - new AttributeCriteria(CoreAttributeTypes.Name, artifactName)).selectArtifacts(2); + return getArtifactEndpoint(branch).getArtifactIdsByAttribute(CoreAttributeTypes.Name, artifactName, true, + artifactType); } /** @@ -262,8 +262,10 @@ public class ArtifactQuery { } private static Artifact getArtifactFromTypeAndAttribute(ArtifactTypeId artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch, QueryType queryType) { - return new ArtifactQueryBuilder(artifactType, branch, ALL, - new AttributeCriteria(attributeType, attributeValue)).getOrCheckArtifact(queryType); + List<Artifact> artifacts = getArtifactListFrom( + getArtifactEndpoint(branch).getArtifactIdsByAttribute(attributeType, attributeValue, true, artifactType), + branch); + return getOrCheckArtifact(queryType, artifacts); } public static List<Artifact> getArtifactListFromTypeAndName(ArtifactTypeId artifactType, String artifactName, BranchId branch) { @@ -271,8 +273,9 @@ public class ArtifactQuery { } public static List<Artifact> getArtifactListFromTypeAndAttribute(ArtifactTypeId artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch) { - return new ArtifactQueryBuilder(artifactType, branch, ALL, - new AttributeCriteria(attributeType, attributeValue)).getArtifacts(100, null); + return getArtifactListFrom( + getArtifactEndpoint(branch).getArtifactIdsByAttribute(attributeType, attributeValue, true, artifactType), + branch); } /** |