diff options
author | Roberto E. Escobar | 2013-08-05 22:00:33 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-08-21 20:29:09 +0000 |
commit | a464fef91967e654a0a85079f2f23e18f290ad66 (patch) | |
tree | 36255ecf0a860a2e1dfb38a1eefe1ff841d2835f /plugins/org.eclipse.osee.orcs | |
parent | 4265ab02087418fe8890c7790278163d2fdb3fe8 (diff) | |
download | org.eclipse.osee-a464fef91967e654a0a85079f2f23e18f290ad66.tar.gz org.eclipse.osee-a464fef91967e654a0a85079f2f23e18f290ad66.tar.xz org.eclipse.osee-a464fef91967e654a0a85079f2f23e18f290ad66.zip |
refinement: Improve artifact type inheritance search API
Make artifact type inheritance search similar to java:
- andIsOfType similar to instanceof
- andTypeEquals similar to object.getClass() == Object.class
Change-Id: I348bcecdf85be828a42b7febf118766439984e9f
Diffstat (limited to 'plugins/org.eclipse.osee.orcs')
-rw-r--r-- | plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryBuilder.java | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryBuilder.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryBuilder.java index 5eccaa56674..063d0485754 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryBuilder.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryBuilder.java @@ -47,12 +47,6 @@ public interface QueryBuilder { boolean areDeletedIncluded(); - QueryBuilder includeTypeInheritance(); - - QueryBuilder includeTypeInheritance(boolean enabled); - - boolean isTypeInheritanceIncluded(); - QueryBuilder fromTransaction(int transactionId); int getFromTransaction(); @@ -65,13 +59,6 @@ public interface QueryBuilder { QueryBuilder excludeDeleted(); - QueryBuilder excludeTypeInheritance(); - - /** - * Resets query builder to default settings. This also clear all criteria added to original query. - */ - QueryBuilder resetToDefaults(); - /** * Search criteria that finds a given artifact id */ @@ -103,16 +90,26 @@ public interface QueryBuilder { QueryBuilder andIds(Collection<? extends IArtifactToken> artifactTokens) throws OseeCoreException; /** - * Search criteria that finds a given artifact type + * Search criteria that finds a given artifact type using type inheritance */ QueryBuilder andIsOfType(IArtifactType... artifactType) throws OseeCoreException; /** - * Search criteria that finds a given artifact types + * Search criteria that finds a given artifact types using type inheritance */ QueryBuilder andIsOfType(Collection<? extends IArtifactType> artifactType) throws OseeCoreException; /** + * Search criteria that finds a given artifact types by matching type exactly + */ + QueryBuilder andTypeEquals(IArtifactType... artifactType) throws OseeCoreException; + + /** + * Search criteria that finds a given artifact types by matching type exactly + */ + QueryBuilder andTypeEquals(Collection<? extends IArtifactType> artifactType) throws OseeCoreException; + + /** * Search criteria that checks for the existence of an attribute type(s). */ QueryBuilder andExists(IAttributeType... attributeType) throws OseeCoreException; |