Package mc.core.domain.generic
Class RelationValues<T extends ComplexEntity>
java.lang.Object
mc.core.domain.generic.RelationValues<T>
- All Implemented Interfaces:
Serializable,Iterable<RelationValue<T>>
public class RelationValues<T extends ComplexEntity>
extends Object
implements Serializable, Iterable<RelationValue<T>>
immutable container for RelationValues with convenience methods for getting relation data as lists or maps
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ComplexEntity>
RelationValues<T>empty()filterRelated(List<T> allowed) remove all relationValues where relatedEntity is not in allowed list.assume all relations are from only one sourcegetRelatedEntities(T source) Map<RelationType,List<T>> getValue(long rTypeId, long eId, long relatedId) iterator()Iterable contractstatic <T extends ComplexEntity>
RelationValues<T>of(List<RelationValue<T>> rvs) intsize()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RelationValues
-
-
Method Details
-
getSourceEntities
-
getRelatedEntities
assume all relations are from only one source -
getRelatedEntities
-
getEntityToEntities
-
getRelatedEntityMap
-
getValue
-
getRelationValueMap
-
filterRelated
remove all relationValues where relatedEntity is not in allowed list. use for permission filtering -
iterator
Iterable contract- Specified by:
iteratorin interfaceIterable<T extends ComplexEntity>
-
size
public int size() -
of
-
empty
-