Class ClassDescriptorMap

  • public class ClassDescriptorMap
    extends Object
    An object that holds class descriptors for mapped entities, compiling new descriptors on demand using an internal chain of descriptor factories. Note that the object is not synchronized internally, so it has to be prefilled with descriptors by the caller on initialization via calling 'getDescriptor' for all mapped entities.
    • Constructor Detail

      • ClassDescriptorMap

        public ClassDescriptorMap​(EntityResolver resolver)
    • Method Detail

      • addFactory

        public void addFactory​(ClassDescriptorFactory factory)
        Adds a factory to the descriptor factory chain.
      • clearFactories

        public void clearFactories()
      • clearDescriptors

        public void clearDescriptors()
      • removeDescriptor

        public void removeDescriptor​(String entityName)
        Removes cached descriptor if any for the given entity.
      • addDescriptor

        public void addDescriptor​(String entityName,
                                  ClassDescriptor descriptor)
        Caches descriptor definition.
      • createProxyDescriptor

        protected ClassDescriptor createProxyDescriptor​(String entityName)
        Creates a descriptor wrapper that will compile the underlying descriptor on demand. Using proxy indirection is needed to compile relationships of descriptors to other descriptors that are not compiled yet.
      • createDescriptor

        protected ClassDescriptor createDescriptor​(String entityName)
        Creates a new descriptor.