Class EntityProjection.ContainerPropertyProjection<M,D>
java.lang.Object
org.springframework.data.projection.EntityProjection<M,D>
org.springframework.data.projection.EntityProjection.PropertyProjection<M,D>
org.springframework.data.projection.EntityProjection.ContainerPropertyProjection<M,D>
- Type Parameters:
M
- the mapped type acting as view onto the domain type.D
- the domain type.
- All Implemented Interfaces:
Iterable<EntityProjection.PropertyProjection<?,
,?>> Supplier<Stream<EntityProjection.PropertyProjection<?,
,?>>> Streamable<EntityProjection.PropertyProjection<?,
?>>
- Enclosing class:
- EntityProjection<M,
D>
public static class EntityProjection.ContainerPropertyProjection<M,D>
extends EntityProjection.PropertyProjection<M,D>
Descriptor for a property-level type along its potential projection that is held within a
Collection
-like
or Map
-like container. Property paths within containers use the deeply unwrapped actual type of the
container as root type and as they cannot be tied immediately to the root entity.-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.projection.EntityProjection
EntityProjection.ContainerPropertyProjection<M,
D>, EntityProjection.ProjectionType, EntityProjection.PropertyProjection<M, D> -
Method Summary
Modifier and TypeMethodDescriptionstatic <M,
D> EntityProjection.ContainerPropertyProjection<M, D> nonProjecting
(PropertyPath propertyPath, TypeInformation<M> mappedType, TypeInformation<D> domainType) Create a non-projecting variant of a mapped type.static <M,
D> EntityProjection.ContainerPropertyProjection<M, D> projecting
(PropertyPath propertyPath, TypeInformation<M> mappedType, TypeInformation<D> domainType, List<EntityProjection.PropertyProjection<?, ?>> properties, EntityProjection.ProjectionType projectionType) Create a projecting variant of a mapped type.Methods inherited from class org.springframework.data.projection.EntityProjection.PropertyProjection
getPropertyPath, toString
Methods inherited from class org.springframework.data.projection.EntityProjection
findProperty, forEachRecursive, getActualDomainType, getActualMappedType, getDomainType, getMappedType, isClosedProjection, isProjection, iterator, nonProjecting, nonProjecting, projecting
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
projecting
public static <M,D> EntityProjection.ContainerPropertyProjection<M,D> projecting(PropertyPath propertyPath, TypeInformation<M> mappedType, TypeInformation<D> domainType, List<EntityProjection.PropertyProjection<?, ?>> properties, EntityProjection.ProjectionType projectionType) Create a projecting variant of a mapped type.- Parameters:
propertyPath
- thepath
to the actual property.mappedType
- the target projection type. Must not be null.domainType
- the source domain type. Must not be null.properties
- properties to include.projectionType
- must not be null.- Returns:
- new instance of
EntityProjection.ContainerPropertyProjection
.
-
nonProjecting
public static <M,D> EntityProjection.ContainerPropertyProjection<M,D> nonProjecting(PropertyPath propertyPath, TypeInformation<M> mappedType, TypeInformation<D> domainType) Create a non-projecting variant of a mapped type.- Parameters:
propertyPath
- thepath
to the actual property.mappedType
- the target projection type. Must not be null.domainType
- the source domain type. Must not be null.- Returns:
- new instance of
EntityProjection.ContainerPropertyProjection
.
-