Modifier and Type | Method and Description |
---|---|
void |
addEntities(long hierarchyId,
java.util.Set<java.lang.Long> entityIds)
Attaches the given
Set of entities to the given hierarchy id. |
void |
addVariables(long hierarchyId,
java.util.Set<java.lang.Long> variableIds)
Attaches the given
Set of variables to the given hierarchy id. |
Hierarchy |
create(Hierarchy hierarchy)
Creates hierarchy as in the parameter
NOTE: this is a mutative method.
|
java.util.Set<Hierarchy> |
createAll(java.util.Set<Hierarchy> hierarchies)
Creates hierarchies as in the parameter
NOTE: this is a mutative method.
|
void |
deleteAllLeaves(java.util.Set<Hierarchy> hierarchies)
Deletes leaf hierarchies
NOTE: this is a mutative method.
|
void |
deleteLeaf(Hierarchy hierarchy)
Deletes a leaf hierarchy
NOTE: this is a mutative method.
|
java.util.List<Hierarchy> |
getChainTo(Hierarchy hierarchy)
Returns a full chain of hierarchies from the given parameter to the root
|
java.util.Set<Entity> |
getEntities(long hierarchyId)
Returns the
Set of entities attached to a given hierarchy node |
java.util.Set<Hierarchy> |
getHierarchiesForVariable(long variableId) |
java.util.Set<Hierarchy> |
getTopLevel(SystemSpec system)
Returns all the top level hierarchies in a given system
|
java.util.Set<Variable> |
getVariables(long hierarchyId)
Returns the
Set of variables attached to a given hierarchy node |
void |
removeEntities(long hierarchyId,
java.util.Set<java.lang.Long> entityIds)
Detaches the given
Set of entities to the given hierarchy id. |
void |
removeVariables(long hierarchyId,
java.util.Set<java.lang.Long> variableIds)
Detaches the given
Set of variables to the given hierarchy id. |
void |
setEntities(long hierarchyId,
java.util.Collection<Entity> entities)
Deprecated.
this method will be removed in a future release. Please use setEntities(long hierarchyId, Set
|
void |
setEntities(long hierarchyId,
java.util.Set<java.lang.Long> entityIds)
Attaches the given
Set of entities to the given hierarchy id. |
void |
setVariables(long hierarchyId,
java.util.Collection<Variable> variables)
Deprecated.
this method will be removed in a future release. Please use setVariables(long hierarchyId, Set
|
void |
setVariables(long hierarchyId,
java.util.Set<java.lang.Long> variableIds)
Attaches the given
Set of variables to the given hierarchy id. |
Hierarchy |
update(Hierarchy hierarchy)
Updates an existing hierarchy to the new values as in the parameter
NOTE: this is a mutative method.
|
java.util.Set<Hierarchy> |
updateAll(java.util.Set<Hierarchy> hierarchies)
Updates existing hierarchies to the new values as in the provided
Set of parameters
NOTE: this is a mutative method. |
Hierarchy create(Hierarchy hierarchy)
hierarchy
- to be createdHierarchy update(Hierarchy hierarchy)
hierarchy
- to be updatedvoid deleteLeaf(Hierarchy hierarchy)
hierarchy
- to be deletedjava.util.Set<Hierarchy> createAll(java.util.Set<Hierarchy> hierarchies)
hierarchies
- to be createdjava.util.Set<Hierarchy> updateAll(java.util.Set<Hierarchy> hierarchies)
Set
of parameters
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchies
- to be updatedvoid deleteAllLeaves(java.util.Set<Hierarchy> hierarchies)
hierarchies
- to be deletedjava.util.Set<Hierarchy> getTopLevel(SystemSpec system)
system
- to find top leveljava.util.List<Hierarchy> getChainTo(Hierarchy hierarchy)
hierarchy
- end-of-chain hierarchy@Deprecated void setVariables(long hierarchyId, java.util.Collection<Variable> variables)
Collection
of variables to the given hierarchy id. The hierarchy id and the variables must exist. NOTE: it replaces any existing attached Set
.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables tovariables
- Collection
of variables to attachvoid setVariables(long hierarchyId, java.util.Set<java.lang.Long> variableIds)
Set
of variables to the given hierarchy id. The hierarchy id and the variables must exist. NOTE: it replaces any existing attached Set
.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables tovariableIds
- Set
of variable ids to attachvoid addVariables(long hierarchyId, java.util.Set<java.lang.Long> variableIds)
Set
of variables to the given hierarchy id. The hierarchy id and the variables must exist.
NOTE: it adds to any existing attached Set
. Does not fail if variable already present.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables tovariableIds
- Set
of variable ids to attachvoid removeVariables(long hierarchyId, java.util.Set<java.lang.Long> variableIds)
Set
of variables to the given hierarchy id. The hierarchy id and the variables must exist.
NOTE: it removes from any existing attached Set
. Does not fail if variable already absent.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables tovariableIds
- Set
of variable ids to detachjava.util.Set<Variable> getVariables(long hierarchyId)
Set
of variables attached to a given hierarchy nodehierarchyId
- of the hierarchy to querySet
of variables attached@Deprecated void setEntities(long hierarchyId, java.util.Collection<Entity> entities)
Collection
of entities to the given hierarchy id. The hierarchy id and the entities must exist. NOTE: it replaces any existing attached Set
.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables toentities
- Collection
of entities to attachvoid setEntities(long hierarchyId, java.util.Set<java.lang.Long> entityIds)
Set
of entities to the given hierarchy id. The hierarchy id and the entities must exist. NOTE: it replaces any existing attached Set
.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables toentityIds
- Set
of entity ids to attachvoid removeEntities(long hierarchyId, java.util.Set<java.lang.Long> entityIds)
Set
of entities to the given hierarchy id. The hierarchy id and the entities must exist.
NOTE: it removes from any existing attached Set
. Does not fail if entities already absent.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables toentityIds
- Set
of entity ids to detachvoid addEntities(long hierarchyId, java.util.Set<java.lang.Long> entityIds)
Set
of entities to the given hierarchy id. The hierarchy id and the entities must exist.
NOTE: it adds any existing attached Set
. Does not fail if entity already present.
NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallelhierarchyId
- hierarchy to attach variables toentityIds
- Set
of entity ids to attachjava.util.Set<Entity> getEntities(long hierarchyId)
Set
of entities attached to a given hierarchy nodehierarchyId
- of the hierarchy to querySet
of entities attachedjava.util.Set<Hierarchy> getHierarchiesForVariable(long variableId)