Package com.broadleafcommerce.common.jpa
Class JpaRepositoryEntityTypeOverride
- java.lang.Object
-
- com.broadleafcommerce.common.jpa.JpaRepositoryEntityTypeOverride
-
- All Implemented Interfaces:
org.springframework.core.Ordered
public class JpaRepositoryEntityTypeOverride extends Object implements org.springframework.core.Ordered
Denote that a Broadleaf declared repository should leverage a specific type. This can be any type that is assignable from the base type declared by the existing Broadleaf repository. This feature is usually used to specify a more derived extension type of the original Broadleaf entity class, especially when multiple extensions of the same Broadleaf based entity are being employed with a different repository supporting each polymorphic variation.
Note, if thegetDomainType()declared here is itself a supertype of other entities, then the expectation for the repository fetch results should be that the declared type, and the sub types, are returned.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description JpaRepositoryEntityTypeOverride(Class<?> repositoryInterfaceType, Class<?> domainType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)Class<?>getDomainType()The type to which fetch results for the repository should be limited.intgetOrder()Class<?>getRepositoryInterfaceType()The JPA repository interface class.inthashCode()voidsetOrder(int order)StringtoString()
-
-
-
Method Detail
-
getRepositoryInterfaceType
public Class<?> getRepositoryInterfaceType()
The JPA repository interface class.- Returns:
- The JPA repository interface class.
-
getDomainType
public Class<?> getDomainType()
The type to which fetch results for the repository should be limited.- Returns:
- The type to which fetch results for the repository should be limited.
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- See Also:
Ordered.getOrder()
-
setOrder
public void setOrder(int order)
- See Also:
Ordered.getOrder()
-
canEqual
protected boolean canEqual(Object other)
-
-