public class

MappedSuperclass

extends Object
java.lang.Object
   ↳ org.hibernate.mapping.MappedSuperclass

Class Overview

Represents a @MappedSuperclass. A @MappedSuperclass can be a superclass of an @Entity (root or not) This class primary goal is to give a representation to @MappedSuperclass in the metamodel in order to reflect them in the JPA 2 metamodel. Do not use outside this use case. A proper redesign will be evaluated in Hibernate 4 Implementation details: properties are copies of their closest sub-persistentClass versions

Summary

Public Constructors
MappedSuperclass(MappedSuperclass superMappedSuperclass, PersistentClass superPersistentClass)
Public Methods
void addDeclaredProperty(Property p)
Component getDeclaredIdentifierMapper()
Property getDeclaredIdentifierProperty()
Iterator getDeclaredPropertyIterator()
Property getDeclaredVersion()
Component getIdentifierMapper()
Property getIdentifierProperty()
Class getMappedClass()
MappedSuperclass getSuperMappedSuperclass()
Returns the first superclass marked as @MappedSuperclass or null if: - none exists - or the first persistent superclass found is an @Entity
PersistentClass getSuperPersistentClass()
Returns the PersistentClass of the first superclass marked as @Entity or null if none exists
Property getVersion()
boolean hasIdentifierProperty()
boolean isVersioned()
void setDeclaredIdentifierMapper(Component identifierMapper)
void setDeclaredIdentifierProperty(Property prop)
void setDeclaredVersion(Property prop)
void setMappedClass(Class mappedClass)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MappedSuperclass (MappedSuperclass superMappedSuperclass, PersistentClass superPersistentClass)

Public Methods

public void addDeclaredProperty (Property p)

public Component getDeclaredIdentifierMapper ()

public Property getDeclaredIdentifierProperty ()

public Iterator getDeclaredPropertyIterator ()

public Property getDeclaredVersion ()

public Component getIdentifierMapper ()

public Property getIdentifierProperty ()

public Class getMappedClass ()

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

public PersistentClass getSuperPersistentClass ()

Returns the PersistentClass of the first superclass marked as @Entity or null if none exists

Returns
  • the PersistentClass of the superclass

public Property getVersion ()

public boolean hasIdentifierProperty ()

public boolean isVersioned ()

public void setDeclaredIdentifierMapper (Component identifierMapper)

public void setDeclaredIdentifierProperty (Property prop)

public void setDeclaredVersion (Property prop)

public void setMappedClass (Class mappedClass)