Class CosmosConfigurationSupport

  • Direct Known Subclasses:
    AbstractCosmosConfiguration

    public abstract class CosmosConfigurationSupport
    extends Object
    A support class for cosmos configuration to scan beans and get initial entities
    • Constructor Detail

      • CosmosConfigurationSupport

        public CosmosConfigurationSupport()
    • Method Detail

      • getDatabaseName

        protected abstract String getDatabaseName()
        Return the name of the database to connect to
        Returns:
        must not be null.
      • expressionResolver

        @Bean
        public ExpressionResolver expressionResolver​(org.springframework.beans.factory.BeanFactory beanFactory)
        Declare ExpressionResolver bean.
        Parameters:
        beanFactory - used to initialize the embeddedValueResolver
        Returns:
        ExpressionResolver bean
      • getMappingBasePackages

        protected Collection<String> getMappingBasePackages()
        Get the mapping base package name.
        Returns:
        Base mapping package name set.
      • scanForEntities

        protected Set<Class<?>> scanForEntities​(String basePackage)
                                         throws ClassNotFoundException
        Scan all beans under the given base package
        Parameters:
        basePackage - set the base location of beans
        Returns:
        initial entity set for found beans
        Throws:
        ClassNotFoundException - if the class type is invalid