blob: 74cab77d6b69c413a4f9bab23f3740e429eb6dfa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/*******************************************************************************
* 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.sql.Timestamp;
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.TransactionDetailsType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.orcs.data.ArtifactId;
import org.eclipse.osee.orcs.data.TransactionReadable;
/**
* @author Ryan D. Brooks
* @author Roberto E. Escobar
*/
public interface TransactionQuery {
TransactionQuery andTxId(int... id) throws OseeCoreException;
TransactionQuery andTxIds(Collection<Integer> ids) throws OseeCoreException;
TransactionQuery andTxId(Operator op, int id) throws OseeCoreException;
/***********************************************************************
* Use for complex queries such as ranges. Translates to transaction_id op1 id1 and transaction_id op2 id2
*
* @param op1 operator for first term
* @param id1 id for first term
* @param op2 operator for second term
* @param id2 id for second term
* @return the transaction query
* @throws OseeCoreException
*/
TransactionQuery andTxId(Operator op1, int id1, Operator op2, int id2) throws OseeCoreException;
TransactionQuery andCommentEquals(String value) throws OseeCoreException;
TransactionQuery andCommentPattern(String pattern) throws OseeCoreException;
TransactionQuery andIs(TransactionDetailsType... types) throws OseeCoreException;
TransactionQuery andIs(Collection<TransactionDetailsType> types) throws OseeCoreException;
TransactionQuery andBranch(IOseeBranch... ids) throws OseeCoreException;
TransactionQuery andBranch(Collection<? extends IOseeBranch> ids) throws OseeCoreException;
TransactionQuery andBranchIds(long... id) throws OseeCoreException;
TransactionQuery andBranchIds(Collection<Long> ids) throws OseeCoreException;
TransactionQuery andDate(Operator op, Timestamp date) throws OseeCoreException;
TransactionQuery andDate(Timestamp from, Timestamp to) throws OseeCoreException;
TransactionQuery andAuthorLocalIds(ArtifactId... id) throws OseeCoreException;
TransactionQuery andAuthorLocalIds(Collection<ArtifactId> ids) throws OseeCoreException;
TransactionQuery andAuthorIds(int... id) throws OseeCoreException;
TransactionQuery andAuthorIds(Collection<Integer> ids) throws OseeCoreException;
TransactionQuery andCommitIds(Integer... id) throws OseeCoreException;
TransactionQuery andCommitIds(Collection<Integer> ids) throws OseeCoreException;
TransactionQuery andNullCommitId() throws OseeCoreException;
TransactionQuery andIsHead(int branchId) throws OseeCoreException;
TransactionQuery andIsHead(IOseeBranch branch) throws OseeCoreException;
ResultSet<TransactionReadable> getResults() throws OseeCoreException;
ResultSet<Integer> getResultsAsIds() throws OseeCoreException;
int getCount() throws OseeCoreException;
CancellableCallable<Integer> createCount() throws OseeCoreException;
CancellableCallable<ResultSet<TransactionReadable>> createSearch() throws OseeCoreException;
CancellableCallable<ResultSet<Integer>> createSearchResultsAsIds() throws OseeCoreException;
}
|