Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2018-03-02 21:59:36 +0000
committerRyan D. Brooks2020-12-15 21:45:12 +0000
commitb837ada10a7e251af52e6bee3051ef185f3778b5 (patch)
treec14dd2822eca39d014b5b13f73bc01347ca75939
parentc3024ce241d7f336c81946336081e1518e380b69 (diff)
downloadorg.eclipse.osee-b837ada10a7e251af52e6bee3051ef185f3778b5.tar.gz
org.eclipse.osee-b837ada10a7e251af52e6bee3051ef185f3778b5.tar.xz
org.eclipse.osee-b837ada10a7e251af52e6bee3051ef185f3778b5.zip
refactor: Use ArtifactEndpoint id loading in ArtifactQuery more
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java15
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);
}
/**

Back to the top