Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2013-09-17 02:02:25 +0000
committerRoberto E. Escobar2013-09-17 23:29:59 +0000
commit34f68674b281b00f2b6d255755ac874a5dfeced8 (patch)
tree3038dd260bb938df3000694996cb7af89da522b9 /plugins/org.eclipse.osee.orcs
parent05c7905278877bf3fbf17ca0627b9ac9de1fb62e (diff)
downloadorg.eclipse.osee-34f68674b281b00f2b6d255755ac874a5dfeced8.tar.gz
org.eclipse.osee-34f68674b281b00f2b6d255755ac874a5dfeced8.tar.xz
org.eclipse.osee-34f68674b281b00f2b6d255755ac874a5dfeced8.zip
feature[ats_110D5]: Create Branch Query API
Diffstat (limited to 'plugins/org.eclipse.osee.orcs')
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/BranchReadable.java41
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQuery.java78
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java2
3 files changed, 121 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/BranchReadable.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/BranchReadable.java
new file mode 100644
index 00000000000..19cd2c8ef4c
--- /dev/null
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/BranchReadable.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.orcs.data;
+
+import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.Identifiable;
+import org.eclipse.osee.framework.core.enums.BranchArchivedState;
+import org.eclipse.osee.framework.core.enums.BranchState;
+import org.eclipse.osee.framework.core.enums.BranchType;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public interface BranchReadable extends Identifiable, HasLocalId, IOseeBranch {
+
+ BranchArchivedState getArchiveState();
+
+ BranchState getBranchState();
+
+ BranchType getBranchType();
+
+ boolean hasParentBranch();
+
+ // These get Id method might change
+ int getAssociatedArtifactId();
+
+ int getBaseTransaction();
+
+ int getSourceTransaction();
+
+ int getParentBranch();
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQuery.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQuery.java
new file mode 100644
index 00000000000..279aadd92c6
--- /dev/null
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQuery.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.orcs.search;
+
+import java.util.Collection;
+import org.eclipse.osee.executor.admin.CancellableCallable;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.ResultSet;
+import org.eclipse.osee.framework.core.enums.BranchState;
+import org.eclipse.osee.framework.core.enums.BranchType;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.orcs.data.BranchReadable;
+
+/**
+ * @author Ryan D. Brooks
+ * @author Roberto E. Escobar
+ */
+public interface BranchQuery {
+
+ BranchQuery includeDeleted();
+
+ BranchQuery excludeDeleted();
+
+ BranchQuery includeDeleted(boolean enabled);
+
+ boolean areDeletedIncluded();
+
+ BranchQuery includeArchived();
+
+ BranchQuery includeArchived(boolean enabled);
+
+ BranchQuery excludeArchived();
+
+ boolean areArchivedIncluded();
+
+ BranchQuery andLocalId(int... id) throws OseeCoreException;
+
+ BranchQuery andLocalIds(Collection<Integer> ids) throws OseeCoreException;
+
+ BranchQuery andUuids(String... ids) throws OseeCoreException;
+
+ BranchQuery andUuids(Collection<String> ids) throws OseeCoreException;
+
+ BranchQuery andIds(Collection<? extends IOseeBranch> ids) throws OseeCoreException;
+
+ BranchQuery andIds(IOseeBranch... ids) throws OseeCoreException;
+
+ BranchQuery andIsOfType(BranchType... branchType) throws OseeCoreException;
+
+ BranchQuery andStateIs(BranchState... branchState) throws OseeCoreException;
+
+ BranchQuery andNameEquals(String value) throws OseeCoreException;
+
+ BranchQuery andNamePattern(String pattern) throws OseeCoreException;
+
+ BranchQuery andIsChildOf(IOseeBranch branch) throws OseeCoreException;
+
+ ResultSet<BranchReadable> getResults() throws OseeCoreException;
+
+ ResultSet<IOseeBranch> getResultsAsId() throws OseeCoreException;
+
+ int getCount() throws OseeCoreException;
+
+ CancellableCallable<Integer> createCount() throws OseeCoreException;
+
+ CancellableCallable<ResultSet<BranchReadable>> createSearch() throws OseeCoreException;
+
+ CancellableCallable<ResultSet<IOseeBranch>> createSearchResultsAsIds() throws OseeCoreException;
+
+}
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java
index b8168b6882b..0c97d0c28f3 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java
@@ -28,4 +28,6 @@ public interface QueryFactory {
QueryBuilder fromArtifacts(Collection<? extends ArtifactReadable> artifacts) throws OseeCoreException;
+ BranchQuery branchQuery();
+
}

Back to the top