Class EntityProjection.PropertyProjection<M,D>
java.lang.Object
org.springframework.data.projection.EntityProjection<M,D>
org.springframework.data.projection.EntityProjection.PropertyProjection<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<?,
?>>
- Direct Known Subclasses:
EntityProjection.ContainerPropertyProjection
- Enclosing class:
- EntityProjection<M,
D>
Descriptor for a property-level type along its potential projection.
-
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.PropertyProjection<M, D> nonProjecting
(PropertyPath propertyPath, TypeInformation<M> mappedType, TypeInformation<D> domainType) Create a non-projecting variant of a mapped type.static <M,
D> EntityProjection.PropertyProjection<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.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.PropertyProjection<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.PropertyProjection
.
-
nonProjecting
public static <M,D> EntityProjection.PropertyProjection<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:
-
getPropertyPath
- Returns:
- the property path representing this property within the root domain type.
-
toString
- Overrides:
toString
in classEntityProjection<M,
D>
-