HHH-4533 move metamodel storage to Hibernate Core
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17873 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
f795bd31e4
commit
1352b5e25f
|
@ -986,6 +986,7 @@ public final class AnnotationBinder {
|
||||||
mappedSuperclass = mappings.getMappedSuperclass( type );
|
mappedSuperclass = mappings.getMappedSuperclass( type );
|
||||||
if (mappedSuperclass == null) {
|
if (mappedSuperclass == null) {
|
||||||
mappedSuperclass = new org.hibernate.mapping.MappedSuperclass(parentSuperclass, superEntity );
|
mappedSuperclass = new org.hibernate.mapping.MappedSuperclass(parentSuperclass, superEntity );
|
||||||
|
mappedSuperclass.setMappedClass( type );
|
||||||
mappings.addMappedSuperclass( type, mappedSuperclass );
|
mappings.addMappedSuperclass( type, mappedSuperclass );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -295,6 +295,16 @@ public class Configuration implements Serializable {
|
||||||
return tables.values().iterator();
|
return tables.values().iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterate the mapped superclasses mappings
|
||||||
|
* EXPERIMENTAL Consider this API as PRIVATE
|
||||||
|
*
|
||||||
|
* @return Iterator<MappedSuperclass> over the MappedSuperclass mapping currently contained in the configuration.
|
||||||
|
*/
|
||||||
|
public Iterator getMappedSuperclassMappings() {
|
||||||
|
return mappedSuperclasses.values().iterator();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the mapping for a particular entity
|
* Get the mapping for a particular entity
|
||||||
*
|
*
|
||||||
|
@ -2761,9 +2771,5 @@ public class Configuration implements Serializable {
|
||||||
public MappedSuperclass getMappedSuperclass(Class type) {
|
public MappedSuperclass getMappedSuperclass(Class type) {
|
||||||
return (MappedSuperclass) mappedSuperclasses.get( type );
|
return (MappedSuperclass) mappedSuperclasses.get( type );
|
||||||
}
|
}
|
||||||
|
|
||||||
public Iterator iterateMappedSuperclasses() {
|
|
||||||
return mappedSuperclasses.values().iterator();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -543,12 +543,4 @@ public interface Mappings {
|
||||||
* @return the MappedSuperclass
|
* @return the MappedSuperclass
|
||||||
*/
|
*/
|
||||||
org.hibernate.mapping.MappedSuperclass getMappedSuperclass(Class type);
|
org.hibernate.mapping.MappedSuperclass getMappedSuperclass(Class type);
|
||||||
|
|
||||||
/**
|
|
||||||
* Iterator over the MappedSuperclass mappings
|
|
||||||
* Use an iterator as a symetry to the other methods on Mappings
|
|
||||||
*
|
|
||||||
* @return mappedSuperclasses
|
|
||||||
*/
|
|
||||||
public Iterator iterateMappedSuperclasses();
|
|
||||||
}
|
}
|
|
@ -20,6 +20,7 @@ public class MappedSuperclass {
|
||||||
private final MappedSuperclass superMappedSuperclass;
|
private final MappedSuperclass superMappedSuperclass;
|
||||||
private final PersistentClass superPersistentClass;
|
private final PersistentClass superPersistentClass;
|
||||||
private final List properties;
|
private final List properties;
|
||||||
|
private Class mappedClass;
|
||||||
|
|
||||||
public MappedSuperclass(MappedSuperclass superMappedSuperclass, PersistentClass superPersistentClass) {
|
public MappedSuperclass(MappedSuperclass superMappedSuperclass, PersistentClass superPersistentClass) {
|
||||||
this.superMappedSuperclass = superMappedSuperclass;
|
this.superMappedSuperclass = superMappedSuperclass;
|
||||||
|
@ -64,4 +65,12 @@ public class MappedSuperclass {
|
||||||
}
|
}
|
||||||
properties.add(p);
|
properties.add(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Class getMappedClass() {
|
||||||
|
return mappedClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMappedClass(Class mappedClass) {
|
||||||
|
this.mappedClass = mappedClass;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue