Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2016-06-29 17:48:48 -0400
committerRyan D. Brooks2016-07-29 02:18:20 -0400
commit05ac0786c30885cf11f1c9e78ba69a5ea8ce65cc (patch)
tree62cbf48228ed120e5e553f12eeadb324235abaf7 /plugins/org.eclipse.osee.orcs.db.test
parent2331c622a566f15b2496802d8bdce3f088cb5fc0 (diff)
downloadorg.eclipse.osee-05ac0786c30885cf11f1c9e78ba69a5ea8ce65cc.tar.gz
org.eclipse.osee-05ac0786c30885cf11f1c9e78ba69a5ea8ce65cc.tar.xz
org.eclipse.osee-05ac0786c30885cf11f1c9e78ba69a5ea8ce65cc.zip
feature: Add ability to set Applicability on Orcs Ojbects
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.db.test')
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java362
1 files changed, 191 insertions, 171 deletions
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java
index 71f4887c11..adacf50fb7 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java
@@ -64,7 +64,7 @@ import org.mockito.stubbing.Answer;
/**
* Test Case for {@link DataLoaderFactoryImpl}
- *
+ *
* @author Roberto E. Escobar
*/
public class DataLoaderFactoryImplTest {
@@ -74,22 +74,22 @@ public class DataLoaderFactoryImplTest {
@Mock private JdbcClient jdbcClient;
@Mock private JdbcStatement chStmt;
-
+
@Mock private IdentityManager identityService;
@Mock private SqlProvider sqlProvider;
-
+
@Mock private LoadDataHandler builder;
-
+
@Mock private OrcsObjectFactory rowDataFactory;
@Mock private HasCancellation cancellation;
@Mock private SqlJoinFactory joinFactory;
@Mock private IJoinAccessor joinAccessor;
-
+
@Captor private ArgumentCaptor<LoadSqlContext> contextCaptor;
@Captor private ArgumentCaptor<ArtifactJoinQuery> joinCaptor;
@Captor private ArgumentCaptor<CriteriaOrcsLoad> criteriaCaptor;
@Captor private ArgumentCaptor<LoadDescription> descriptionCaptor;
-
+
@Mock private OrcsSession session;
//@formatter:on
@@ -160,14 +160,15 @@ public class DataLoaderFactoryImplTest {
@Test
public void testLoadArtifactIds() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, art1.art_type_id, art1.guid\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_artifact art1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "art1.art_id = jart1.art_id AND jart1.query_id = ? AND art1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, art1.art_type_id, art1.guid\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_artifact art1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "art1.art_id = jart1.art_id AND jart1.query_id = ? AND art1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -182,14 +183,15 @@ public class DataLoaderFactoryImplTest {
@Test
public void testLoadArtifactIncludeDeleted() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, art1.art_type_id, art1.guid\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_artifact art1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "art1.art_id = jart1.art_id AND jart1.query_id = ? AND art1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, art1.art_type_id, art1.guid\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_artifact art1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "art1.art_id = jart1.art_id AND jart1.query_id = ? AND art1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -206,7 +208,7 @@ public class DataLoaderFactoryImplTest {
public void testLoadArtifactHistorical() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_DATA;
String expected =
- "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.transaction_id as stripe_transaction_id,\n" + //
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id, txs1.transaction_id as stripe_transaction_id,\n" + //
" jart1.art_id, art1.art_type_id, art1.guid\n" + //
" FROM \n" + //
"osee_join_artifact jart1, osee_artifact art1, osee_txs txs1\n" + //
@@ -230,7 +232,7 @@ public class DataLoaderFactoryImplTest {
public void testLoadArtifactHistoricalIncludeDeleted() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_DATA;
String expected =
- "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.transaction_id as stripe_transaction_id,\n" + //
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id, txs1.transaction_id as stripe_transaction_id,\n" + //
" jart1.art_id, art1.art_type_id, art1.guid\n" + //
" FROM \n" + //
"osee_join_artifact jart1, osee_artifact art1, osee_txs txs1\n" + //
@@ -256,14 +258,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributes() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -279,14 +282,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributesWithType() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_type_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_type_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -304,14 +308,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributesWithTypes() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_join_id jid1, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_type_id = jid1.id AND jid1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_join_id jid1, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_type_id = jid1.id AND jid1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -329,14 +334,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributesWithId() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -353,14 +359,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributesWithIds() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_join_id jid1, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = jid1.id AND jid1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_join_id jid1, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = jid1.id AND jid1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -377,14 +384,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributesWithIdsAndTypes() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_join_id jid1, osee_join_id jid2, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = jid1.id AND jid1.query_id = ? AND att1.attr_type_id = jid2.id AND jid2.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_join_id jid1, osee_join_id jid2, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = jid1.id AND jid1.query_id = ? AND att1.attr_type_id = jid2.id AND jid2.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -403,14 +411,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributesWithIdAndType() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = ? AND att1.attr_type_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.attr_id = ? AND att1.attr_type_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -429,14 +438,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadAttributesIncludeDeleted() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "att1.art_id = jart1.art_id AND jart1.query_id = ? AND att1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, att1.attr_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -454,7 +464,7 @@ public class DataLoaderFactoryImplTest {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
String expected =
- "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.transaction_id as stripe_transaction_id,\n" + //
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id, txs1.transaction_id as stripe_transaction_id,\n" + //
" jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
" FROM \n" + //
"osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
@@ -479,7 +489,7 @@ public class DataLoaderFactoryImplTest {
LoadLevel expectedLoadLevel = LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
String expected =
- "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.transaction_id as stripe_transaction_id,\n" + //
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id, txs1.transaction_id as stripe_transaction_id,\n" + //
" jart1.art_id, att1.attr_id, att1.attr_type_id, att1.value, att1.uri\n" + //
" FROM \n" + //
"osee_join_artifact jart1, osee_attribute att1, osee_txs txs1\n" + //
@@ -506,14 +516,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelations() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -529,14 +540,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelationsIncludeDeleted() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -553,14 +565,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelationsWithType() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_type_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_type_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -578,14 +591,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelationsWithTypes() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_join_id jid1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_type_id = jid1.id AND jid1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_join_id jid1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_type_id = jid1.id AND jid1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -605,14 +619,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelationsWithId() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -629,14 +644,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelationsWithIds() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_join_id jid1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = jid1.id AND jid1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_join_id jid1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = jid1.id AND jid1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -653,14 +669,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelationsWithIdsAndTypes() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_join_id jid1, osee_join_id jid2, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = jid1.id AND jid1.query_id = ? AND rel1.rel_link_type_id = jid2.id AND jid2.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_join_id jid1, osee_join_id jid2, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = jid1.id AND jid1.query_id = ? AND rel1.rel_link_type_id = jid2.id AND jid2.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -681,14 +698,15 @@ public class DataLoaderFactoryImplTest {
public void testLoadRelationsWithIdAndType() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = ? AND rel1.rel_link_type_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_id = ? AND rel1.rel_link_type_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current = 1 AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -708,7 +726,7 @@ public class DataLoaderFactoryImplTest {
LoadLevel expectedLoadLevel = LoadLevel.RELATION_DATA;
String expected =
- "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.transaction_id as stripe_transaction_id,\n" + //
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id, txs1.transaction_id as stripe_transaction_id,\n" + //
" jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
" FROM \n" + //
"osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
@@ -731,14 +749,15 @@ public class DataLoaderFactoryImplTest {
@Test
public void testLoadArtifactIncludeDeletedAttributes() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ALL;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);
@@ -756,14 +775,15 @@ public class DataLoaderFactoryImplTest {
@Test
public void testLoadArtifactIncludeDeletedRelations() throws OseeCoreException {
LoadLevel expectedLoadLevel = LoadLevel.ALL;
- String expected = "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id,\n" + //
- " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
- " FROM \n" + //
- "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
- " WHERE \n" + //
- "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_type_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
- " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
- " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
+ String expected =
+ "SELECT/*+ ordered */ txs1.gamma_id, txs1.mod_type, txs1.branch_id, txs1.transaction_id, txs1.app_id,\n" + //
+ " jart1.art_id, rel1.rel_link_id, rel1.rel_link_type_id, rel1.a_art_id, rel1.b_art_id, rel1.rationale\n" + //
+ " FROM \n" + //
+ "osee_join_artifact jart1, osee_relation_link rel1, osee_txs txs1\n" + //
+ " WHERE \n" + //
+ "(rel1.a_art_id = jart1.art_id OR rel1.b_art_id = jart1.art_id) AND jart1.query_id = ? AND rel1.rel_link_type_id = ? AND rel1.gamma_id = txs1.gamma_id\n" + //
+ " AND txs1.tx_current IN (1, 2, 3) AND txs1.branch_id = jart1.branch_id\n" + //
+ " ORDER BY txs1.branch_id, jart1.art_id, rel1.rel_link_id, txs1.transaction_id desc";
DataLoader dataLoader = factory.newDataLoaderFromIds(session, COMMON_ID, Arrays.asList(1, 2, 3));
dataLoader.withLoadLevel(expectedLoadLevel);

Back to the top