Skip to content
Snippets Groups Projects
Commit 4607ea59 authored by Rafal Mucha's avatar Rafal Mucha
Browse files

Merge branch 'NXCALS-7572-improve-getting-all-hierarchies-for-variables' into 'develop'

Resolve NXCALS-7572 "Improve getting all hierarchies for variables"

Closes NXCALS-7572

See merge request !1944
parents 09405bf1 146acbdb
No related branches found
No related tags found
1 merge request!1944Resolve NXCALS-7572 "Improve getting all hierarchies for variables"
......@@ -39,8 +39,8 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.UUID;
import java.util.stream.Collectors;
import static cern.nxcals.api.custom.domain.CmwSystemConstants.CLASS_KEY_NAME;
import static cern.nxcals.api.custom.domain.CmwSystemConstants.CMW_SYSTEM;
......@@ -65,8 +65,11 @@ public class BackportMetaDataServiceTest extends AbstractTest {
//Please leave this one just in case you want to run those test from IDE for debugging
//Don't forget to check if hadoop-dev jar is included in build.gradle!!!
// System.setProperty("service.url", "https://nxcals-<user>1.cern.ch:19093".replace("<user>",USER_NAME)); //Do not use localhost here.
// System.setProperty("kafka.producer.bootstrap.servers", "https://nxcals-<user>3.cern.ch:9092,https://nxcals-<user>4.cern.ch:9092,https://nxcals-<user>5.cern.ch:9092".replace("<user>", USER_NAME));
// System.setProperty("service.url",
// "https://nxcals-<user>-1.cern.ch:19093".replace("<user>", USER_NAME)); //Do not use localhost here.
// System.setProperty("kafka.producer.bootstrap.servers",
// "https://nxcals-<user>-3.cern.ch:9092,https://nxcals-<user>-4.cern.ch:9092,https://nxcals-<user>-5.cern.ch:9092".replace(
// "<user>", USER_NAME));
// System.setProperty("kerberos.principal", USER_NAME);
// System.setProperty("kerberos.keytab", "/opt/<user>/.keytab".replace("<user>", USER_NAME));
}
......
......@@ -78,13 +78,6 @@ import static cern.nxcals.service.domain.SequenceType.HIERARCHY;
)
}
),
@NamedEntityGraph(
name = HierarchyData.NO_VARIABLES_MINIMUM,
attributeNodes = {
@NamedAttributeNode("system"),
@NamedAttributeNode("group")
}
),
@NamedEntityGraph(
name = HierarchyData.WITH_VARIABLES_FOR_VARIABLES_REMOVAL,
attributeNodes = {
......@@ -219,7 +212,6 @@ import static cern.nxcals.service.domain.SequenceType.HIERARCHY;
public class HierarchyData extends StandardPersistentEntityWithVersion {
public static final String WITH_ENTITIES = "hierarchies-with-entities";
public static final String WITH_VARIABLES = "hierarchies-with-variables";
public static final String NO_VARIABLES_MINIMUM = "hierarchies-with-no-variables-minimum";
public static final String WITH_VARIABLES_FOR_VARIABLES_REMOVAL = "hierarchies-with-variables-for-variables-removal";
public static final String WITH_VARIABLE_ASSOCIATIONS = "hierarchies-with-variable-associations";
public static final String PLAIN = "hierarchies-without-variables-and-entities";
......
......@@ -21,7 +21,7 @@ public interface HierarchyRepository
+ "join VariableDataWithAssociation v on v.key.groupId = h.group.id "
+ "where v.key.association = '__in__hierarchy__' and v.key.variableId in :variableIds"
)
@EntityGraph(HierarchyData.NO_VARIABLES_MINIMUM)
@EntityGraph(HierarchyData.PLAIN)
// for some unknown reason the following statement
// "select new cern.nxcals.service.domain.VariableWithHierarchy( v.key.variableId, h )"
// creates h as proxy. That's why we have to use a list of objects instead.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment