X
- The represented type.public abstract class ManagedTypeImpl<X> extends TypeImpl<X> implements javax.persistence.metamodel.ManagedType<X>
Purpose: Provides the implementation for the ManagedType interface of the JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API)
Description: Instances of the type ManagedType represent entities, mapped superclasses and embeddable types.
ManagedType
,
Serialized FormModifier and Type | Method and Description |
---|---|
javax.persistence.metamodel.Attribute<X,?> |
getAttribute(java.lang.String name)
Return the attribute of the managed
type that corresponds to the specified name.
|
java.util.Set<javax.persistence.metamodel.Attribute<? super X,?>> |
getAttributes()
Return the attributes of the managed type.
|
javax.persistence.metamodel.CollectionAttribute<? super X,?> |
getCollection(java.lang.String name)
Return the Collection-valued attribute of the managed type
that corresponds to the specified name.
|
<E> javax.persistence.metamodel.CollectionAttribute<? super X,E> |
getCollection(java.lang.String name,
java.lang.Class<E> elementType)
Return the Collection-valued attribute of the managed type
that corresponds to the specified name and Java element type.
|
javax.persistence.metamodel.Attribute<X,?> |
getDeclaredAttribute(java.lang.String name)
Return the declared attribute of the managed
type that corresponds to the specified name.
|
java.util.Set<javax.persistence.metamodel.Attribute<X,?>> |
getDeclaredAttributes()
Return the attributes declared by the managed type.
|
javax.persistence.metamodel.CollectionAttribute<X,?> |
getDeclaredCollection(java.lang.String name)
Return the Collection-valued attribute declared by the
managed type that corresponds to the specified name.
|
<E> javax.persistence.metamodel.CollectionAttribute<X,E> |
getDeclaredCollection(java.lang.String name,
java.lang.Class<E> elementType)
Return the Collection-valued attribute declared by the
managed type that corresponds to the specified name and Java
element type.
|
javax.persistence.metamodel.ListAttribute<X,?> |
getDeclaredList(java.lang.String name)
Return the List-valued attribute declared by the managed
type that corresponds to the specified name.
|
<E> javax.persistence.metamodel.ListAttribute<X,E> |
getDeclaredList(java.lang.String name,
java.lang.Class<E> elementType)
Return the List-valued attribute declared by the managed
type that corresponds to the specified name and Java
element type.
|
javax.persistence.metamodel.MapAttribute<X,?,?> |
getDeclaredMap(java.lang.String name)
Return the Map-valued attribute of the managed type that
corresponds to the specified name.
|
<K,V> javax.persistence.metamodel.MapAttribute<X,K,V> |
getDeclaredMap(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Return the Map-valued attribute of the managed type that
corresponds to the specified name and Java key and value
types.
|
java.util.Set<javax.persistence.metamodel.PluralAttribute<X,?,?>> |
getDeclaredPluralAttributes()
Return all collection-valued attributes declared by the
managed type.
|
javax.persistence.metamodel.SetAttribute<X,?> |
getDeclaredSet(java.lang.String name)
Return the Set-valued attribute declared by the managed type
that corresponds to the specified name.
|
<E> javax.persistence.metamodel.SetAttribute<X,E> |
getDeclaredSet(java.lang.String name,
java.lang.Class<E> elementType)
Return the Set-valued attribute declared by the managed type
that corresponds to the specified name and Java element type.
|
javax.persistence.metamodel.SingularAttribute<X,?> |
getDeclaredSingularAttribute(java.lang.String name)
Return the declared single-valued attribute of the managed
type that corresponds to the specified name in the
represented type.
|
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredSingularAttribute(java.lang.String name,
java.lang.Class<Y> type)
Return the declared single-valued attribute of the
managed type that corresponds to the specified name and Java
type in the represented type.
|
java.util.Set<javax.persistence.metamodel.SingularAttribute<X,?>> |
getDeclaredSingularAttributes()
Return the single-valued attributes declared by the managed
type.
|
ClassDescriptor |
getDescriptor()
INTERNAL:
Return the RelationalDescriptor associated with this ManagedType
|
javax.persistence.metamodel.ListAttribute<? super X,?> |
getList(java.lang.String name)
Return the List-valued attribute of the managed type that
corresponds to the specified name.
|
<E> javax.persistence.metamodel.ListAttribute<? super X,E> |
getList(java.lang.String name,
java.lang.Class<E> elementType)
Return the List-valued attribute of the managed type that
corresponds to the specified name and Java element type.
|
javax.persistence.metamodel.MapAttribute<? super X,?,?> |
getMap(java.lang.String name)
Return the Map-valued attribute of the managed type that
corresponds to the specified name.
|
<K,V> javax.persistence.metamodel.MapAttribute<? super X,K,V> |
getMap(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Return the Map-valued attribute of the managed type that
corresponds to the specified name and Java key and value
types.
|
java.util.Set<javax.persistence.metamodel.PluralAttribute<? super X,?,?>> |
getPluralAttributes()
Return all collection-valued attributes of the managed type.
|
javax.persistence.metamodel.SetAttribute<? super X,?> |
getSet(java.lang.String name)
Return the Set-valued attribute of the managed type that
corresponds to the specified name.
|
<E> javax.persistence.metamodel.SetAttribute<? super X,E> |
getSet(java.lang.String name,
java.lang.Class<E> elementType)
Return the Set-valued attribute of the managed type that
corresponds to the specified name and Java element type.
|
javax.persistence.metamodel.SingularAttribute<? super X,?> |
getSingularAttribute(java.lang.String name)
Return the single-valued attribute of the managed type that
corresponds to the specified name in the represented type.
|
<Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> |
getSingularAttribute(java.lang.String name,
java.lang.Class<Y> type)
Return the single-valued attribute of the managed
type that corresponds to the specified name and Java type
in the represented type.
|
java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> |
getSingularAttributes()
Return the single-valued attributes of the managed type.
|
getJavaType, getJavaType, getJavaTypeName, isEntity, isMappedSuperclass, toString
public javax.persistence.metamodel.Attribute<X,?> getAttribute(java.lang.String name)
getAttribute
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not present in the managed typepublic java.util.Set<javax.persistence.metamodel.Attribute<? super X,?>> getAttributes()
getAttributes
in interface javax.persistence.metamodel.ManagedType<X>
public javax.persistence.metamodel.CollectionAttribute<? super X,?> getCollection(java.lang.String name)
getCollection
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not present in the managed typepublic <E> javax.persistence.metamodel.CollectionAttribute<? super X,E> getCollection(java.lang.String name, java.lang.Class<E> elementType)
getCollection
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributeelementType
- the element type of the represented
attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not present in the managed typepublic java.util.Set<javax.persistence.metamodel.PluralAttribute<? super X,?,?>> getPluralAttributes()
getPluralAttributes
in interface javax.persistence.metamodel.ManagedType<X>
public javax.persistence.metamodel.Attribute<X,?> getDeclaredAttribute(java.lang.String name)
getDeclaredAttribute
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not declared in the managed typepublic java.util.Set<javax.persistence.metamodel.Attribute<X,?>> getDeclaredAttributes()
getDeclaredAttributes
in interface javax.persistence.metamodel.ManagedType<X>
public javax.persistence.metamodel.CollectionAttribute<X,?> getDeclaredCollection(java.lang.String name)
getDeclaredCollection
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not declared in the managed typepublic <E> javax.persistence.metamodel.CollectionAttribute<X,E> getDeclaredCollection(java.lang.String name, java.lang.Class<E> elementType)
getDeclaredCollection
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributeelementType
- the element type of the represented
attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not declared in the managed typepublic java.util.Set<javax.persistence.metamodel.PluralAttribute<X,?,?>> getDeclaredPluralAttributes()
getDeclaredPluralAttributes
in interface javax.persistence.metamodel.ManagedType<X>
public <E> javax.persistence.metamodel.ListAttribute<X,E> getDeclaredList(java.lang.String name, java.lang.Class<E> elementType)
getDeclaredList
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributeelementType
- the element type of the represented
attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not declared in the managed typepublic javax.persistence.metamodel.ListAttribute<X,?> getDeclaredList(java.lang.String name)
getDeclaredList
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not declared in the managed typepublic javax.persistence.metamodel.MapAttribute<X,?,?> getDeclaredMap(java.lang.String name)
getDeclaredMap
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not present in the managed typepublic <K,V> javax.persistence.metamodel.MapAttribute<X,K,V> getDeclaredMap(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
getDeclaredMap
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributekeyType
- the key type of the represented attributevalueType
- the value type of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not present in the managed typepublic javax.persistence.metamodel.SetAttribute<X,?> getDeclaredSet(java.lang.String name)
getDeclaredSet
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not declared in the managed typepublic <E> javax.persistence.metamodel.SetAttribute<X,E> getDeclaredSet(java.lang.String name, java.lang.Class<E> elementType)
getDeclaredSet
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributeelementType
- the element type of the represented
attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not declared in the managed typepublic javax.persistence.metamodel.SingularAttribute<X,?> getDeclaredSingularAttribute(java.lang.String name)
getDeclaredSingularAttribute
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not declared in the managed typepublic <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredSingularAttribute(java.lang.String name, java.lang.Class<Y> type)
getDeclaredSingularAttribute
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributetype
- the type of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not declared in the managed typepublic java.util.Set<javax.persistence.metamodel.SingularAttribute<X,?>> getDeclaredSingularAttributes()
getDeclaredSingularAttributes
in interface javax.persistence.metamodel.ManagedType<X>
public ClassDescriptor getDescriptor()
public javax.persistence.metamodel.ListAttribute<? super X,?> getList(java.lang.String name)
getList
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not present in the managed typepublic <E> javax.persistence.metamodel.ListAttribute<? super X,E> getList(java.lang.String name, java.lang.Class<E> elementType)
getList
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributeelementType
- the element type of the represented
attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not present in the managed typepublic javax.persistence.metamodel.MapAttribute<? super X,?,?> getMap(java.lang.String name)
getMap
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not present in the managed typepublic <K,V> javax.persistence.metamodel.MapAttribute<? super X,K,V> getMap(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
getMap
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributekeyType
- the key type of the represented attributevalueType
- the value type of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not present in the managed typepublic javax.persistence.metamodel.SetAttribute<? super X,?> getSet(java.lang.String name)
getSet
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not present in the managed typepublic <E> javax.persistence.metamodel.SetAttribute<? super X,E> getSet(java.lang.String name, java.lang.Class<E> elementType)
getSet
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributeelementType
- the element type of the represented
attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not present in the managed typepublic javax.persistence.metamodel.SingularAttribute<? super X,?> getSingularAttribute(java.lang.String name)
getSingularAttribute
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name is not present in the managed typepublic <Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> getSingularAttribute(java.lang.String name, java.lang.Class<Y> type)
getSingularAttribute
in interface javax.persistence.metamodel.ManagedType<X>
name
- the name of the represented attributetype
- the type of the represented attributejava.lang.IllegalArgumentException
- if attribute of the given
name and type is not present in the managed typepublic java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getSingularAttributes()
getSingularAttributes
in interface javax.persistence.metamodel.ManagedType<X>
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference