diff options
author | jphillips | 2008-04-29 21:43:41 +0000 |
---|---|---|
committer | jphillips | 2008-04-29 21:43:41 +0000 |
commit | 1bb57e11396d15c44747b6cf403676a3b27459ae (patch) | |
tree | ee5b56a2f4904c73715ddd81f05713a81a42c65d | |
parent | f896ff7bb65d0c1c5f521ce8bf35feb6b6430ab4 (diff) | |
download | org.eclipse.osee-1bb57e11396d15c44747b6cf403676a3b27459ae.tar.gz org.eclipse.osee-1bb57e11396d15c44747b6cf403676a3b27459ae.tar.xz org.eclipse.osee-1bb57e11396d15c44747b6cf403676a3b27459ae.zip |
3 files changed, 61 insertions, 40 deletions
diff --git a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/ArtifactTransactionData.java b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/ArtifactTransactionData.java index 4b41e7384f9..db95b5b9961 100644 --- a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/ArtifactTransactionData.java +++ b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/ArtifactTransactionData.java @@ -45,6 +45,25 @@ public class ArtifactTransactionData implements ITransactionData { this.modificationType = modificationType; this.artifact = artifact; this.branch = branch; + + populateDataList(); + } + + /** + * + */ + private void populateDataList() { + dataItems.add(SQL3DataType.INTEGER); + dataItems.add(artifact.getArtId()); + dataItems.add(SQL3DataType.INTEGER); + dataItems.add(gammaId); + dataItems.add(SQL3DataType.INTEGER); + dataItems.add(modificationType.getValue()); + + notCurrentDataItems.add(SQL3DataType.INTEGER); + notCurrentDataItems.add(branch.getBranchId()); + notCurrentDataItems.add(SQL3DataType.INTEGER); + notCurrentDataItems.add(artifact.getArtId()); } /* (non-Javadoc) @@ -60,13 +79,6 @@ public class ArtifactTransactionData implements ITransactionData { * @see org.eclipse.osee.framework.skynet.core.transaction.TransactionData#getTransactionChangeData() */ public List<Object> getTransactionChangeData() { - dataItems.add(SQL3DataType.INTEGER); - dataItems.add(artifact.getArtId()); - dataItems.add(SQL3DataType.INTEGER); - dataItems.add(gammaId); - dataItems.add(SQL3DataType.INTEGER); - dataItems.add(modificationType.getValue()); - return dataItems; } @@ -137,11 +149,6 @@ public class ArtifactTransactionData implements ITransactionData { */ @Override public List<Object> getPreviousTxNotCurrentData() { - notCurrentDataItems.add(SQL3DataType.INTEGER); - notCurrentDataItems.add(branch.getBranchId()); - notCurrentDataItems.add(SQL3DataType.INTEGER); - notCurrentDataItems.add(artifact.getArtId()); - return notCurrentDataItems; } } diff --git a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/AttributeTransactionData.java b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/AttributeTransactionData.java index 2cc2f1d57b5..84ecaa39709 100644 --- a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/AttributeTransactionData.java +++ b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/AttributeTransactionData.java @@ -53,19 +53,14 @@ public class AttributeTransactionData implements ITransactionData { this.content = content; this.modificationType = modificationType; this.branch = branch; - } - /* (non-Javadoc) - * @see org.eclipse.osee.framework.skynet.core.transaction.TransactionData#getTransactionChangeSql() - */ - public String getTransactionChangeSql() { - return INSERT_ATTRIBUTE; + populateDataList(); } - /* (non-Javadoc) - * @see org.eclipse.osee.framework.skynet.core.transaction.TransactionData#getTransactionChangeData() + /** + * */ - public List<Object> getTransactionChangeData() { + private void populateDataList() { dataItems.add(SQL3DataType.INTEGER); dataItems.add(artId); dataItems.add(SQL3DataType.INTEGER); @@ -81,6 +76,23 @@ public class AttributeTransactionData implements ITransactionData { dataItems.add(SQL3DataType.INTEGER); dataItems.add(modificationType.getValue()); + notCurrentDataItems.add(SQL3DataType.INTEGER); + notCurrentDataItems.add(branch.getBranchId()); + notCurrentDataItems.add(SQL3DataType.INTEGER); + notCurrentDataItems.add(attrId); + } + + /* (non-Javadoc) + * @see org.eclipse.osee.framework.skynet.core.transaction.TransactionData#getTransactionChangeSql() + */ + public String getTransactionChangeSql() { + return INSERT_ATTRIBUTE; + } + + /* (non-Javadoc) + * @see org.eclipse.osee.framework.skynet.core.transaction.TransactionData#getTransactionChangeData() + */ + public List<Object> getTransactionChangeData() { return dataItems; } @@ -143,11 +155,6 @@ public class AttributeTransactionData implements ITransactionData { */ @Override public List<Object> getPreviousTxNotCurrentData() { - notCurrentDataItems.add(SQL3DataType.INTEGER); - notCurrentDataItems.add(branch.getBranchId()); - notCurrentDataItems.add(SQL3DataType.INTEGER); - notCurrentDataItems.add(attrId); - return notCurrentDataItems; } diff --git a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/RelationTransactionData.java b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/RelationTransactionData.java index c56299143aa..578f81e4903 100644 --- a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/RelationTransactionData.java +++ b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/data/RelationTransactionData.java @@ -45,19 +45,14 @@ public class RelationTransactionData implements ITransactionData { this.transactionId = transactionId; this.modificationType = modificationType; this.branch = branch; - } - /* (non-Javadoc) - * @see org.eclipse.osee.framework.skynet.core.transaction.ITransactionData#getTransactionChangeSql() - */ - public String getTransactionChangeSql() { - return INSERT_INTO_RELATION_TABLE; + populateDataList(); } - /* (non-Javadoc) - * @see org.eclipse.osee.framework.skynet.core.transaction.ITransactionData#getTransactionChangeData() + /** + * */ - public List<Object> getTransactionChangeData() { + private void populateDataList() { dataItems.add(SQL3DataType.INTEGER); dataItems.add(link.getPersistenceMemo().getLinkId()); dataItems.add(SQL3DataType.INTEGER); @@ -77,6 +72,23 @@ public class RelationTransactionData implements ITransactionData { dataItems.add(SQL3DataType.INTEGER); dataItems.add(modificationType.getValue()); + notCurrentDataItems.add(SQL3DataType.INTEGER); + notCurrentDataItems.add(branch.getBranchId()); + notCurrentDataItems.add(SQL3DataType.INTEGER); + notCurrentDataItems.add(link.getPersistenceMemo().getLinkId()); + } + + /* (non-Javadoc) + * @see org.eclipse.osee.framework.skynet.core.transaction.ITransactionData#getTransactionChangeSql() + */ + public String getTransactionChangeSql() { + return INSERT_INTO_RELATION_TABLE; + } + + /* (non-Javadoc) + * @see org.eclipse.osee.framework.skynet.core.transaction.ITransactionData#getTransactionChangeData() + */ + public List<Object> getTransactionChangeData() { return dataItems; } @@ -132,11 +144,6 @@ public class RelationTransactionData implements ITransactionData { */ @Override public List<Object> getPreviousTxNotCurrentData() { - notCurrentDataItems.add(SQL3DataType.INTEGER); - notCurrentDataItems.add(branch.getBranchId()); - notCurrentDataItems.add(SQL3DataType.INTEGER); - notCurrentDataItems.add(link.getPersistenceMemo().getLinkId()); - return notCurrentDataItems; } |