Interface Session

All Known Subinterfaces:
Metadata
All Known Implementing Classes:
MetadataImpl, SessionImpl

public interface Session
Meta-model entry point.
  • Method Details

    • findClass

      @Nullable MetaClass findClass(String name)
      Search MetaClass by its name in the whole metamodel.
      Parameters:
      name - entity name
      Returns:
      MetaClass instance or null if not found
    • getClass

      MetaClass getClass(String name)
      Search MetaClass by its name in the whole metamodel.
      Parameters:
      name - entity name
      Returns:
      MetaClass instance. Throws exception if not found.
    • findClass

      @Nullable MetaClass findClass(Class<?> javaClass)
      Search MetaClass by the corresponding Java class in the whole metamodel.
      Parameters:
      javaClass - Java class defining the entity
      Returns:
      MetaClass instance or null if not found
    • getClass

      MetaClass getClass(Class<?> javaClass)
      Search MetaClass by the corresponding Java class in the whole metamodel.
      Parameters:
      javaClass - Java class defining the entity
      Returns:
      MetaClass instance. Throws exception if not found.
    • getClasses

      Collection<MetaClass> getClasses()
      Returns:
      collection of all MetaClasses in the whole metamodel