Class MappedSuperclass

java.lang.Object
org.hibernate.mapping.MappedSuperclass
All Implemented Interfaces:
IdentifiableTypeClass, TableContainer

public class MappedSuperclass extends Object implements IdentifiableTypeClass
A mapping model object representing a mapped superclass of an entity class. A mapped superclass is not itself an entity, but it may declare persistent attributes which are inherited by entity subclasses.
  • Constructor Details

  • Method Details

    • getSuperMappedSuperclass

      public MappedSuperclass getSuperMappedSuperclass()
      Returns the first superclass marked as @MappedSuperclass or null if: - none exists - or the first persistent superclass found is an @Entity
      Returns:
      the super MappedSuperclass
    • hasIdentifierProperty

      public boolean hasIdentifierProperty()
    • isVersioned

      public boolean isVersioned()
    • getSuperPersistentClass

      public PersistentClass getSuperPersistentClass()
      Returns the PersistentClass of the first superclass marked as @Entity or null if none exists
      Returns:
      the PersistentClass of the superclass
    • getDeclaredProperties

      public List<Property> getDeclaredProperties()
      Specified by:
      getDeclaredProperties in interface IdentifiableTypeClass
    • addDeclaredProperty

      public void addDeclaredProperty(Property p)
    • getMappedClass

      public Class<?> getMappedClass()
    • setMappedClass

      public void setMappedClass(Class<?> mappedClass)
    • getIdentifierProperty

      public Property getIdentifierProperty()
    • getDeclaredIdentifierProperty

      public Property getDeclaredIdentifierProperty()
    • setDeclaredIdentifierProperty

      public void setDeclaredIdentifierProperty(Property prop)
    • getVersion

      public Property getVersion()
    • getDeclaredVersion

      public Property getDeclaredVersion()
    • setDeclaredVersion

      public void setDeclaredVersion(Property prop)
    • getIdentifierMapper

      public Component getIdentifierMapper()
    • getDeclaredIdentifierMapper

      public Component getDeclaredIdentifierMapper()
    • setDeclaredIdentifierMapper

      public void setDeclaredIdentifierMapper(Component identifierMapper)
    • hasProperty

      public boolean hasProperty(String name)
      Check to see if this MappedSuperclass defines a property with the given name.
      Parameters:
      name - The property name to check
      Returns:
      true if a property with that name exists; false if not
    • isPropertyDefinedInHierarchy

      public boolean isPropertyDefinedInHierarchy(String name)
      Check to see if a property with the given name exists in this MappedSuperclass or in any of its super hierarchy.
      Parameters:
      name - The property name to check
      Returns:
      true if a property with that name exists; false if not
    • prepareForMappingModel

      public void prepareForMappingModel()
    • findTable

      public Table findTable(String name)
      Specified by:
      findTable in interface TableContainer
    • getTable

      public Table getTable(String name)
      Specified by:
      getTable in interface TableContainer
    • findSecondaryTable

      public Join findSecondaryTable(String name)
      Specified by:
      findSecondaryTable in interface TableContainer
    • getSecondaryTable

      public Join getSecondaryTable(String name)
      Specified by:
      getSecondaryTable in interface TableContainer
    • getSuperType

      public IdentifiableTypeClass getSuperType()
      Specified by:
      getSuperType in interface IdentifiableTypeClass
    • getSubTypes

      public List<IdentifiableTypeClass> getSubTypes()
      Specified by:
      getSubTypes in interface IdentifiableTypeClass
    • getImplicitTable

      public Table getImplicitTable()
      Specified by:
      getImplicitTable in interface IdentifiableTypeClass
    • applyProperty

      public void applyProperty(Property property)
      Specified by:
      applyProperty in interface IdentifiableTypeClass