Class BeanDescriptorManager

java.lang.Object
io.ebeaninternal.server.deploy.BeanDescriptorManager
All Implemented Interfaces:
SpiBeanTypeManager, BeanDescriptorMap

public final class BeanDescriptorManager extends Object implements BeanDescriptorMap, SpiBeanTypeManager
Creates BeanDescriptors.
  • Field Details

  • Constructor Details

    • BeanDescriptorManager

      public BeanDescriptorManager(InternalConfiguration config)
      Create for a given database dbConfig.
  • Method Details

    • isJacksonCorePresent

      public boolean isJacksonCorePresent()
      Description copied from interface: BeanDescriptorMap
      Return true if Jackson core is present on the classpath.
      Specified by:
      isJacksonCorePresent in interface BeanDescriptorMap
    • scheduleBackgroundTrim

      public void scheduleBackgroundTrim()
      Run periodic trim of query plans.
    • scalarType

      public io.ebean.core.type.ScalarType<?> scalarType(String cast)
      Description copied from interface: BeanDescriptorMap
      Return the scalarType for the given logical type.
      Specified by:
      scalarType in interface BeanDescriptorMap
    • scalarType

      public io.ebean.core.type.ScalarType<?> scalarType(int jdbcType)
      Description copied from interface: BeanDescriptorMap
      Return the scalarType for the given JDBC type.
      Specified by:
      scalarType in interface BeanDescriptorMap
    • isMultiValueSupported

      public boolean isMultiValueSupported()
      Description copied from interface: BeanDescriptorMap
      Return true if multiple values can be bound as Array or Table Value and hence share the same query plan.
      Specified by:
      isMultiValueSupported in interface BeanDescriptorMap
    • config

      public io.ebean.DatabaseBuilder.Settings config()
      Description copied from interface: BeanDescriptorMap
      Return the DatabaseConfig.
      Specified by:
      config in interface BeanDescriptorMap
    • beanType

      public SpiBeanType beanType(Class<?> entityType)
      Description copied from interface: SpiBeanTypeManager
      Return the bean type for the given entity class.
      Specified by:
      beanType in interface SpiBeanTypeManager
    • descriptor

      public <T> BeanDescriptor<T> descriptor(Class<T> entityType)
      Description copied from interface: BeanDescriptorMap
      Return the BeanDescriptor for a given class.
      Specified by:
      descriptor in interface BeanDescriptorMap
    • descriptorByClassName

      public <T> BeanDescriptor<T> descriptorByClassName(String entityClassName)
    • name

      public String name()
      Description copied from interface: BeanDescriptorMap
      Return the name of the server/database.
      Specified by:
      name in interface BeanDescriptorMap
    • cacheManager

      public SpiCacheManager cacheManager()
      Description copied from interface: BeanDescriptorMap
      Return the Cache Manager.
      Specified by:
      cacheManager in interface BeanDescriptorMap
    • namingConvention

      public io.ebean.config.NamingConvention namingConvention()
      Description copied from interface: BeanDescriptorMap
      Return the naming convention.
      Specified by:
      namingConvention in interface BeanDescriptorMap
    • setEbeanServer

      public void setEbeanServer(SpiEbeanServer internalEbean)
      Set the internal EbeanServer instance to all BeanDescriptors.
    • createIdBinder

      public IdBinder createIdBinder(BeanProperty idProperty)
      Description copied from interface: BeanDescriptorMap
      Create a IdBinder for this bean property.
      Specified by:
      createIdBinder in interface BeanDescriptorMap
    • deploy

      public Map<String,String> deploy()
      Deploy returning the asOfTableMap (which is required by the SQL builders).
    • encryptKey

      public io.ebean.config.EncryptKey encryptKey(String tableName, String columnName)
      Return the Encrypt key given the table and column name.
      Specified by:
      encryptKey in interface BeanDescriptorMap
    • cacheNotify

      public void cacheNotify(TransactionEventTable.TableIUD tableIUD, CacheChangeSet changeSet)
      For SQL based modifications we need to invalidate appropriate parts of the cache.
    • descriptors

      public List<BeanDescriptor<?>> descriptors(String tableName)
      Return the BeanDescriptors mapped to the table.
    • beanTypes

      public List<? extends io.ebean.plugin.BeanType<?>> beanTypes(String tableName)
      Return the BeanDescriptors mapped to the table.
    • isTableManaged

      public boolean isTableManaged(String tableName)
      Description copied from interface: BeanDescriptorMap
      Returns true, if the given table (or view) is managed by ebean (= an entity exists)
      Specified by:
      isTableManaged in interface BeanDescriptorMap
    • processViewInvalidation

      public void processViewInvalidation(Set<String> viewInvalidation)
      Invalidate entity beans based on views via their dependent tables.
    • requiresViewEntityCacheInvalidation

      public boolean requiresViewEntityCacheInvalidation()
      Return true if there are 'view based entities' using l2 query caching and so need to be invalidated based on changes to dependent tables.
    • descriptorList

      public List<BeanDescriptor<?>> descriptorList()
      Return an immutable list of all the BeanDescriptors.
    • beanTable

      public BeanTable beanTable(Class<?> type)
    • createCollectionBeanTable

      public BeanTable createCollectionBeanTable(String fullTableName, Class<?> targetType)
      Return a BeanTable for an ElementCollection.
    • beanManager

      public <T> BeanManager<T> beanManager(Class<T> entityType)
    • deploy

      public <T> io.ebeaninternal.server.deploy.parse.DeployBeanInfo<T> deploy(Class<T> cls)
      Return the bean deploy info for the given class.
    • createUnidirectional

      public <A> void createUnidirectional(DeployBeanDescriptor<?> targetDesc, Class<A> targetType, BeanTable beanTable, DeployTableJoin oneToManyJoin)
      Create and add a Unidirectional property (for ElementCollection) which maps to the foreign key.
    • changeLogPrepare

      public io.ebean.event.changelog.ChangeLogPrepare changeLogPrepare()
      Return the changeLogPrepare (for setting user context into the ChangeSet in the foreground thread).
    • changeLogListener

      public io.ebean.event.changelog.ChangeLogListener changeLogListener()
      Return the changeLogListener (that actually does the logging).
    • createDeployDescriptor

      public <A> DeployBeanDescriptor<A> createDeployDescriptor(Class<A> targetType)
      Create a DeployBeanDescriptor for an ElementCollection target.
    • createElementDescriptor

      public <A> BeanDescriptor<A> createElementDescriptor(DeployBeanDescriptor<A> elementDescriptor, ManyType manyType, boolean scalar)
      Create a BeanDescriptor for an ElementCollection target.
    • visitMetrics

      public void visitMetrics(io.ebean.meta.MetricVisitor visitor)
    • queryPlanInit

      public List<io.ebean.meta.MetaQueryPlan> queryPlanInit(io.ebean.meta.QueryPlanInit request)
    • bindMaxLength

      public BindMaxLength bindMaxLength()