Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-05-24 21:01:52 -0400
committerRyan Brooks2017-05-30 15:49:43 -0400
commit70a785902590615e552032e77f10f493416b9010 (patch)
treee6f278cf20d920f57f11d3915f483c0570ce3d1c
parent2a298f101ca0bcbe94ed9f7f175fc9664a47d87b (diff)
downloadorg.eclipse.osee-70a785902590615e552032e77f10f493416b9010.tar.gz
org.eclipse.osee-70a785902590615e552032e77f10f493416b9010.tar.xz
org.eclipse.osee-70a785902590615e552032e77f10f493416b9010.zip
refactor: Use ArtifactTypeId in skynet.core
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java3
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUser.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java12
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java17
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java15
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java21
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeProvider.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IArtifactTypeProvider.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java41
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java14
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java11
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/Artifact.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java25
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java5
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java2
39 files changed, 142 insertions, 148 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java
index 09fe282748..43279aa172 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats.api;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.HasDescription;
import org.eclipse.osee.framework.jdk.core.type.NamedId;
@@ -35,6 +36,6 @@ public interface IAtsObject extends NamedId, HasDescription {
IArtifactType getArtifactType();
- boolean isOfType(IArtifactType... artifactTypes);
+ boolean isOfType(ArtifactTypeId... artifactTypes);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java
index dab1c4e140..840129d1ac 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java
@@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.eclipse.osee.ats.api.config.JaxAtsObject;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -82,7 +83,7 @@ public class JaxAtsUser extends JaxAtsObject implements IAtsUser {
}
@Override
- public boolean isOfType(IArtifactType... artifactTypes) {
+ public boolean isOfType(ArtifactTypeId... artifactTypes) {
return Collections.asHashSet(artifactTypes).contains(getArtifactType());
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java
index bbe0e938d7..b704be78c3 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.core.client.internal.user;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
@@ -124,7 +125,7 @@ public class AtsUser implements IAtsUser {
}
@Override
- public boolean isOfType(IArtifactType... artifactTypes) {
+ public boolean isOfType(ArtifactTypeId... artifactTypes) {
return user.isOfType(artifactTypes);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
index 7baf2cbd04..f71cdd5381 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.core.internal.log.AtsLogFactory;
import org.eclipse.osee.ats.core.internal.state.StateManager;
import org.eclipse.osee.ats.core.util.AtsUserGroup;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.Named;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -262,7 +263,7 @@ public class MockWorkItem implements IAtsWorkItem {
}
@Override
- public boolean isOfType(IArtifactType... artifactTypes) {
+ public boolean isOfType(ArtifactTypeId... artifactTypes) {
return false;
}
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java
index 62b447eb02..c870a77c98 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.core.model.impl;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.NamedIdBase;
@@ -52,8 +53,8 @@ public class AtsObject extends NamedIdBase implements IAtsObject {
}
@Override
- public boolean isOfType(IArtifactType... artifactType) {
- for (IArtifactType artType : artifactType) {
+ public boolean isOfType(ArtifactTypeId... artifactType) {
+ for (ArtifactTypeId artType : artifactType) {
if (getArtifactType().equals(artType)) {
return true;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUser.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUser.java
index b44efda54f..7392fda27c 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUser.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUser.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats.core.users;
import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.UserToken;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
@@ -101,7 +102,7 @@ public class AtsUser extends NamedIdBase implements IAtsUser {
}
@Override
- public boolean isOfType(IArtifactType... artifactTypes) {
+ public boolean isOfType(ArtifactTypeId... artifactTypes) {
return Collections.asHashSet(artifactTypes).contains(getArtifactType());
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java
index f3913bec4c..99d824af78 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java
@@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -127,7 +128,7 @@ public class AtsUser implements IAtsUser {
}
@Override
- public boolean isOfType(IArtifactType... artifactTypes) {
+ public boolean isOfType(ArtifactTypeId... artifactTypes) {
return user.isOfType(artifactTypes);
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java
index 476f2120a0..83098aece6 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.core.model.access;
import java.util.Collection;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -41,7 +42,7 @@ public class AccessDataQuery {
setTypePermissionStatus(permissionStatus, permissionToMatch, branchAccessDetails, branchToMatch);
}
- public void branchArtifactTypeMatches(PermissionEnum permissionToMatch, BranchId branchToMatch, IArtifactType artifactType, PermissionStatus permissionStatus) throws OseeCoreException {
+ public void branchArtifactTypeMatches(PermissionEnum permissionToMatch, BranchId branchToMatch, ArtifactTypeId artifactType, PermissionStatus permissionStatus) throws OseeCoreException {
branchMatches(permissionToMatch, branchToMatch, permissionStatus);
if (permissionStatus.matched()) {
Collection<AccessDetail<?>> branchAccessDetails = accessData.getAccess(branchToMatch);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java
index 14cdef1e3c..3acb5969f7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java
@@ -13,9 +13,9 @@ package org.eclipse.osee.framework.skynet.core;
import java.util.Collection;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.access.PermissionStatus;
@@ -32,7 +32,7 @@ public interface AccessPolicy {
PermissionStatus hasAttributeTypePermission(Collection<? extends ArtifactToken> artifacts, AttributeTypeId attributeType, PermissionEnum permission, Level level) throws OseeCoreException;
- PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException;
+ PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends ArtifactTypeId> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException;
PermissionStatus hasArtifactPermission(Collection<Artifact> artifacts, PermissionEnum permission, Level level) throws OseeCoreException;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java
index 2f4c1eb4f7..0a86f9d73e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java
@@ -11,9 +11,9 @@
package org.eclipse.osee.framework.skynet.core;
import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON;
-import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
-import org.eclipse.osee.framework.core.data.IArtifactType;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTokens;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
@@ -48,7 +48,7 @@ public final class OseeSystemArtifacts {
* @return the artifact specified by type, name, and branch from the cache if available otherwise the datastore is
* accessed, and finally a new artifact is created if it can not be found
*/
- public static Artifact getOrCreateArtifact(IArtifactType artifactType, String artifactName, BranchId branch) throws OseeCoreException {
+ public static Artifact getOrCreateArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch) throws OseeCoreException {
return getOrCreateCachedArtifact(artifactType, artifactName, branch, null, true);
}
@@ -57,15 +57,15 @@ public final class OseeSystemArtifacts {
artifactToken.getGuid(), artifactToken.getUuid(), true);
}
- public static Artifact getCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch) throws OseeCoreException {
+ public static Artifact getCachedArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch) throws OseeCoreException {
return getOrCreateCachedArtifact(artifactType, artifactName, branch, null, false);
}
- private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch, String guid, boolean create) throws OseeCoreException {
+ private static Artifact getOrCreateCachedArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch, String guid, boolean create) throws OseeCoreException {
return getOrCreateCachedArtifact(artifactType, artifactName, branch, guid, null, create);
}
- private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch, String guid, Long uuid, boolean create) throws OseeCoreException {
+ private static Artifact getOrCreateCachedArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch, String guid, Long uuid, boolean create) throws OseeCoreException {
Artifact artifact = ArtifactQuery.checkArtifactFromTypeAndName(artifactType, artifactName, branch);
if (artifact == null && create) {
if (Strings.isValid(guid)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
index ee56a45b37..79057c3df5 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
@@ -34,7 +34,6 @@ import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
@@ -125,7 +124,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
this.branch = branch;
}
- public Artifact(BranchId branch, IArtifactType artifactType) {
+ public Artifact(BranchId branch, ArtifactTypeId artifactType) {
this(null, branch, artifactType);
}
@@ -250,7 +249,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
/**
* Determines if this artifact's type equals, or is a sub-type of, at least one of the given artifact types.
*/
- public final boolean isOfType(IArtifactType... artifactTypes) {
+ public final boolean isOfType(ArtifactTypeId... artifactTypes) {
return getArtifactType().inheritsFrom(artifactTypes);
}
@@ -432,7 +431,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
addRelation(sorterId, Default_Hierarchical__Child, artifact);
}
- public final Artifact addNewChild(RelationSorter sorterId, IArtifactType artifactType, String name) throws OseeCoreException {
+ public final Artifact addNewChild(RelationSorter sorterId, ArtifactTypeId artifactType, String name) throws OseeCoreException {
Artifact child = ArtifactTypeManager.addArtifact(artifactType, branch);
child.setName(name);
addChild(sorterId, child);
@@ -1467,7 +1466,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
return duplicate(branch, getArtifactType(), excludeAttributeTypes);
}
- public final Artifact duplicate(BranchId branch, IArtifactType newType, Collection<AttributeTypeId> excludeAttributeTypes) throws OseeCoreException {
+ public final Artifact duplicate(BranchId branch, ArtifactTypeId newType, Collection<AttributeTypeId> excludeAttributeTypes) throws OseeCoreException {
Artifact newArtifact = ArtifactTypeManager.addArtifact(newType, branch);
// we do this because attributes were added on creation to meet the
// minimum attribute requirements
@@ -1504,8 +1503,8 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
}
Artifact introduceShallowArtifact(BranchId destinationBranch) throws OseeCoreException {
- Artifact shallowArt = ArtifactTypeManager.getFactory(getArtifactType()).reflectExisitingArtifact(artId, getGuid(),
- getArtifactType(), gammaId, destinationBranch, modType, applicabilityId);
+ Artifact shallowArt = ArtifactTypeManager.getFactory(getArtifactTypeId()).reflectExisitingArtifact(this,
+ getGuid(), getArtifactType(), gammaId, destinationBranch, modType, applicabilityId);
return shallowArt;
}
@@ -1636,8 +1635,8 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
return getAttributes(attributeType).size();
}
- void setArtId(int artifactId) {
- this.artId = artifactId;
+ void setArtId(Long artifactId) {
+ this.artId = artifactId.intValue();
}
/**
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
index ce2fe030b0..99128a4052 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
@@ -18,8 +18,8 @@ import java.util.List;
import java.util.Set;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -86,7 +86,7 @@ public final class ArtifactCache {
ID_CACHE.updateReferenceType(artifact);
}
- public static List<Artifact> getArtifactsByType(IArtifactType artifactType) {
+ public static List<Artifact> getArtifactsByType(ArtifactTypeId artifactType) {
List<Artifact> artifacts = new LinkedList<>();
for (Artifact artifact : ID_CACHE.getAll()) {
if (artifact.isOfType(artifactType)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
index d7819e099d..3c5ce1e812 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
@@ -15,8 +15,9 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
-import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.OseeData;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -68,11 +69,11 @@ public abstract class ArtifactFactory {
return artifact;
}
- public static int getNextArtifactId(Long uuid) {
- return uuid == null ? (int) ConnectionHandler.getNextSequence(OseeData.ART_ID_SEQ, true) : uuid.intValue();
+ public static Long getNextArtifactId(Long uuid) {
+ return uuid == null ? ConnectionHandler.getNextSequence(OseeData.ART_ID_SEQ, true) : uuid;
}
- public synchronized Artifact reflectExisitingArtifact(int artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, ModificationType modificationType, ApplicabilityId applicabilityId) throws OseeCoreException {
+ public synchronized Artifact reflectExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, ModificationType modificationType, ApplicabilityId applicabilityId) throws OseeCoreException {
Artifact toReturn = internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modificationType,
applicabilityId, false, TransactionToken.SENTINEL, true);
ArtifactCache.cache(toReturn);
@@ -82,10 +83,10 @@ public abstract class ArtifactFactory {
/**
* This method does not cache the artifact, ArtifactLoader will cache existing artifacts
*/
- private Artifact internalExistingArtifact(int artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, TransactionToken transactionId, boolean useBackingData) throws OseeCoreException {
+ private Artifact internalExistingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, TransactionToken transactionId, boolean useBackingData) throws OseeCoreException {
Artifact artifact = getArtifactInstance(guid, branch, artifactType, true);
- artifact.setArtId(artId);
+ artifact.setArtId(artId.getId());
artifact.internalSetPersistenceData(gammaId, transactionId, modType, applicabilityId, historical, useBackingData);
return artifact;
@@ -94,7 +95,7 @@ public abstract class ArtifactFactory {
/**
* This method does not cache the artifact, ArtifactLoader will cache existing artifacts
*/
- public synchronized Artifact loadExisitingArtifact(int artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical) throws OseeCoreException {
+ public synchronized Artifact loadExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical) throws OseeCoreException {
return internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modType, applicabilityId, historical,
transactionId, false);
}
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 3031b00264..93eda8d066 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
@@ -21,11 +21,10 @@ import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
-
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -267,8 +266,7 @@ public final class ArtifactLoader {
Id4JoinQuery joinQuery = JoinUtility.createId4JoinQuery();
for (Pair<ArtifactId, BranchId> pair : toLoad) {
- joinQuery.add(BranchId.valueOf(pair.getSecond().getId()), ArtifactId.valueOf(pair.getFirst().getId()),
- TransactionId.valueOf(transactionId.getId()), pair.getSecond().getViewId());
+ joinQuery.add(pair.getSecond(), pair.getFirst(), transactionId, pair.getSecond().getViewId());
}
loadArtifacts(artifacts, joinQuery, loadLevel, null, reload, transactionId, allowDeleted, isArchived);
}
@@ -342,11 +340,12 @@ public final class ArtifactLoader {
Artifact artifact = historical ? null : ArtifactCache.getActive(artifactId, branch);
if (artifact == null) {
- IArtifactType artifactType = ArtifactTypeManager.getTypeByGuid(chStmt.getLong("art_type_id"));
+ ArtifactTypeId artifactType = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
ArtifactFactory factory = ArtifactTypeManager.getFactory(artifactType);
- artifact = factory.loadExisitingArtifact(artifactId.getId().intValue(), chStmt.getString("guid"), artifactType,
- chStmt.getInt("gamma_id"), branch, transactionId, ModificationType.getMod(chStmt.getInt("mod_type")), appId, historical);
+ artifact =
+ factory.loadExisitingArtifact(artifactId, chStmt.getString("guid"), artifactType, chStmt.getInt("gamma_id"),
+ branch, transactionId, ModificationType.getMod(chStmt.getInt("mod_type")), appId, historical);
}
if (reload == LoadType.RELOAD_CACHE) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java
index a42aa7996a..972715ccd6 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java
@@ -25,7 +25,6 @@ import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.OrcsTypesData;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -152,22 +151,22 @@ public class ArtifactTypeManager {
/**
* Get a new instance of type artifactTypeName
*/
- public static Artifact addArtifact(IArtifactType artifactType, BranchId branch) throws OseeCoreException {
+ public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch) throws OseeCoreException {
return addArtifact(artifactType, branch, null, null);
}
/**
* Get a new instance of type artifactTypeName and set it's name.
*/
- public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name) throws OseeCoreException {
+ public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name) throws OseeCoreException {
return addArtifact(artifactType, branch, name, null);
}
- public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, String guid) throws OseeCoreException {
+ public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name, String guid) throws OseeCoreException {
return getFactory(artifactType).makeNewArtifact(branch, artifactType, name, guid);
}
- public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, String guid, long uuid) {
+ public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name, String guid, long uuid) {
Conditions.checkExpressionFailOnTrue(uuid <= 0L, "Invalid Uuid %d. Must be > 0", uuid);
return getFactory(artifactType).makeNewArtifact(branch, artifactType, name, guid, uuid);
}
@@ -180,8 +179,8 @@ public class ArtifactTypeManager {
private static final String COUNT_ARTIFACT_OCCURRENCE =
"select count(1) from (select DISTINCT(art_id) FROM osee_artifact where art_type_id = ?) t1";
- public static void purgeArtifactType(IArtifactType artifactType) throws OseeCoreException {
- int artifactCount = ConnectionHandler.getJdbcClient().fetch(0, COUNT_ARTIFACT_OCCURRENCE, artifactType.getGuid());
+ public static void purgeArtifactType(ArtifactTypeId artifactType) throws OseeCoreException {
+ int artifactCount = ConnectionHandler.getJdbcClient().fetch(0, COUNT_ARTIFACT_OCCURRENCE, artifactType);
if (artifactCount != 0) {
throw new OseeArgumentException(
@@ -197,8 +196,8 @@ public class ArtifactTypeManager {
* @param purgeArtifactTypes types to be converted and purged
* @param newArtifactType new type to convert any existing artifacts of the old type
*/
- public static void purgeArtifactTypesWithCheck(Collection<? extends IArtifactType> purgeArtifactTypes, IArtifactType newArtifactType) throws OseeCoreException {
- for (IArtifactType purgeArtifactType : purgeArtifactTypes) {
+ public static void purgeArtifactTypesWithCheck(Collection<? extends ArtifactTypeId> purgeArtifactTypes, ArtifactTypeId newArtifactType) throws OseeCoreException {
+ for (ArtifactTypeId purgeArtifactType : purgeArtifactTypes) {
// find all artifact of this type on all branches and make a unique list for type change (since it is not by branch)
Set<Artifact> artifacts = new LinkedHashSet<>();
for (BranchId branch : BranchManager.getBranches(new BranchFilter())) {
@@ -228,7 +227,7 @@ public class ArtifactTypeManager {
/**
* @return Returns the ArtifactType factory.
*/
- public static ArtifactFactory getFactory(IArtifactType artifactType) throws OseeCoreException {
+ public static ArtifactFactory getFactory(ArtifactTypeId artifactType) throws OseeCoreException {
if (artifactType == null) {
throw new OseeArgumentException("Artifact Type cannot be null");
}
@@ -248,7 +247,7 @@ public class ArtifactTypeManager {
return new OseeTypesExportOperation(typesEndpoint, outputStream);
}
- public static boolean isUserCreationAllowed(IArtifactType artifactType) {
+ public static boolean isUserCreationAllowed(ArtifactTypeId artifactType) {
boolean userCreationoAllowed = false;
ArtifactFactory factory = factoryManager.getFactory(artifactType);
if (factory != null && factory.isUserCreationEnabled(artifactType)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeProvider.java
index d20ef26644..906307fb57 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeProvider.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.artifact;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
/**
@@ -29,7 +30,7 @@ public class ArtifactTypeProvider implements IArtifactTypeProvider {
}
@Override
- public boolean inheritsFrom(IArtifactType artifactType, IArtifactType... parentTypes) {
+ public boolean inheritsFrom(ArtifactTypeId artifactType, ArtifactTypeId... parentTypes) {
return ArtifactTypeManager.inheritsFrom(artifactType, parentTypes);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
index 7eda603986..13fa0b3bb7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -66,7 +67,7 @@ public class ChangeArtifactType {
private static final IStatus promptStatus = new Status(IStatus.WARNING, Activator.PLUGIN_ID, 257, "", null);
private final Map<Integer, Integer> gammaToArtId = new HashMap<>();
- public static void changeArtifactType(Collection<? extends Artifact> inputArtifacts, IArtifactType newArtifactTypeToken, boolean prompt) throws OseeCoreException {
+ public static void changeArtifactType(Collection<? extends Artifact> inputArtifacts, ArtifactTypeId newArtifactTypeToken, boolean prompt) throws OseeCoreException {
ChangeArtifactType app = new ChangeArtifactType();
if (inputArtifacts.isEmpty()) {
@@ -190,7 +191,7 @@ public class ChangeArtifactType {
message.append("Relation Types:\n" + relationTypes + "\n");
}
- private void deleteInvalidAttributes(Artifact artifact, IArtifactType artifactType) throws OseeCoreException {
+ private void deleteInvalidAttributes(Artifact artifact, ArtifactTypeId artifactType) throws OseeCoreException {
for (AttributeTypeId attributeType : artifact.getAttributeTypes()) {
ArtifactType aType = ArtifactTypeManager.getType(artifactType);
@@ -201,7 +202,7 @@ public class ChangeArtifactType {
}
}
- private void deleteInvalidRelations(Artifact artifact, IArtifactType artifactType) throws OseeCoreException {
+ private void deleteInvalidRelations(Artifact artifact, ArtifactTypeId artifactType) throws OseeCoreException {
for (RelationLink link : artifact.getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) {
if (RelationTypeManager.getRelationSideMax(link.getRelationType(), artifactType,
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IArtifactTypeProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IArtifactTypeProvider.java
index 5049ddbfe2..4a9d59feff 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IArtifactTypeProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IArtifactTypeProvider.java
@@ -10,12 +10,13 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.artifact;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
public interface IArtifactTypeProvider {
IArtifactType getTypeByGuid(Long artTypeGuid);
- boolean inheritsFrom(IArtifactType artifactType, IArtifactType... parentTypes);
+ boolean inheritsFrom(ArtifactTypeId artifactType, ArtifactTypeId... parentTypes);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java
index 6cf8fb50b2..aeb475bf7b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java
@@ -16,7 +16,6 @@ import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.plugin.core.util.ExtensionDefinedObjects;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactFactory;
@@ -37,7 +36,7 @@ public final class ArtifactFactoryManager {
private static final DefaultArtifactFactory defaultArtifactFactory = new DefaultArtifactFactory();
private static Set<ArtifactTypeId> eternalArtifactTypes = null;
- public ArtifactFactory getFactory(IArtifactType artifactType) {
+ public ArtifactFactory getFactory(ArtifactTypeId artifactType) {
ArtifactFactory responsibleFactory = null;
for (ArtifactFactory factory : getFactories()) {
if (factory.isResponsibleFor(artifactType)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
index b52e32f89a..2337d63574 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
@@ -34,7 +34,6 @@ import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
@@ -240,7 +239,7 @@ public class ArtifactQuery {
* @throws ArtifactDoesNotExist if no artifacts are found
* @throws MultipleArtifactsExist if more than one artifact is found
*/
- public static Artifact getArtifactFromTypeAndName(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
+ public static Artifact getArtifactFromTypeAndName(ArtifactTypeId artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
return queryFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch,
options).getOrCheckArtifact(QueryType.GET);
}
@@ -251,7 +250,7 @@ public class ArtifactQuery {
* @return exactly one artifact based on its type and name, otherwise null
* @throws MultipleArtifactsExist if more than one artifact is found
*/
- public static Artifact getArtifactFromTypeAndNameNoException(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
+ public static Artifact getArtifactFromTypeAndNameNoException(ArtifactTypeId artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
try {
return queryFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch,
options).getOrCheckArtifact(QueryType.GET);
@@ -261,7 +260,7 @@ public class ArtifactQuery {
return null;
}
- public static List<ArtifactId> selectArtifactIdsFromTypeAndName(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
+ public static List<ArtifactId> selectArtifactIdsFromTypeAndName(ArtifactTypeId artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
return queryFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch,
options).selectArtifacts(2);
}
@@ -271,7 +270,7 @@ public class ArtifactQuery {
*
* @return one artifact based on its type and name if it exists, otherwise null
*/
- public static Artifact checkArtifactFromTypeAndName(IArtifactType artifactTypeToken, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
+ public static Artifact checkArtifactFromTypeAndName(ArtifactTypeId artifactTypeToken, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
return queryFromTypeAndAttribute(artifactTypeToken, CoreAttributeTypes.Name, artifactName, branch,
options).getOrCheckArtifact(QueryType.CHECK);
}
@@ -366,7 +365,7 @@ public class ArtifactQuery {
new AttributeCriteria(CoreAttributeTypes.Name, artifactName, options)).getArtifacts(30, null);
}
- public static List<Artifact> getArtifactListFromTypeAndName(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
+ public static List<Artifact> getArtifactListFromTypeAndName(ArtifactTypeId artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException {
return getArtifactListFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch, options);
}
@@ -378,7 +377,7 @@ public class ArtifactQuery {
* @throws ArtifactDoesNotExist if no artifacts are found
* @throws MultipleArtifactsExist if more than one artifact is found
*/
- public static Artifact getArtifactFromTypeAndAttribute(IArtifactType artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch) throws OseeCoreException {
+ public static Artifact getArtifactFromTypeAndAttribute(ArtifactTypeId artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch) throws OseeCoreException {
return queryFromTypeAndAttribute(artifactType, attributeType, attributeValue, branch).getOrCheckArtifact(
QueryType.GET);
}
@@ -403,7 +402,7 @@ public class ArtifactQuery {
return new ArtifactQueryBuilder(artifactTypeToken, branch, ALL, allowDeleted).getArtifacts(1000, null);
}
- public static List<Artifact> getArtifactListFromType(List<IArtifactType> artifactTypeTokens, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
+ public static List<Artifact> getArtifactListFromType(List<? extends ArtifactTypeId> artifactTypeTokens, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
return new ArtifactQueryBuilder(artifactTypeTokens, branch, ALL, allowDeleted).getArtifacts(1000, null);
}
@@ -426,25 +425,25 @@ public class ArtifactQuery {
/**
* do not use this method if searching for a super type and its descendants, instead use getArtifactListFromTypeAnd
*/
- public static List<Artifact> getArtifactListFromTypes(Collection<? extends IArtifactType> artifactTypes, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
+ public static List<Artifact> getArtifactListFromTypes(Collection<? extends ArtifactTypeId> artifactTypes, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
return new ArtifactQueryBuilder(artifactTypes, branch, ALL, allowDeleted).getArtifacts(1000, null);
}
- public static List<Artifact> getArtifactListFromTypeWithInheritence(IArtifactType artifactType, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
+ public static List<Artifact> getArtifactListFromTypeWithInheritence(ArtifactTypeId artifactType, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
ArtifactType artifactTypeFull = ArtifactTypeManager.getType(artifactType);
Collection<ArtifactType> artifactTypes = artifactTypeFull.getAllDescendantTypes();
artifactTypes.add(artifactTypeFull);
return getArtifactListFromTypes(artifactTypes, branch, allowDeleted);
}
- public static int getArtifactCountFromTypeWithInheritence(IArtifactType artifactType, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
+ public static int getArtifactCountFromTypeWithInheritence(ArtifactTypeId artifactType, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
ArtifactType artifactTypeFull = ArtifactTypeManager.getType(artifactType);
Collection<ArtifactType> artifactTypes = artifactTypeFull.getAllDescendantTypes();
artifactTypes.add(artifactTypeFull);
return getArtifactCountFromTypes(artifactTypes, branch, allowDeleted);
}
- public static int getArtifactCountFromTypes(Collection<? extends IArtifactType> artifactTypes, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
+ public static int getArtifactCountFromTypes(Collection<? extends ArtifactTypeId> artifactTypes, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
return new ArtifactQueryBuilder(artifactTypes, branch, ALL, allowDeleted).countArtifacts();
}
@@ -453,7 +452,7 @@ public class ArtifactQuery {
*
* @return a collection of the artifacts found or an empty collection if none are found
*/
- public static List<Artifact> getArtifactListFromTypeAnd(IArtifactType artifactType, BranchId branch, int artifactCountEstimate, List<ArtifactSearchCriteria> criteria) throws OseeCoreException {
+ public static List<Artifact> getArtifactListFromTypeAnd(ArtifactTypeId artifactType, BranchId branch, int artifactCountEstimate, List<ArtifactSearchCriteria> criteria) throws OseeCoreException {
return new ArtifactQueryBuilder(artifactType, branch, ALL, criteria).getArtifacts(artifactCountEstimate, null);
}
@@ -500,7 +499,7 @@ public class ArtifactQuery {
*
* @return a collection of the artifacts found or an empty collection if none are found
*/
- public static List<Artifact> getArtifactListFromTypeAndAttribute(IArtifactType artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch, QueryOption... options) throws OseeCoreException {
+ public static List<Artifact> getArtifactListFromTypeAndAttribute(ArtifactTypeId artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch, QueryOption... options) throws OseeCoreException {
return new ArtifactQueryBuilder(artifactType, branch, ALL,
new AttributeCriteria(attributeType, attributeValue, options)).getArtifacts(100, null);
}
@@ -518,12 +517,12 @@ public class ArtifactQuery {
300, null);
}
- private static ArtifactQueryBuilder queryFromTypeAndAttribute(IArtifactType artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch, QueryOption... options) {
+ private static ArtifactQueryBuilder queryFromTypeAndAttribute(ArtifactTypeId artifactType, AttributeTypeId attributeType, String attributeValue, BranchId branch, QueryOption... options) {
return new ArtifactQueryBuilder(artifactType, branch, ALL,
new AttributeCriteria(attributeType, attributeValue, options));
}
- public static List<Artifact> getArtifactListFromTypeAndAttribute(IArtifactType artifactType, AttributeTypeId attributeType, Collection<String> attributeValues, BranchId branch, int artifactCountEstimate) throws OseeCoreException {
+ public static List<Artifact> getArtifactListFromTypeAndAttribute(ArtifactTypeId artifactType, AttributeTypeId attributeType, Collection<String> attributeValues, BranchId branch, int artifactCountEstimate) throws OseeCoreException {
return new ArtifactQueryBuilder(artifactType, branch, ALL,
new AttributeCriteria(attributeType, attributeValues)).getArtifacts(artifactCountEstimate, null);
}
@@ -639,7 +638,7 @@ public class ArtifactQuery {
return reloadedArts;
}
- public static Artifact getOrCreate(String guid, IArtifactType type, BranchId branch) throws OseeCoreException {
+ public static Artifact getOrCreate(String guid, ArtifactTypeId type, BranchId branch) throws OseeCoreException {
Artifact artifact = ArtifactQuery.checkArtifactFromId(guid, branch, EXCLUDE_DELETED);
if (artifact == null) {
@@ -814,7 +813,7 @@ public class ArtifactQuery {
* performing queries.
*/
- public static Collection<ArtifactToken> getArtifactTokenListFromTypeAndActive(IArtifactType artifactType, AttributeTypeId activeAttrType, BranchId branch) {
+ public static Collection<ArtifactToken> getArtifactTokenListFromTypeAndActive(ArtifactTypeId artifactType, AttributeTypeId activeAttrType, BranchId branch) {
JdbcStatement chStmt = ConnectionHandler.getStatement();
try {
chStmt.runPreparedQuery(getTokenQuery(Active.Active, activeAttrType), artifactType.getId(), branch.getId(),
@@ -826,7 +825,7 @@ public class ArtifactQuery {
}
}
- public static Collection<ArtifactToken> getArtifactTokenListFromType(IArtifactType artifactType, BranchId branch) {
+ public static Collection<ArtifactToken> getArtifactTokenListFromType(ArtifactTypeId artifactType, BranchId branch) {
JdbcStatement chStmt = ConnectionHandler.getStatement();
try {
chStmt.runPreparedQuery(getTokenQuery(Active.Both, null), artifactType.getId(), branch.getId(),
@@ -890,7 +889,7 @@ public class ArtifactQuery {
+ "txs.BRANCH_ID = ? and art.art_id in ( ART_IDS_HERE ) and txs.TX_CURRENT = 1 and attr.ATTR_TYPE_ID = 1152921504606847088 " //
+ "and attr.ART_ID = art.ART_ID and txs.GAMMA_ID = ATTR.GAMMA_ID";
- public static List<ArtifactToken> getArtifactTokenListFromSoleAttributeInherited(IArtifactType artifactType, AttributeTypeId attributetype, String value, BranchId branch) {
+ public static List<ArtifactToken> getArtifactTokenListFromSoleAttributeInherited(ArtifactTypeId artifactType, AttributeTypeId attributetype, String value, BranchId branch) {
ArtifactType artifactTypeFull = ArtifactTypeManager.getType(artifactType);
List<Long> artTypeIds = new LinkedList<>();
@@ -925,7 +924,7 @@ public class ArtifactQuery {
"select links.a_art_id, links.b_art_id from links, osee_txs txs where txs.BRANCH_ID = BRANCH_ID_HERE and txs.TX_CURRENT = 1 and txs.MOD_TYPE not in (3,5,9.10) " + //
"and txs.GAMMA_ID = links.gamma_id";
- public static HashCollection<ArtifactId, ArtifactToken> getArtifactTokenListFromRelated(BranchId branch, Collection<ArtifactId> artifacts, IArtifactType artifactType, RelationTypeSide relationType) {
+ public static HashCollection<ArtifactId, ArtifactToken> getArtifactTokenListFromRelated(BranchId branch, Collection<ArtifactId> artifacts, ArtifactTypeId artifactType, RelationTypeSide relationType) {
List<Long> artIds = new LinkedList<>();
String ids = "";
for (ArtifactId art : artifacts) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java
index 80cdfcdf05..686cb3ed18 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java
@@ -27,7 +27,6 @@ import java.util.List;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -120,7 +119,7 @@ public class ArtifactQueryBuilder {
allowDeleted, loadLevel);
}
- public ArtifactQueryBuilder(Collection<? extends IArtifactType> artifactTypes, BranchId branch, LoadLevel loadLevel, DeletionFlag allowDeleted) {
+ public ArtifactQueryBuilder(Collection<? extends ArtifactTypeId> artifactTypes, BranchId branch, LoadLevel loadLevel, DeletionFlag allowDeleted) {
this(null, ArtifactId.SENTINEL, null, null, artifactTypes, branch, TransactionToken.SENTINEL, allowDeleted,
loadLevel);
emptyCriteria = artifactTypes.isEmpty();
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java
index bac6cf605d..28e58fca5d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.change;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
@@ -20,7 +20,7 @@ import org.eclipse.osee.framework.core.model.TransactionDelta;
*/
public class ArtifactChangeBuilder extends ChangeBuilder {
- public ArtifactChangeBuilder(BranchId branch, IArtifactType artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
+ public ArtifactChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java
index b95009b107..bed6c45b78 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.change;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.core.model.type.AttributeType;
@@ -26,7 +26,7 @@ public final class AttributeChangeBuilder extends ChangeBuilder {
private final AttributeType attributeType;
private final ModificationType artModType;
- public AttributeChangeBuilder(BranchId branch, IArtifactType artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, String isValue, String wasValue, int attrId, AttributeType attributeType, ModificationType artModType) {
+ public AttributeChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, String isValue, String wasValue, int attrId, AttributeType attributeType, ModificationType artModType) {
super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical);
this.isValue = isValue;
this.wasValue = wasValue;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java
index e3a4b90c35..a9f51ff04b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.change;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
@@ -24,10 +24,10 @@ public abstract class ChangeBuilder {
private final TransactionDelta txDelta;
private ModificationType modType;
private final BranchId branch;
- private final IArtifactType artifactType;
+ private final ArtifactTypeId artifactType;
private final boolean isHistorical;
- public ChangeBuilder(BranchId branch, IArtifactType artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
+ public ChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
super();
this.sourceGamma = sourceGamma;
this.artId = artId;
@@ -62,7 +62,7 @@ public abstract class ChangeBuilder {
return branch;
}
- public IArtifactType getArtifactType() {
+ public ArtifactTypeId getArtifactType() {
return artifactType;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java
index 0a49554582..c7112e1efd 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.change;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.core.model.type.RelationType;
@@ -25,7 +25,7 @@ public class RelationChangeBuilder extends ChangeBuilder {
private final String rationale;
private final RelationType relationType;
- public RelationChangeBuilder(BranchId branch, IArtifactType artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, int bArtId, int relLinkId, String rationale, RelationType relationType, boolean isHistorical) {
+ public RelationChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, int bArtId, int relLinkId, String rationale, RelationType relationType, boolean isHistorical) {
super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical);
this.bArtId = bArtId;
this.relLinkId = relLinkId;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java
index 9857194a9b..c2e6483329 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java
@@ -14,8 +14,8 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -28,17 +28,17 @@ import org.eclipse.osee.framework.skynet.core.internal.Activator;
*/
public class ArtifactTypeEventFilter implements IEventFilter {
- private final Collection<IArtifactType> artifactTypes;
+ private final Collection<ArtifactTypeId> artifactTypes;
private final IArtifactTypeProvider typeProvider;
/**
* Provide artifact types of events to be passed through. All others will be ignored.
*/
- public ArtifactTypeEventFilter(IArtifactType... artifactTypes) {
+ public ArtifactTypeEventFilter(ArtifactTypeId... artifactTypes) {
this(new ArtifactTypeProvider(), artifactTypes);
}
- public ArtifactTypeEventFilter(IArtifactTypeProvider typeProvider, IArtifactType... artifactTypes) {
+ public ArtifactTypeEventFilter(IArtifactTypeProvider typeProvider, ArtifactTypeId... artifactTypes) {
this.typeProvider = typeProvider;
this.artifactTypes = Arrays.asList(artifactTypes);
}
@@ -50,12 +50,12 @@ public class ArtifactTypeEventFilter implements IEventFilter {
public boolean isMatchArtifacts(List<? extends DefaultBasicGuidArtifact> guidArts) {
try {
for (DefaultBasicGuidArtifact guidArt : guidArts) {
- IArtifactType artType = typeProvider.getTypeByGuid(guidArt.getArtTypeGuid());
- for (IArtifactType artifactType : artifactTypes) {
+ ArtifactTypeId artType = typeProvider.getTypeByGuid(guidArt.getArtTypeGuid());
+ for (ArtifactTypeId artifactType : artifactTypes) {
if (typeProvider.inheritsFrom(artType, artifactType)) {
return true;
}
- for (IArtifactType matchArtType : artifactTypes) {
+ for (ArtifactTypeId matchArtType : artifactTypes) {
if (matchArtType.equals(artType)) {
return true;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java
index 686633f222..e78fddf841 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java
@@ -15,9 +15,9 @@ import java.util.Collection;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.client.OseeClientProperties;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.enums.RelationSide;
@@ -155,7 +155,7 @@ public class AccessPolicyImpl implements AccessPolicy {
}
@Override
- public PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException {
+ public PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends ArtifactTypeId> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException {
User currentUser = getCurrentUser();
AccessDataQuery query = getAccessService().getAccessData(currentUser, java.util.Collections.singleton(branch));
@@ -163,7 +163,7 @@ public class AccessPolicyImpl implements AccessPolicy {
if (!OseeClientProperties.isInDbInit()) {
permissionStatus = new PermissionStatus();
if (artifactTypes != null) {
- for (IArtifactType artifactType : artifactTypes) {
+ for (ArtifactTypeId artifactType : artifactTypes) {
query.branchArtifactTypeMatches(permission, branch, artifactType, permissionStatus);
if (printErrorMessage(currentUser, artifactTypes, permissionStatus, level)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java
index e417ca586f..d72b1c5be3 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.framework.skynet.core.relation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.enums.RelationSide;
import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist;
@@ -39,7 +39,7 @@ public class RelationTypeManager {
return getCacheService().getRelationTypeCache();
}
- public static List<RelationType> getValidTypes(IArtifactType artifactType, BranchId branch) throws OseeCoreException {
+ public static List<RelationType> getValidTypes(ArtifactTypeId artifactType, BranchId branch) throws OseeCoreException {
Collection<RelationType> relationTypes = getAllTypes();
List<RelationType> validRelationTypes = new ArrayList<>();
for (RelationType relationType : relationTypes) {
@@ -54,7 +54,7 @@ public class RelationTypeManager {
return validRelationTypes;
}
- public static int getRelationSideMax(IRelationType relType, IArtifactType artifactType, RelationSide relationSide) throws OseeCoreException {
+ public static int getRelationSideMax(IRelationType relType, ArtifactTypeId artifactType, RelationSide relationSide) throws OseeCoreException {
RelationType relationType = getType(relType);
int toReturn = 0;
ArtifactType type = getCacheService().getArtifactTypeCache().get(artifactType);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
index 2071ec22cd..60b8852fe7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
@@ -17,8 +17,8 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -29,7 +29,6 @@ import org.eclipse.osee.framework.core.sql.OseeSql;
import org.eclipse.osee.framework.jdk.core.type.Id;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.skynet.core.change.ArtifactChangeBuilder;
import org.eclipse.osee.framework.skynet.core.change.AttributeChangeBuilder;
@@ -112,7 +111,7 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
int artId = chStmt.getInt("art_id");
int sourceGamma = chStmt.getInt("gamma_id");
long attrTypeId = chStmt.getLong("attr_type_id");
- long artTypeId = chStmt.getLong("art_type_id");
+ ArtifactTypeId artifactType = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
String isValue = chStmt.getString("is_value");
ModificationType modificationType = ModificationType.getMod(chStmt.getInt("mod_type"));
@@ -128,9 +127,8 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
// NEW or DELETED and these changes are not for a specific artifact
if (artModType == ModificationType.MODIFIED && !modifiedArtifacts.contains(artId)) {
- ArtifactChangeBuilder artifactChangeBuilder =
- new ArtifactChangeBuilder(sourceBranch, ArtifactTypeManager.getTypeByGuid(artTypeId), -1, artId,
- txDelta, ModificationType.MODIFIED, !hasBranch);
+ ArtifactChangeBuilder artifactChangeBuilder = new ArtifactChangeBuilder(sourceBranch, artifactType,
+ -1, artId, txDelta, ModificationType.MODIFIED, !hasBranch);
changeBuilders.add(artifactChangeBuilder);
modifiedArtifacts.add(artId);
@@ -140,7 +138,6 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
if (modificationType == ModificationType.MODIFIED && artModType != ModificationType.INTRODUCED) {
modificationType = ModificationType.NEW;
}
- IArtifactType artifactType = ArtifactTypeManager.getTypeByGuid(artTypeId);
AttributeType attributeType = AttributeTypeManager.getTypeByGuid(attrTypeId);
attributeChangeBuilder = new AttributeChangeBuilder(sourceBranch, artifactType, sourceGamma, artId,
txDelta, modificationType, !hasBranch, isValue, "", attrId, attributeType, artModType);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
index 40d4f79783..63dfd8fa67 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
@@ -21,8 +21,8 @@ import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.jdk.core.type.Named;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -227,7 +227,7 @@ public final class Artifacts {
return branchMap;
}
- public static Collection<Artifact> getOfType(IArtifactType artifactType, Collection<? extends Artifact> artifacts) {
+ public static Collection<Artifact> getOfType(ArtifactTypeId artifactType, Collection<? extends Artifact> artifacts) {
List<Artifact> results = new ArrayList<>();
for (Artifact art : artifacts) {
if (art.isOfType(artifactType)) {
@@ -237,7 +237,7 @@ public final class Artifacts {
return results;
}
- public static boolean isOfType(Object object, IArtifactType artifactType) {
+ public static boolean isOfType(Object object, ArtifactTypeId artifactType) {
if (object instanceof Artifact) {
return ((Artifact) object).isOfType(artifactType);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java
index 8b5b2c96b9..5dbb3afa24 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java
@@ -18,9 +18,9 @@ import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.access.PermissionStatus;
@@ -57,7 +57,7 @@ public class ArtifactPromptChangeTest {
private static class MockAccessPolicyHandler implements AccessPolicy {
@Override
- public PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) {
+ public PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends ArtifactTypeId> artifactTypes, PermissionEnum permission, Level level) {
return new PermissionStatus();
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/Artifact.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/Artifact.java
index e106cf2fc6..8e41b76978 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/Artifact.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.orcs.core.internal.artifact;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -31,7 +32,7 @@ public interface Artifact extends ArtifactId, AttributeManager, HasTransaction,
void setName(String name) throws OseeCoreException;
- boolean isOfType(IArtifactType... otherTypes) throws OseeCoreException;
+ boolean isOfType(ArtifactTypeId... otherTypes) throws OseeCoreException;
void setNotDirty();
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
index e627b4406f..920865de08 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.orcs.core.internal.artifact;
import static org.eclipse.osee.framework.core.enums.DirtyState.APPLICABILITY_ONLY;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.BranchId;
@@ -121,7 +122,7 @@ public class ArtifactImpl extends AttributeManagerImpl implements Artifact {
}
@Override
- public boolean isOfType(IArtifactType... otherTypes) throws OseeCoreException {
+ public boolean isOfType(ArtifactTypeId... otherTypes) throws OseeCoreException {
return artifactTypeCache.inheritsFrom(getArtifactType(), otherTypes);
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java
index 338ca02ae1..e8b5358375 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java
@@ -15,6 +15,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
@@ -96,7 +97,7 @@ public class ArtifactReadOnlyImpl extends AbstractProxied<Artifact> implements A
}
@Override
- public boolean isOfType(IArtifactType... otherTypes) throws OseeCoreException {
+ public boolean isOfType(ArtifactTypeId... otherTypes) throws OseeCoreException {
return getProxiedObject().isOfType(otherTypes);
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java
index ce85ea87f0..0bcd87845c 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java
@@ -62,7 +62,7 @@ public class ArtifactTypeIndex extends TokenTypeIndex<IArtifactType, XArtifactTy
return metaData.attributeTypes;
}
- public Collection<IArtifactType> getSuperTypes(IArtifactType artifactType) {
+ public Collection<IArtifactType> getSuperTypes(ArtifactTypeId artifactType) {
ArtifactTypeMetaData metaData = tokenToTypeData.get(artifactType);
return metaData != null ? metaData.getSuperTypes() : Collections.<IArtifactType> emptyList();
}
@@ -76,9 +76,9 @@ public class ArtifactTypeIndex extends TokenTypeIndex<IArtifactType, XArtifactTy
return !getSuperTypes(artType).isEmpty();
}
- public boolean inheritsFrom(IArtifactType thisType, IArtifactType... otherTypes) {
+ public boolean inheritsFrom(ArtifactTypeId thisType, ArtifactTypeId... otherTypes) {
boolean result = false;
- for (IArtifactType otherType : otherTypes) {
+ for (ArtifactTypeId otherType : otherTypes) {
if (inheritsFromSingle(thisType, otherType)) {
result = true;
break;
@@ -87,7 +87,7 @@ public class ArtifactTypeIndex extends TokenTypeIndex<IArtifactType, XArtifactTy
return result;
}
- private boolean inheritsFromSingle(IArtifactType thisType, IArtifactType otherType) {
+ private boolean inheritsFromSingle(ArtifactTypeId thisType, ArtifactTypeId otherType) {
boolean result = false;
if (thisType.equals(otherType)) {
result = true;
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java
index f00a7f07f6..f2b47f2b94 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java
@@ -82,7 +82,7 @@ public class ArtifactTypesImpl implements ArtifactTypes {
}
@Override
- public boolean inheritsFrom(IArtifactType thisType, IArtifactType... otherTypes) throws OseeCoreException {
+ public boolean inheritsFrom(ArtifactTypeId thisType, ArtifactTypeId... otherTypes) throws OseeCoreException {
Conditions.checkNotNull(thisType, "thisArtifactType");
Conditions.checkNotNull(otherTypes, "otherArtifactTypes");
return getArtifactTypesIndex().inheritsFrom(thisType, otherTypes);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java
index b8abe589b3..a578934189 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.orcs.db.internal.search.handlers;
import java.util.Collection;
-import java.util.HashSet;
import java.util.List;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -33,7 +32,6 @@ public class ArtifactTypeSqlHandler extends SqlHandler<CriteriaArtifactType> {
private String artAlias;
private String txsAlias;
private AbstractJoinQuery joinQuery;
- private Collection<Long> typeIds;
private List<String> artAliases;
private List<String> txsAliases;
@@ -48,8 +46,8 @@ public class ArtifactTypeSqlHandler extends SqlHandler<CriteriaArtifactType> {
@Override
public void addTables(AbstractSqlWriter writer) throws OseeCoreException {
- typeIds = getLocalTypeIds();
- if (typeIds.size() > 1) {
+ Collection<? extends ArtifactTypeId> types = criteria.getTypes();
+ if (types.size() > 1) {
jIdAlias = writer.addTable(TableEnum.ID_JOIN_TABLE);
}
@@ -68,20 +66,11 @@ public class ArtifactTypeSqlHandler extends SqlHandler<CriteriaArtifactType> {
txsAliases = writer.getAliases(TableEnum.TXS_TABLE);
}
- private Collection<Long> getLocalTypeIds() throws OseeCoreException {
- Collection<? extends ArtifactTypeId> types = criteria.getTypes();
- Collection<Long> toReturn = new HashSet<>();
- for (ArtifactTypeId type : types) {
- toReturn.add(type.getId());
- }
- return toReturn;
- }
-
@Override
public boolean addPredicates(AbstractSqlWriter writer) throws OseeCoreException {
-
- if (typeIds.size() > 1) {
- joinQuery = writer.writeIdJoin(typeIds);
+ Collection<? extends ArtifactTypeId> types = criteria.getTypes();
+ if (types.size() > 1) {
+ joinQuery = writer.writeJoin(types);
writer.write(jIdAlias);
writer.write(".query_id = ?");
writer.addParameter(joinQuery.getQueryId());
@@ -101,14 +90,14 @@ public class ArtifactTypeSqlHandler extends SqlHandler<CriteriaArtifactType> {
}
}
} else {
- long localId = typeIds.iterator().next();
+ ArtifactTypeId artifactType = types.iterator().next();
int aSize = artAliases.size();
for (int index = 0; index < aSize; index++) {
String artAlias = artAliases.get(index);
writer.write(artAlias);
writer.write(".art_type_id = ?");
- writer.addParameter(localId);
+ writer.addParameter(artifactType);
if (index + 1 < aSize) {
writer.write(" AND ");
}
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java
index 668a8b383b..8b41cf29d2 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java
@@ -13,11 +13,10 @@ package org.eclipse.osee.orcs.data;
import java.util.Collection;
import java.util.List;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
-import org.eclipse.osee.framework.core.data.IArtifactType;
-import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.RelationTypeId;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.TransactionId;
@@ -34,7 +33,7 @@ public interface ArtifactReadable extends ArtifactToken, HasTransaction, OrcsRea
TransactionId getLastModifiedTransaction();
- boolean isOfType(IArtifactType... otherTypes) throws OseeCoreException;
+ boolean isOfType(ArtifactTypeId... otherTypes) throws OseeCoreException;
////////////////////
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java
index e7215e5f07..f02d504dd5 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java
@@ -36,7 +36,7 @@ public interface ArtifactTypes extends IdCollection<IArtifactType> {
boolean isAbstract(IArtifactType artType) throws OseeCoreException;
- boolean inheritsFrom(IArtifactType artType, IArtifactType... otherTypes) throws OseeCoreException;
+ boolean inheritsFrom(ArtifactTypeId artType, ArtifactTypeId... otherTypes) throws OseeCoreException;
Map<BranchId, Collection<AttributeTypeToken>> getAllAttributeTypes(IArtifactType artType) throws OseeCoreException;

Back to the top