org.hibernate.ejb.metamodel
Class MetamodelImpl

java.lang.Object
  extended by org.hibernate.ejb.metamodel.MetamodelImpl
All Implemented Interfaces:
Serializable, javax.persistence.metamodel.Metamodel

public class MetamodelImpl
extends Object
implements javax.persistence.metamodel.Metamodel, Serializable

Hibernate implementation of the JPA Metamodel contract.

Author:
Steve Ebersole, Emmanuel Bernard
See Also:
Serialized Form

Method Summary
static MetamodelImpl buildMetamodel(Iterator<PersistentClass> persistentClasses, SessionFactoryImplementor sessionFactory)
          Build the metamodel using the information from the collection of Hibernate PersistentClass models as well as the Hibernate SessionFactory.
<X> javax.persistence.metamodel.EmbeddableType<X>
embeddable(Class<X> cls)
          
<X> javax.persistence.metamodel.EntityType<X>
entity(Class<X> cls)
          
 Set<javax.persistence.metamodel.EmbeddableType<?>> getEmbeddables()
          
 Set<javax.persistence.metamodel.EntityType<?>> getEntities()
          
 Set<javax.persistence.metamodel.ManagedType<?>> getManagedTypes()
          
<X> javax.persistence.metamodel.ManagedType<X>
managedType(Class<X> cls)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildMetamodel

public static MetamodelImpl buildMetamodel(Iterator<PersistentClass> persistentClasses,
                                           SessionFactoryImplementor sessionFactory)
Build the metamodel using the information from the collection of Hibernate PersistentClass models as well as the Hibernate SessionFactory.

Parameters:
persistentClasses - Iterator over the Hibernate (config-time) metamodel
sessionFactory - The Hibernate session factry.
Returns:
The built metamodel

entity

public <X> javax.persistence.metamodel.EntityType<X> entity(Class<X> cls)

Specified by:
entity in interface javax.persistence.metamodel.Metamodel

managedType

public <X> javax.persistence.metamodel.ManagedType<X> managedType(Class<X> cls)

Specified by:
managedType in interface javax.persistence.metamodel.Metamodel

embeddable

public <X> javax.persistence.metamodel.EmbeddableType<X> embeddable(Class<X> cls)

Specified by:
embeddable in interface javax.persistence.metamodel.Metamodel

getManagedTypes

public Set<javax.persistence.metamodel.ManagedType<?>> getManagedTypes()

Specified by:
getManagedTypes in interface javax.persistence.metamodel.Metamodel

getEntities

public Set<javax.persistence.metamodel.EntityType<?>> getEntities()

Specified by:
getEntities in interface javax.persistence.metamodel.Metamodel

getEmbeddables

public Set<javax.persistence.metamodel.EmbeddableType<?>> getEmbeddables()

Specified by:
getEmbeddables in interface javax.persistence.metamodel.Metamodel


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.