Package org.hibernate.mapping
Class MappedSuperclass
java.lang.Object
org.hibernate.mapping.MappedSuperclass
- All Implemented Interfaces:
IdentifiableTypeClass
,TableContainer
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 Summary
ConstructorsConstructorDescriptionMappedSuperclass
(MappedSuperclass superMappedSuperclass, PersistentClass superPersistentClass, Table implicitTable) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
applyProperty
(Property property) findSecondaryTable
(String name) Class<?>
getSecondaryTable
(String name) Returns the first superclass marked as @MappedSuperclass or null if: - none exists - or the first persistent superclass found is an @EntityReturns the PersistentClass of the first superclass marked as @Entity or null if none existsboolean
boolean
hasProperty
(String name) Check to see if this MappedSuperclass defines a property with the given name.boolean
Check to see if a property with the given name exists in this MappedSuperclass or in any of its super hierarchy.boolean
void
void
setDeclaredIdentifierMapper
(Component identifierMapper) void
void
setDeclaredVersion
(Property prop) void
setMappedClass
(Class<?> mappedClass)
-
Constructor Details
-
MappedSuperclass
public MappedSuperclass(MappedSuperclass superMappedSuperclass, PersistentClass superPersistentClass, Table implicitTable)
-
-
Method Details
-
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
Returns the PersistentClass of the first superclass marked as @Entity or null if none exists- Returns:
- the PersistentClass of the superclass
-
getDeclaredProperties
- Specified by:
getDeclaredProperties
in interfaceIdentifiableTypeClass
-
addDeclaredProperty
-
getMappedClass
-
setMappedClass
-
getIdentifierProperty
-
getDeclaredIdentifierProperty
-
setDeclaredIdentifierProperty
-
getVersion
-
getDeclaredVersion
-
setDeclaredVersion
-
getIdentifierMapper
-
getDeclaredIdentifierMapper
-
setDeclaredIdentifierMapper
-
hasProperty
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
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
- Specified by:
findTable
in interfaceTableContainer
-
getTable
- Specified by:
getTable
in interfaceTableContainer
-
findSecondaryTable
- Specified by:
findSecondaryTable
in interfaceTableContainer
-
getSecondaryTable
- Specified by:
getSecondaryTable
in interfaceTableContainer
-
getSuperType
- Specified by:
getSuperType
in interfaceIdentifiableTypeClass
-
getSubTypes
- Specified by:
getSubTypes
in interfaceIdentifiableTypeClass
-
getImplicitTable
- Specified by:
getImplicitTable
in interfaceIdentifiableTypeClass
-
applyProperty
- Specified by:
applyProperty
in interfaceIdentifiableTypeClass
-