Class ProjectionReferredTypeOverride
java.lang.Object
com.broadleafcommerce.common.extension.mapping.ProjectionReferredTypeOverride
Represents an override of a type to use during Json deserialization. Most notably, this allows
for nested types in an incoming projection instance to be recognized as a more derived type
provided by a customization extension. This is especially useful for overriding things like
collection field member types. Note, the overridden type may be nested arbitrarily deep in the
object graph of the projection and need not be directly reference from the projection type
itself.
-
Constructor Summary
ConstructorDescriptionProjectionReferredTypeOverride
(Class<?> originalProjectionType, Class<?> derivedProjectionType) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Class<?>
If the projection is mapped to a repository domain type, then this represents the extended repository domain type.Class<?>
The extended projection typeClass<?>
If the projection is mapped to a repository domain type, then this represents the repository domain type that will be customized via extension.Class<?>
The starting projection type that will be customized via extensionint
hashCode()
void
setDerivedMapToType
(Class<?> derivedMapToType) If the projection is mapped to a repository domain type, then this represents the extended repository domain type.void
setOriginalMapToType
(Class<?> originalMapToType) If the projection is mapped to a repository domain type, then this represents the repository domain type that will be customized via extension.toString()
withRepositoryMapTo
(Class<?> originalMapToType, Class<?> derivedMapToType) If the projection is mapped to a repository domain type, then original and extended repository domain types are set here.
-
Constructor Details
-
ProjectionReferredTypeOverride
-
-
Method Details
-
withRepositoryMapTo
public ProjectionReferredTypeOverride withRepositoryMapTo(Class<?> originalMapToType, Class<?> derivedMapToType) If the projection is mapped to a repository domain type, then original and extended repository domain types are set here. In some cases with embedded collections with no JPA counterpart, the collection type on the projection is exactly the same as on the repository type. In this case,withMapTo
should not be used. -
getOriginalProjectionType
The starting projection type that will be customized via extension -
getDerivedProjectionType
The extended projection type -
getOriginalMapToType
If the projection is mapped to a repository domain type, then this represents the repository domain type that will be customized via extension. In some cases with embedded collections with no JPA counterpart, the collection type on the projection is exactly the same as on the repository type. In this case,originalMapToType
should not be specified. -
getDerivedMapToType
If the projection is mapped to a repository domain type, then this represents the extended repository domain type. In some cases with embedded collections with no JPA counterpart, the collection type on the projection is exactly the same as on the repository type. In this case,derivedMapToType
should not be specified. -
setOriginalMapToType
If the projection is mapped to a repository domain type, then this represents the repository domain type that will be customized via extension. In some cases with embedded collections with no JPA counterpart, the collection type on the projection is exactly the same as on the repository type. In this case,originalMapToType
should not be specified. -
setDerivedMapToType
If the projection is mapped to a repository domain type, then this represents the extended repository domain type. In some cases with embedded collections with no JPA counterpart, the collection type on the projection is exactly the same as on the repository type. In this case,derivedMapToType
should not be specified. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-