org.hibernate.ejb.metamodel
Class AbstractManagedType<X>

java.lang.Object
  extended by org.hibernate.ejb.metamodel.AbstractType<X>
      extended by org.hibernate.ejb.metamodel.AbstractManagedType<X>
All Implemented Interfaces:
Serializable, javax.persistence.metamodel.ManagedType<X>, javax.persistence.metamodel.Type<X>
Direct Known Subclasses:
AbstractIdentifiableType, EmbeddableTypeImpl

public abstract class AbstractManagedType<X>
extends AbstractType<X>
implements javax.persistence.metamodel.ManagedType<X>, Serializable

Defines commonality for the JPA ManagedType hierarchy of interfaces.

Author:
Steve Ebersole
See Also:
Serialized Form

Nested Class Summary
static interface AbstractManagedType.Builder<X>
           
 
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Type
javax.persistence.metamodel.Type.PersistenceType
 
Constructor Summary
protected AbstractManagedType(Class<X> javaType, AbstractManagedType<? super X> superType)
           
 
Method Summary
 javax.persistence.metamodel.Attribute<? super X,?> getAttribute(String name)
          
 Set<javax.persistence.metamodel.Attribute<? super X,?>> getAttributes()
          
 AbstractManagedType.Builder<X> getBuilder()
           
 javax.persistence.metamodel.CollectionAttribute<? super X,?> getCollection(String name)
          
<E> javax.persistence.metamodel.CollectionAttribute<? super X,E>
getCollection(String name, Class<E> elementType)
          
 javax.persistence.metamodel.Attribute<X,?> getDeclaredAttribute(String name)
          
 Set<javax.persistence.metamodel.Attribute<X,?>> getDeclaredAttributes()
          
 javax.persistence.metamodel.CollectionAttribute<X,?> getDeclaredCollection(String name)
          
<E> javax.persistence.metamodel.CollectionAttribute<X,E>
getDeclaredCollection(String name, Class<E> elementType)
          
 javax.persistence.metamodel.ListAttribute<X,?> getDeclaredList(String name)
          
<E> javax.persistence.metamodel.ListAttribute<X,E>
getDeclaredList(String name, Class<E> elementType)
          
 javax.persistence.metamodel.MapAttribute<X,?,?> getDeclaredMap(String name)
          
<K,V> javax.persistence.metamodel.MapAttribute<X,K,V>
getDeclaredMap(String name, Class<K> keyType, Class<V> valueType)
           
 Set<javax.persistence.metamodel.PluralAttribute<X,?,?>> getDeclaredPluralAttributes()
          
 javax.persistence.metamodel.SetAttribute<X,?> getDeclaredSet(String name)
          
<E> javax.persistence.metamodel.SetAttribute<X,E>
getDeclaredSet(String name, Class<E> elementType)
          
 javax.persistence.metamodel.SingularAttribute<X,?> getDeclaredSingularAttribute(String name)
          
<Y> javax.persistence.metamodel.SingularAttribute<X,Y>
getDeclaredSingularAttribute(String name, Class<Y> javaType)
          
 Set<javax.persistence.metamodel.SingularAttribute<X,?>> getDeclaredSingularAttributes()
          
 javax.persistence.metamodel.ListAttribute<? super X,?> getList(String name)
          
<E> javax.persistence.metamodel.ListAttribute<? super X,E>
getList(String name, Class<E> elementType)
          
 javax.persistence.metamodel.MapAttribute<? super X,?,?> getMap(String name)
          
<K,V> javax.persistence.metamodel.MapAttribute<? super X,K,V>
getMap(String name, Class<K> keyType, Class<V> valueType)
           
 Set<javax.persistence.metamodel.PluralAttribute<? super X,?,?>> getPluralAttributes()
          
 javax.persistence.metamodel.SetAttribute<? super X,?> getSet(String name)
          
<E> javax.persistence.metamodel.SetAttribute<? super X,E>
getSet(String name, Class<E> elementType)
          
 javax.persistence.metamodel.SingularAttribute<? super X,?> getSingularAttribute(String name)
          
<Y> javax.persistence.metamodel.SingularAttribute<? super X,Y>
getSingularAttribute(String name, Class<Y> type)
          
 Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getSingularAttributes()
          
protected  AbstractManagedType<? super X> getSupertype()
           
protected
<Y> boolean
isPrimitiveVariant(javax.persistence.metamodel.SingularAttribute<?,?> attribute, Class<Y> javaType)
           
 void lock()
           
 
Methods inherited from class org.hibernate.ejb.metamodel.AbstractType
getJavaType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.persistence.metamodel.Type
getJavaType, getPersistenceType
 

Constructor Detail

AbstractManagedType

protected AbstractManagedType(Class<X> javaType,
                              AbstractManagedType<? super X> superType)
Method Detail

getSupertype

protected AbstractManagedType<? super X> getSupertype()

getBuilder

public AbstractManagedType.Builder<X> getBuilder()

lock

public void lock()

getAttributes

public Set<javax.persistence.metamodel.Attribute<? super X,?>> getAttributes()

Specified by:
getAttributes in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredAttributes

