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 TypeMethodDescriptionvoidvoidapplyProperty(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 existsbooleanbooleanhasProperty(String name) Check to see if this MappedSuperclass defines a property with the given name.booleanCheck to see if a property with the given name exists in this MappedSuperclass or in any of its super hierarchy.booleanvoidvoidsetDeclaredIdentifierMapper(Component identifierMapper) voidvoidsetDeclaredVersion(Property prop) voidsetMappedClass(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:
getDeclaredPropertiesin 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:
trueif a property with that name exists;falseif 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:
trueif a property with that name exists;falseif not
-
prepareForMappingModel
public void prepareForMappingModel() -
findTable
- Specified by:
findTablein interfaceTableContainer
-
getTable
- Specified by:
getTablein interfaceTableContainer
-
findSecondaryTable
- Specified by:
findSecondaryTablein interfaceTableContainer
-
getSecondaryTable
- Specified by:
getSecondaryTablein interfaceTableContainer
-
getSuperType
- Specified by:
getSuperTypein interfaceIdentifiableTypeClass
-
getSubTypes
- Specified by:
getSubTypesin interfaceIdentifiableTypeClass
-
getImplicitTable
- Specified by:
getImplicitTablein interfaceIdentifiableTypeClass
-
applyProperty
- Specified by:
applyPropertyin interfaceIdentifiableTypeClass
-