public class MappedSuperclass extends Object
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
Type | Property and Description |
---|---|
boolean |
hasIdentifier |
Constructor and Description |
---|
MappedSuperclass(MappedSuperclass superMappedSuperclass,
PersistentClass superPersistentClass) |
Modifier and Type | Method and Description |
---|---|
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 |
hasProperty(String name)
Check to see if this MappedSuperclass defines a property with the given name.
|
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.
|
boolean |
isVersioned() |
void |
setDeclaredIdentifierMapper(Component identifierMapper) |
void |
setDeclaredIdentifierProperty(Property prop) |
void |
setDeclaredVersion(Property prop) |
void |
setMappedClass(Class mappedClass) |
public MappedSuperclass(MappedSuperclass superMappedSuperclass, PersistentClass superPersistentClass)
public MappedSuperclass getSuperMappedSuperclass()
Returns the first superclass marked as @MappedSuperclass or null if: - none exists - or the first persistent superclass found is an @Entity
public boolean hasIdentifierProperty()
public boolean isVersioned()
public PersistentClass getSuperPersistentClass()
Returns the PersistentClass of the first superclass marked as @Entity or null if none exists
public Iterator getDeclaredPropertyIterator()
public void addDeclaredProperty(Property p)
public Class getMappedClass()
public void setMappedClass(Class mappedClass)
public Property getIdentifierProperty()
public Property getDeclaredIdentifierProperty()
public void setDeclaredIdentifierProperty(Property prop)
public Property getVersion()
public Property getDeclaredVersion()
public void setDeclaredVersion(Property prop)
public Component getIdentifierMapper()
public Component getDeclaredIdentifierMapper()
public void setDeclaredIdentifierMapper(Component identifierMapper)
public boolean hasProperty(String name)
Check to see if this MappedSuperclass defines a property with the given name.
name
- The property name to checktrue
if a property with that name exists; false
if notpublic 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.
name
- The property name to checktrue
if a property with that name exists; false
if notCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.