Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactNameComparator.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java57
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ISelectedArtifact.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java27
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java38
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/operation/UpdateBranchOperation.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ISearchPrimitive.java1
13 files changed, 76 insertions, 95 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java
index 44e07e8472f..8006a78a745 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java
@@ -18,7 +18,6 @@ import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
import org.eclipse.osee.framework.core.exception.MultipleArtifactsExist;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
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 7bf5abbd33f..89861e23a84 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
@@ -160,7 +160,7 @@ public final class ArtifactLoader {
}
} else {
// artifact is in the cache, do not load it
- if (!active.isDeleted() || (active.isDeleted() && allowDeleted == DeletionFlag.INCLUDE_DELETED)) {
+ if (!active.isDeleted() || active.isDeleted() && allowDeleted == DeletionFlag.INCLUDE_DELETED) {
artifacts.add(active);
}
doNotLoad = true;
@@ -208,7 +208,8 @@ public final class ArtifactLoader {
// assumption: sql is returning rows ordered by branch_id, art_id, transaction_id in descending order
if (previousArtId != artId || previousBranchId != branchUuid) {
// assumption: sql is returning unwanted deleted artifacts only in the historical case
- if (!historical || allowDeleted == DeletionFlag.INCLUDE_DELETED || ModificationType.getMod(chStmt.getInt("mod_type")) != ModificationType.DELETED) {
+ if (!historical || allowDeleted == DeletionFlag.INCLUDE_DELETED || ModificationType.getMod(
+ chStmt.getInt("mod_type")) != ModificationType.DELETED) {
Artifact shallowArtifact = retrieveShallowArtifact(chStmt, reload, historical);
loadedItems.add(shallowArtifact);
}
@@ -317,9 +318,8 @@ public final class ArtifactLoader {
ArtifactFactory factory = ArtifactTypeManager.getFactory(artifactType);
artifact =
- factory.loadExisitingArtifact(artifactId, chStmt.getString("guid"), artifactType,
- chStmt.getInt("gamma_id"), branch, transactionId, ModificationType.getMod(chStmt.getInt("mod_type")),
- historical);
+ factory.loadExisitingArtifact(artifactId, chStmt.getString("guid"), artifactType, chStmt.getInt("gamma_id"),
+ branch, transactionId, ModificationType.getMod(chStmt.getInt("mod_type")), historical);
}
if (reload == LoadType.RELOAD_CACHE) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactNameComparator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactNameComparator.java
index 5c4fe9c29c5..afadceea47a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactNameComparator.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactNameComparator.java
@@ -34,7 +34,7 @@ public class ArtifactNameComparator implements Comparator<IArtifact> {
if (numberMatcher.matches()) {
numberMatcher.reset(name2);
if (numberMatcher.matches()) {
- if ((name1.length() < NUMBER_STRING_LIMIT) && (name2.length() < NUMBER_STRING_LIMIT)) {
+ if (name1.length() < NUMBER_STRING_LIMIT && name2.length() < NUMBER_STRING_LIMIT) {
if (descending) {
return Long.valueOf(name2).compareTo(Long.valueOf(name1));
} else {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java
index ab3115b0e54..36db382b1c7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java
@@ -153,13 +153,11 @@ public class AttributeLoader {
// Do not warn about skipping on historical loading, because the most recent
// transaction is used first due to sorting on the query
if (!historical) {
- OseeLog.logf(
- ArtifactLoader.class,
- Level.WARNING,
+ OseeLog.logf(ArtifactLoader.class, Level.WARNING,
- "multiple attribute version for attribute id [%d] artifact id[%d] branch[%d] previousGammaId[%s] currentGammaId[%s] previousModType[%s] currentModType[%s]",
- current.attrId, current.artifactId, current.branchUuid, previous.gammaId, current.gammaId,
- previous.modType, current.modType);
+ "multiple attribute version for attribute id [%d] artifact id[%d] branch[%d] previousGammaId[%s] currentGammaId[%s] previousModType[%s] currentModType[%s]",
+ current.attrId, current.artifactId, current.branchUuid, previous.gammaId, current.gammaId, previous.modType,
+ current.modType);
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
index f2bdb152b98..bdc73fe1c1e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
@@ -172,9 +172,8 @@ public class BranchManager {
int assocArtId = chStmt.getInt("associated_art_id");
int inheritAccessControl = chStmt.getInt("inherit_access_control");
- Branch created =
- branchFactory.createOrUpdate(getCache(), branchUuid, branchName, branchType, branchState,
- archiveState.isArchived(), StorageState.LOADED, inheritAccessControl == 1);
+ Branch created = branchFactory.createOrUpdate(getCache(), branchUuid, branchName, branchType, branchState,
+ archiveState.isArchived(), StorageState.LOADED, inheritAccessControl == 1);
created.setBaseTransaction(TransactionManager.getTransactionId(baseTx));
created.setSourceTransaction(TransactionManager.getTransactionId(sourceTx));
created.setAssociatedArtifactId(assocArtId);
@@ -357,9 +356,8 @@ public class BranchManager {
}
private static void runCommitExtPointActions(ConflictManagerExternal conflictManager) throws OseeCoreException {
- ExtensionDefinedObjects<CommitAction> extensions =
- new ExtensionDefinedObjects<CommitAction>("org.eclipse.osee.framework.skynet.core.CommitActions",
- "CommitActions", "className");
+ ExtensionDefinedObjects<CommitAction> extensions = new ExtensionDefinedObjects<CommitAction>(
+ "org.eclipse.osee.framework.skynet.core.CommitActions", "CommitActions", "className");
for (CommitAction commitAction : extensions.getObjects()) {
commitAction.runCommitAction(conflictManager.getSourceBranch(), conflictManager.getDestinationBranch());
}
@@ -374,9 +372,8 @@ public class BranchManager {
if (mergeBranch == null) {
mergeBranch = createMergeBranch(sourceBranch, destBranch, expectedArtIds);
} else {
- UpdateMergeBranch op =
- new UpdateMergeBranch(ConnectionHandler.getJdbcClient(), mergeBranch, expectedArtIds, destBranch,
- sourceBranch);
+ UpdateMergeBranch op = new UpdateMergeBranch(ConnectionHandler.getJdbcClient(), mergeBranch, expectedArtIds,
+ destBranch, sourceBranch);
Operations.executeWorkAndCheckStatus(op);
}
return mergeBranch;
@@ -392,13 +389,11 @@ public class BranchManager {
joinQuery.store();
int parentTxId = sourceBranch.getBaseTransaction().getId();
- String creationComment =
- String.format("New Merge Branch from %s(%s) and %s", sourceBranch.getName(), parentTxId,
- destBranch.getName());
+ String creationComment = String.format("New Merge Branch from %s(%s) and %s", sourceBranch.getName(),
+ parentTxId, destBranch.getName());
String branchName = "Merge " + sourceBranch.getShortName() + " <=> " + destBranch.getShortName();
- mergeBranch =
- (MergeBranch) createBranch(BranchType.MERGE, sourceBranch.getBaseTransaction(), branchName,
- Lib.generateUuid(), UserManager.getUser(), creationComment, joinQuery.getQueryId(), destBranch.getUuid());
+ mergeBranch = (MergeBranch) createBranch(BranchType.MERGE, sourceBranch.getBaseTransaction(), branchName,
+ Lib.generateUuid(), UserManager.getUser(), creationComment, joinQuery.getQueryId(), destBranch.getUuid());
mergeBranch.setSourceBranch(sourceBranch);
mergeBranch.setDestinationBranch(destBranch);
} finally {
@@ -413,9 +408,8 @@ public class BranchManager {
public static Branch createWorkingBranch(TransactionRecord parentTransactionId, String childBranchName, Long childBranchUuid, Artifact associatedArtifact) throws OseeCoreException {
Conditions.notNull(childBranchUuid, "childBranchUuid");
- String creationComment =
- String.format("New Branch from %s (%s)", parentTransactionId.getBranch().getName(),
- parentTransactionId.getId());
+ String creationComment = String.format("New Branch from %s (%s)", parentTransactionId.getBranch().getName(),
+ parentTransactionId.getId());
final String truncatedName = Strings.truncate(childBranchName, 195, true);
return createBranch(BranchType.WORKING, parentTransactionId, truncatedName, childBranchUuid, associatedArtifact,
@@ -426,30 +420,26 @@ public class BranchManager {
* Creates a new Branch based on the most recent transaction on the parent branch.
*/
public static Branch createWorkingBranchFromTx(TransactionRecord parentTransactionId, String childBranchName, Artifact associatedArtifact) throws OseeCoreException {
- String creationComment =
- String.format("New branch, copy of %s from transaction %s", parentTransactionId.getBranch().getName(),
- parentTransactionId.getId());
+ String creationComment = String.format("New branch, copy of %s from transaction %s",
+ parentTransactionId.getBranch().getName(), parentTransactionId.getId());
final String truncatedName = Strings.truncate(childBranchName, 195, true);
- CreateBranchHttpRequestOperation operation =
- new CreateBranchHttpRequestOperation(BranchType.WORKING, parentTransactionId, truncatedName,
- Lib.generateUuid(), associatedArtifact, creationComment, -1, -1);
+ CreateBranchHttpRequestOperation operation = new CreateBranchHttpRequestOperation(BranchType.WORKING,
+ parentTransactionId, truncatedName, Lib.generateUuid(), associatedArtifact, creationComment, -1, -1);
operation.setTxCopyBranchType(true);
Operations.executeWorkAndCheckStatus(operation);
return operation.getNewBranch();
}
public static Branch createPortBranchFromTx(TransactionRecord parentTransactionId, String childBranchName, Artifact associatedArtifact) throws OseeCoreException {
- String creationComment =
- String.format("New port branch, copy of %s from transaction %s", parentTransactionId.getBranch().getName(),
- parentTransactionId.getId());
+ String creationComment = String.format("New port branch, copy of %s from transaction %s",
+ parentTransactionId.getBranch().getName(), parentTransactionId.getId());
final String truncatedName = Strings.truncate(childBranchName, 195, true);
- CreateBranchHttpRequestOperation operation =
- new CreateBranchHttpRequestOperation(BranchType.PORT, parentTransactionId, truncatedName, Lib.generateUuid(),
- associatedArtifact, creationComment, -1, -1);
+ CreateBranchHttpRequestOperation operation = new CreateBranchHttpRequestOperation(BranchType.PORT,
+ parentTransactionId, truncatedName, Lib.generateUuid(), associatedArtifact, creationComment, -1, -1);
operation.setTxCopyBranchType(true);
Operations.executeWorkAndCheckStatus(operation);
return operation.getNewBranch();
@@ -491,9 +481,8 @@ public class BranchManager {
}
private static Branch createBranch(BranchType branchType, TransactionRecord parentTransaction, String branchName, long branchUuid, Artifact associatedArtifact, String creationComment, int mergeAddressingQueryId, long destinationBranchId) throws OseeCoreException {
- CreateBranchHttpRequestOperation operation =
- new CreateBranchHttpRequestOperation(branchType, parentTransaction, branchName, branchUuid,
- associatedArtifact, creationComment, mergeAddressingQueryId, destinationBranchId);
+ CreateBranchHttpRequestOperation operation = new CreateBranchHttpRequestOperation(branchType, parentTransaction,
+ branchName, branchUuid, associatedArtifact, creationComment, mergeAddressingQueryId, destinationBranchId);
Operations.executeWorkAndCheckStatus(operation);
return operation.getNewBranch();
}
@@ -638,7 +627,7 @@ public class BranchManager {
public static BranchType getBranchType(IOseeBranch branch) {
return ((Branch) branch).getBranchType();
}
-
+
public static boolean isEditable(IOseeBranch branch) {
return getBranch(branch).isEditable();
}
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 d04e016553e..f56a611e458 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
@@ -207,7 +207,8 @@ public class ChangeArtifactType {
private void deleteInvalidRelations(Artifact artifact, IArtifactType artifactType) throws OseeCoreException {
for (RelationLink link : artifact.getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) {
- if (RelationTypeManager.getRelationSideMax(link.getRelationType(), artifactType, link.getSide(artifact)) == 0) {
+ if (RelationTypeManager.getRelationSideMax(link.getRelationType(), artifactType,
+ link.getSide(artifact)) == 0) {
link.delete(false);
relationTypes.add(link.getRelationType());
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ISelectedArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ISelectedArtifact.java
index b7e72c9602c..48301062913 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ISelectedArtifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ISelectedArtifact.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.artifact;
-
public interface ISelectedArtifact {
public Artifact getSelectedArtifact();
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java
index 5934827c461..16ebc28f54d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java
@@ -88,7 +88,8 @@ public class IntroduceArtifactOperation {
if (!sourceArtifact.isHistorical()) {
introduceRelations(sourceArtifact, destinationArtifact);
try {
- if (sourceArtifact.hasParent() && !destinationArtifact.hasParent() && !sourceArtifacts.contains(sourceArtifact.getParent())) {
+ if (sourceArtifact.hasParent() && !destinationArtifact.hasParent() && !sourceArtifacts.contains(
+ sourceArtifact.getParent())) {
fosterParent.addChild(destinationArtifact);
}
} catch (MultipleArtifactsExist ex) {
@@ -116,17 +117,17 @@ public class IntroduceArtifactOperation {
private void introduceAttribute(Attribute<?> sourceAttribute, Artifact destinationArtifact) throws OseeDataStoreException, OseeCoreException {
if (sourceAttribute.isDirty()) {
- throw new OseeArgumentException(
- "The un-persisted attribute [%s] can not be introduced until it is persisted.", sourceAttribute);
+ throw new OseeArgumentException("The un-persisted attribute [%s] can not be introduced until it is persisted.",
+ sourceAttribute);
} else if (sourceAttribute.isInDb()) {
Attribute<?> destinationAttribute = destinationArtifact.getAttributeById(sourceAttribute.getId(), true);
if (destinationAttribute == null) {
- destinationArtifact.internalInitializeAttribute(sourceAttribute.getAttributeType(),
- sourceAttribute.getId(), sourceAttribute.getGammaId(), sourceAttribute.getModificationType(), true,
+ destinationArtifact.internalInitializeAttribute(sourceAttribute.getAttributeType(), sourceAttribute.getId(),
+ sourceAttribute.getGammaId(), sourceAttribute.getModificationType(), true,
sourceAttribute.getAttributeDataProvider().getData()).internalSetModType(
- sourceAttribute.getModificationType(), true, true);
+ sourceAttribute.getModificationType(), true, true);
} else {
destinationAttribute.introduce(sourceAttribute);
}
@@ -149,19 +150,17 @@ public class IntroduceArtifactOperation {
throw new OseeArgumentException("The un-persisted relation [%s] can not be introduced until it is persisted.",
sourceRelation);
} else if (sourceRelation.isInDb()) {
- RelationLink destinationRelation =
- RelationManager.getLoadedRelationById(sourceRelation.getId(), sourceRelation.getAArtifactId(),
- sourceRelation.getBArtifactId(), destinationBranch);
+ RelationLink destinationRelation = RelationManager.getLoadedRelationById(sourceRelation.getId(),
+ sourceRelation.getAArtifactId(), sourceRelation.getBArtifactId(), destinationBranch);
if (destinationRelation == null) {
int aArtifactId = sourceRelation.getAArtifactId();
int bArtifactId = sourceRelation.getBArtifactId();
if (doesRelatedArtifactExist(destinationArtifact, aArtifactId, bArtifactId)) {
ModificationType modType = sourceRelation.getModificationType();
- destinationRelation =
- RelationManager.getOrCreate(aArtifactId, bArtifactId, destinationBranch,
- sourceRelation.getRelationType(), sourceRelation.getId(), sourceRelation.getGammaId(),
- sourceRelation.getRationale(), modType);
+ destinationRelation = RelationManager.getOrCreate(aArtifactId, bArtifactId, destinationBranch,
+ sourceRelation.getRelationType(), sourceRelation.getId(), sourceRelation.getGammaId(),
+ sourceRelation.getRationale(), modType);
destinationRelation.internalSetModType(modType, true, true);
}
} else {
@@ -173,7 +172,7 @@ public class IntroduceArtifactOperation {
private void removeNewAttributesFromDestination(Artifact sourceArtifact, Artifact destinationArtifact) throws OseeCoreException {
List<Attribute<?>> destAttributes = destinationArtifact.getAttributes(true);
- // since introduce is 'replacing' the destination artifact with the source artifact,
+ // since introduce is 'replacing' the destination artifact with the source artifact,
// any new attributes from the destination artifact should be removed/deleted.
for (Attribute<?> destAttribute : destAttributes) {
Attribute<?> attribute = sourceArtifact.getAttributeById(destAttribute.getId(), true);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java
index ff8152d57ec..4a4e013e58d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java
@@ -38,12 +38,11 @@ import org.eclipse.osee.jdbc.JdbcStatement;
*/
public class UpdateMergeBranch extends AbstractDbTxOperation {
- private static final String TX_CURRENT_SETTINGS =
- "CASE" + //
- " WHEN txs1.mod_type = " + ModificationType.DELETED.getValue() + " THEN " + TxChange.DELETED.getValue() + //
- " WHEN txs1.mod_type = " + ModificationType.ARTIFACT_DELETED.getValue() + " THEN " + TxChange.ARTIFACT_DELETED.getValue() + //
- " ELSE " + TxChange.CURRENT.getValue() + //
- " END";
+ private static final String TX_CURRENT_SETTINGS = "CASE" + //
+ " WHEN txs1.mod_type = " + ModificationType.DELETED.getValue() + " THEN " + TxChange.DELETED.getValue() + //
+ " WHEN txs1.mod_type = " + ModificationType.ARTIFACT_DELETED.getValue() + " THEN " + TxChange.ARTIFACT_DELETED.getValue() + //
+ " ELSE " + TxChange.CURRENT.getValue() + //
+ " END";
private static final String UPDATE_ARTIFACTS =
"INSERT INTO osee_txs (transaction_id, gamma_id, mod_type, tx_current, branch_id) SELECT ?, txs1.gamma_id, txs1.mod_type, " + TX_CURRENT_SETTINGS + ", ? FROM osee_attribute attr1, osee_txs txs1 WHERE attr1.art_id = ? AND txs1.gamma_id = attr1.gamma_id AND txs1.branch_id = ? AND txs1.tx_current <> ? AND NOT EXISTS (SELECT 'x' FROM osee_txs txs2, osee_attribute attr2 WHERE txs2.branch_id = ? AND txs2.transaction_id = ? AND txs2.gamma_id = attr2.gamma_id AND attr2.attr_id = attr1.attr_id)";
@@ -101,8 +100,8 @@ public class UpdateMergeBranch extends AbstractDbTxOperation {
}
}
if (DEBUG) {
- System.out.println(String.format(" Deleting %d Damaged Artifacts took %s", count,
- Lib.getElapseString(time)));
+ System.out.println(
+ String.format(" Deleting %d Damaged Artifacts took %s", count, Lib.getElapseString(time)));
time = System.currentTimeMillis();
count = 0;
}
@@ -118,8 +117,8 @@ public class UpdateMergeBranch extends AbstractDbTxOperation {
}
}
if (DEBUG) {
- System.out.println(String.format(" Deleting %d unused Artifacts took %s", count,
- Lib.getElapseString(time)));
+ System.out.println(
+ String.format(" Deleting %d unused Artifacts took %s", count, Lib.getElapseString(time)));
time = System.currentTimeMillis();
count = 0;
}
@@ -127,10 +126,9 @@ public class UpdateMergeBranch extends AbstractDbTxOperation {
//Copy over any missing attributes
int baselineTransaction = mergeBranch.getBaseTransaction().getId();
for (Artifact artifact : goodMergeBranchArtifacts) {
- numberAttrUpdated +=
- getJdbcClient().runPreparedUpdate(connection, UPDATE_ARTIFACTS, baselineTransaction, mergeBranch.getUuid(),
- artifact.getArtId(), sourceBranch.getUuid(), TxChange.NOT_CURRENT.getValue(), mergeBranch.getUuid(),
- baselineTransaction);
+ numberAttrUpdated += getJdbcClient().runPreparedUpdate(connection, UPDATE_ARTIFACTS, baselineTransaction,
+ mergeBranch.getUuid(), artifact.getArtId(), sourceBranch.getUuid(), TxChange.NOT_CURRENT.getValue(),
+ mergeBranch.getUuid(), baselineTransaction);
}
if (DEBUG) {
System.out.println(String.format(" Adding %d Attributes to Existing Artifacts took %s",
@@ -170,13 +168,13 @@ public class UpdateMergeBranch extends AbstractDbTxOperation {
try {
joinQuery.store(connection);
Integer startTransactionNumber = mergeBranch.getBaseTransaction().getId();
- insertGammas(connection, INSERT_ATTRIBUTE_GAMMAS, startTransactionNumber, joinQuery.getQueryId(),
- sourceBranch, mergeBranch);
+ insertGammas(connection, INSERT_ATTRIBUTE_GAMMAS, startTransactionNumber, joinQuery.getQueryId(), sourceBranch,
+ mergeBranch);
insertGammas(connection, INSERT_ARTIFACT_GAMMAS, startTransactionNumber, joinQuery.getQueryId(), sourceBranch,
mergeBranch);
} catch (OseeCoreException ex) {
- throw new OseeCoreException("Source Branch %s Artifact Ids: %s", sourceBranch.getUuid(), Collections.toString(
- ",", artIds));
+ throw new OseeCoreException("Source Branch %s Artifact Ids: %s", sourceBranch.getUuid(),
+ Collections.toString(",", artIds));
} finally {
joinQuery.delete(connection);
}
@@ -198,8 +196,8 @@ public class UpdateMergeBranch extends AbstractDbTxOperation {
artSet.add(chStmt.getInt("art_id"));
}
if (DEBUG) {
- System.out.println(String.format(
- " Getting Artifacts that are on the Merge Branch Completed in %s", Lib.getElapseString(time)));
+ System.out.println(String.format(" Getting Artifacts that are on the Merge Branch Completed in %s",
+ Lib.getElapseString(time)));
time = System.currentTimeMillis();
}
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 f4b998ca835..9f0b9d11a42 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
@@ -43,12 +43,10 @@ public final class ArtifactFactoryManager {
if (responsibleFactory == null) {
responsibleFactory = factory;
} else {
- OseeLog.logf(
- Activator.class,
- Level.SEVERE,
-
- "Multiple ArtifactFactories [%s] [%s]responsible for same artifact type [%s]. Defaulting to DefaultArtifactFactory.",
- responsibleFactory, factory, artifactType);
+ OseeLog.logf(Activator.class, Level.SEVERE,
+
+ "Multiple ArtifactFactories [%s] [%s]responsible for same artifact type [%s]. Defaulting to DefaultArtifactFactory.",
+ responsibleFactory, factory, artifactType);
return getDefaultArtifactFactory();
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/operation/UpdateBranchOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/operation/UpdateBranchOperation.java
index bc028504447..57bb3314639 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/operation/UpdateBranchOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/operation/UpdateBranchOperation.java
@@ -45,7 +45,8 @@ public class UpdateBranchOperation extends AbstractOperation {
@Override
protected void doWork(IProgressMonitor monitor) throws Exception {
// Only update if there are no other Merge Branches and we haven't committed this branch already
- if (originalBranch != null && !BranchManager.hasMergeBranches(originalBranch) && !originalBranch.getBranchState().isCommitted()) {
+ if (originalBranch != null && !BranchManager.hasMergeBranches(
+ originalBranch) && !originalBranch.getBranchState().isCommitted()) {
performUpdate(monitor, originalBranch);
}
}
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 48ab3f7d7e8..4eb1b749f00 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
@@ -189,7 +189,8 @@ public class ArtifactQueryBuilder {
}
private boolean useServerSearch() {
- return (Conditions.hasValues(artifactTypes) || guid != null || Conditions.hasValues(guids) || criteria.length > 0 || (artifactId == 0 && !Conditions.hasValues(artifactIds)));
+ return Conditions.hasValues(artifactTypes) || guid != null || Conditions.hasValues(
+ guids) || criteria.length > 0 || artifactId == 0 && !Conditions.hasValues(artifactIds);
}
private QueryBuilder getQueryBuilder() throws OseeCoreException {
@@ -426,9 +427,8 @@ public class ArtifactQueryBuilder {
} else {
tx = TransactionManager.getTransactionId(txId);
}
- List<Artifact> results =
- ArtifactLoader.loadArtifacts(localIds, branch, LoadLevel.ARTIFACT_DATA, LoadType.INCLUDE_CACHE,
- allowDeleted, tx);
+ List<Artifact> results = ArtifactLoader.loadArtifacts(localIds, branch, LoadLevel.ARTIFACT_DATA,
+ LoadType.INCLUDE_CACHE, allowDeleted, tx);
return results.size();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ISearchPrimitive.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ISearchPrimitive.java
index fab892234cc..862f00dc879 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ISearchPrimitive.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ISearchPrimitive.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.artifact.search;
-
public interface ISearchPrimitive {
/**

Back to the top