Class 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 the getDomainType() 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 Detail

      • JpaRepositoryEntityTypeOverride

        public JpaRepositoryEntityTypeOverride​(Class<?> repositoryInterfaceType,
                                               Class<?> domainType)
    • 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:
        getOrder in interface org.springframework.core.Ordered
        See Also:
        Ordered.getOrder()
      • setOrder

        public void setOrder​(int order)
        See Also:
        Ordered.getOrder()
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object