Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2017-06-12 19:31:47 +0000
committermegumi.telles2017-06-27 14:03:03 +0000
commit4ed7cfc11b890de86d9c2bb1adf5ca46af9ed9a4 (patch)
treea31c9a6f13ad83023e8ececbc7a84e0aeebabbfd /plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee
parent01d4adb6fbe41e5d05f4beac9edcf7a003383bc8 (diff)
downloadorg.eclipse.osee-4ed7cfc11b890de86d9c2bb1adf5ca46af9ed9a4.tar.gz
org.eclipse.osee-4ed7cfc11b890de86d9c2bb1adf5ca46af9ed9a4.tar.xz
org.eclipse.osee-4ed7cfc11b890de86d9c2bb1adf5ca46af9ed9a4.zip
feature: Remove unapplicable artifacts for publish
Signed-off-by: Morgan E. Cook <morgan.e.cook@boeing.com> Change-Id: I89839231d922ea2e8d509d18bdd57e36c5d0ca3a
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
index 93eda8d066e..14e8a1ef8b0 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
@@ -303,7 +303,31 @@ public final class ArtifactLoader {
/**
* Determines the artIds and branchUuids of artifacts to load based on sql and queryParameters
*/
- private static List<Pair<ArtifactId, BranchId>> selectArtifacts(String sql, Object[] queryParameters, int artifactCountEstimate) throws OseeCoreException {
+ public static List<ArtifactId> selectArtifactIds(String sql, Object[] queryParameters, int artifactCountEstimate) throws OseeCoreException {
+ JdbcStatement chStmt = ConnectionHandler.getStatement();
+ long time = System.currentTimeMillis();
+
+ List<ArtifactId> toLoad = new ArrayList<>();
+
+ try {
+ chStmt.runPreparedQuery(artifactCountEstimate, sql, queryParameters);
+ while (chStmt.next()) {
+ int artId = chStmt.getInt("art_id");
+ toLoad.add(ArtifactId.valueOf(artId));
+ }
+ } finally {
+ chStmt.close();
+ }
+ OseeLog.logf(Activator.class, Level.FINE, new Exception("Artifact Selection Time"),
+ "Artifact Selection Time [%s], [%d] artifacts selected", Lib.getElapseString(time), toLoad.size());
+ return toLoad;
+ // processList(queryId, toLoad, artifacts, insertParameters, transactionId, reload, locks);
+ }
+
+ /**
+ * Determines the artIds and branchUuids of artifacts to load based on sql and queryParameters
+ */
+ public static List<Pair<ArtifactId, BranchId>> selectArtifacts(String sql, Object[] queryParameters, int artifactCountEstimate) throws OseeCoreException {
JdbcStatement chStmt = ConnectionHandler.getStatement();
long time = System.currentTimeMillis();

Back to the top