Enum Class EntityProjection.ProjectionType
java.lang.Object
java.lang.Enum<EntityProjection.ProjectionType>
org.springframework.data.projection.EntityProjection.ProjectionType
- All Implemented Interfaces:
Serializable
,Comparable<EntityProjection.ProjectionType>
,Constable
- Enclosing class:
- EntityProjection<M,
D>
Projection type.
- Since:
- 2.7
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA closed projection only contains accessor methods that all match properties of the target aggregate.A DTO projection defines a value type that hold properties for the fields that are supposed to be retrieved.An open projection has accessor methods in the interface that can be used to compute new values by using theValue
annotation. -
Method Summary
Modifier and TypeMethodDescriptionfrom
(ProjectionInformation information) Obtain theEntityProjection.ProjectionType
from a givenProjectionInformation
.Returns the enum constant of this class with the specified name.static EntityProjection.ProjectionType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DTO
A DTO projection defines a value type that hold properties for the fields that are supposed to be retrieved. -
OPEN
An open projection has accessor methods in the interface that can be used to compute new values by using theValue
annotation. -
CLOSED
A closed projection only contains accessor methods that all match properties of the target aggregate.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
from
Obtain theEntityProjection.ProjectionType
from a givenProjectionInformation
.- Parameters:
information
- must not be null.- Returns:
- the
EntityProjection.ProjectionType
according totype
andProjectionInformation.isClosed()
.
-