public Set<javax.persistence.metamodel.Attribute<X,?>> getDeclaredAttributes()

Specified by:
getDeclaredAttributes in interface javax.persistence.metamodel.ManagedType<X>

getAttribute

public javax.persistence.metamodel.Attribute<? super X,?> getAttribute(String name)

Specified by:
getAttribute in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredAttribute

public javax.persistence.metamodel.Attribute<X,?> getDeclaredAttribute(String name)

Specified by:
getDeclaredAttribute in interface javax.persistence.metamodel.ManagedType<X>

getSingularAttributes

public Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getSingularAttributes()

Specified by:
getSingularAttributes in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredSingularAttributes

public Set<javax.persistence.metamodel.SingularAttribute<X,?>> getDeclaredSingularAttributes()

Specified by:
getDeclaredSingularAttributes in interface javax.persistence.metamodel.ManagedType<X>

getSingularAttribute

public javax.persistence.metamodel.SingularAttribute<? super X,?> getSingularAttribute(String name)

Specified by:
getSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredSingularAttribute

public javax.persistence.metamodel.SingularAttribute<X,?> getDeclaredSingularAttribute(String name)

Specified by:
getDeclaredSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>

getSingularAttribute

public <Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> getSingularAttribute(String name,
                                                                                           Class<Y> type)

Specified by:
getSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredSingularAttribute

public <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredSingularAttribute(String name,
                                                                                           Class<Y> javaType)

Specified by:
getDeclaredSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>

isPrimitiveVariant

protected <Y> boolean isPrimitiveVariant(javax.persistence.metamodel.SingularAttribute<?,?> attribute,
                                         Class<Y> javaType)

getPluralAttributes

public Set<javax.persistence.metamodel.PluralAttribute<? super X,?,?>> getPluralAttributes()

Specified by:
getPluralAttributes in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredPluralAttributes

public Set<javax.persistence.metamodel.PluralAttribute<X,?,?>> getDeclaredPluralAttributes()

Specified by:
getDeclaredPluralAttributes in interface javax.persistence.metamodel.ManagedType<X>

getCollection

public javax.persistence.metamodel.CollectionAttribute<? super X,?> getCollection(String name)

Specified by:
getCollection in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredCollection

public javax.persistence.metamodel.CollectionAttribute<X,?> getDeclaredCollection(String name)

Specified by:
getDeclaredCollection in interface javax.persistence.metamodel.ManagedType<X>

getSet

public javax.persistence.metamodel.SetAttribute<? super X,?> getSet(String name)

Specified by:
getSet in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredSet

public javax.persistence.metamodel.SetAttribute<X,?> getDeclaredSet(String name)

Specified by:
getDeclaredSet in interface javax.persistence.metamodel.ManagedType<X>

getList

public javax.persistence.metamodel.ListAttribute<? super X,?> getList(String name)

Specified by:
getList in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredList

public javax.persistence.metamodel.ListAttribute<X,?> getDeclaredList(String name)

Specified by:
getDeclaredList in interface javax.persistence.metamodel.ManagedType<X>

getMap

public javax.persistence.metamodel.MapAttribute<? super X,?,?> getMap(String name)

Specified by:
getMap in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredMap

public javax.persistence.metamodel.MapAttribute<X,?,?> getDeclaredMap(String name)

Specified by:
getDeclaredMap in interface javax.persistence.metamodel.ManagedType<X>

getCollection

public <E> javax.persistence.metamodel.CollectionAttribute<? super X,E> getCollection(String name,
                                                                                      Class<E> elementType)

Specified by:
getCollection in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredCollection

public <E> javax.persistence.metamodel.CollectionAttribute<X,E> getDeclaredCollection(String name,
                                                                                      Class<E> elementType)

Specified by:
getDeclaredCollection in interface javax.persistence.metamodel.ManagedType<X>

getSet

public <E> javax.persistence.metamodel.SetAttribute<? super X,E> getSet(String name,
                                                                        Class<E> elementType)

Specified by:
getSet in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredSet

public <E> javax.persistence.metamodel.SetAttribute<X,E> getDeclaredSet(String name,
                                                                        Class<E> elementType)

Specified by:
getDeclaredSet in interface javax.persistence.metamodel.ManagedType<X>

getList

public <E> javax.persistence.metamodel.ListAttribute<? super X,E> getList(String name,
                                                                          Class<E> elementType)

Specified by:
getList in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredList

public <E> javax.persistence.metamodel.ListAttribute<X,E> getDeclaredList(String name,
                                                                          Class<E> elementType)

Specified by:
getDeclaredList in interface javax.persistence.metamodel.ManagedType<X>

getMap

public <K,V> javax.persistence.metamodel.MapAttribute<? super X,K,V> getMap(String name,
                                                                            Class<K> keyType,
                                                                            Class<V> valueType)
Specified by:
getMap in interface javax.persistence.metamodel.ManagedType<X>

getDeclaredMap

public <K,V> javax.persistence.metamodel.MapAttribute<X,K,V> getDeclaredMap(String name,
                                                                            Class<K> keyType,
                                                                            Class<V> valueType)
Specified by:
getDeclaredMap in interface javax.persistence.metamodel.ManagedType<X>


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