Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormegumi.telles2013-02-12 17:36:26 -0500
committerGerrit Code Review @ Eclipse.org2013-02-13 14:31:53 -0500
commit17e654a840e7a13f90a2d0ed53ee13c5d41c26d6 (patch)
tree648190dd4466995304a354f17d94e9e34a8df7ab /plugins/org.eclipse.osee.framework.core.message/src/org
parentd16a1bff7a995c0d235c9f1091ce1b1fe7086ae2 (diff)
downloadorg.eclipse.osee-17e654a840e7a13f90a2d0ed53ee13c5d41c26d6.tar.gz
org.eclipse.osee-17e654a840e7a13f90a2d0ed53ee13c5d41c26d6.tar.xz
org.eclipse.osee-17e654a840e7a13f90a2d0ed53ee13c5d41c26d6.zip
bug[ats_R27GE]: Multiple attribute criteria search returning no results
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java13
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java23
3 files changed, 20 insertions, 20 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java
index 838155713b..ca9fd6601b 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java
@@ -25,6 +25,7 @@ public class SearchOptions {
private boolean isMatchWordOrder;
private boolean isCaseSensive;
private boolean isFindAllLocationsEnabled;
+ private boolean isSearchAll;
public SearchOptions() {
deletionFlag = DeletionFlag.EXCLUDE_DELETED;
@@ -46,6 +47,10 @@ public class SearchOptions {
return isFindAllLocationsEnabled;
}
+ public boolean isSearchAll() {
+ return isSearchAll;
+ }
+
public Collection<IAttributeType> getAttributeTypeFilter() {
return attributeTypeGuids;
}
@@ -64,10 +69,6 @@ public class SearchOptions {
attributeTypeGuids.add(type);
}
- public boolean isAttributeTypeFiltered() {
- return !attributeTypeGuids.isEmpty();
- }
-
public void setDeletedIncluded(DeletionFlag deletionFlag) {
this.deletionFlag = deletionFlag;
}
@@ -84,6 +85,10 @@ public class SearchOptions {
this.isFindAllLocationsEnabled = isFindAllLocationsEnabled;
}
+ public void setIsSearchAll(boolean isSearchAll) {
+ this.isSearchAll = isSearchAll;
+ }
+
@Override
public String toString() {
return "SearchOptions [attributeTypeGuids=" + attributeTypeGuids + ", isIncludeDeleted=" + getDeletionFlag() + ", isMatchWordOrder=" + isMatchWordOrder + ", isCaseSensive=" + isCaseSensive + ", isFindAllLocationsEnabled=" + isFindAllLocationsEnabled + "]";
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java
index ddc56ff093..b7884dcec0 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java
@@ -22,10 +22,6 @@ public class SearchRequest implements HasBranch {
private final String rawSearch;
private final SearchOptions options;
- public SearchRequest(IOseeBranch branch, String rawSearch) {
- this(branch, rawSearch, null);
- }
-
public SearchRequest(IOseeBranch branch, String rawSearch, SearchOptions options) {
this.branch = branch;
this.rawSearch = rawSearch;
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java
index 040b0fe15f..8213d6bebd 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java
@@ -83,19 +83,18 @@ public class SearchRequestTranslator implements ITranslator<SearchRequest> {
store.put(Entry.OPTION_IS_INCLUDE_DELETED.name(), options.getDeletionFlag().areDeletedAllowed());
store.put(Entry.OPTION_FIND_ALL_LOCATIONS.name(), options.isFindAllLocationsEnabled());
- if (options.isAttributeTypeFiltered()) {
- Collection<IAttributeType> types = options.getAttributeTypeFilter();
- String[] guids = new String[types.size()];
- String[] names = new String[types.size()];
- int index = 0;
- for (IAttributeType type : types) {
- guids[index] = String.valueOf(type.getGuid());
- names[index] = type.getName();
- index++;
- }
- store.put(Entry.OPTION_ATTRIBUTE_TYPE_FILTER_GUIDS.name(), guids);
- store.put(Entry.OPTION_ATTRIBUTE_TYPE_FILTER_NAMES.name(), names);
+ Collection<IAttributeType> types = options.getAttributeTypeFilter();
+ String[] guids = new String[types.size()];
+ String[] names = new String[types.size()];
+ int index = 0;
+ for (IAttributeType type : types) {
+ guids[index] = String.valueOf(type.getGuid());
+ names[index] = type.getName();
+ index++;
}
+ store.put(Entry.OPTION_ATTRIBUTE_TYPE_FILTER_GUIDS.name(), guids);
+ store.put(Entry.OPTION_ATTRIBUTE_TYPE_FILTER_NAMES.name(), names);
+
}
return store;
}

Back to the top