public abstract class AbstractIdentifiableType<X> extends AbstractManagedType<X> implements javax.persistence.metamodel.IdentifiableType<X>, java.io.Serializable
IdentifiableType
types. JPA defines
identifiable types as entities or mapped-superclasses. Basically things to which an
identifier can be attached.
NOTE : Currently we only really have support for direct entities in the Hibernate metamodel
as the information for them is consumed into the closest actual entity subclass(es) in the
internal Hibernate mapping-metamodel.Modifier and Type | Class and Description |
---|---|
static interface |
AbstractIdentifiableType.Builder<X> |
Constructor and Description |
---|
AbstractIdentifiableType(java.lang.Class<X> javaType,
java.lang.String typeName,
AbstractIdentifiableType<? super X> superType,
boolean hasIdClass,
boolean hasIdentifierProperty,
boolean versioned) |
Modifier and Type | Method and Description |
---|---|
AbstractIdentifiableType.Builder<X> |
getBuilder() |
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredId(java.lang.Class<Y> javaType) |
javax.persistence.metamodel.SingularAttribute<X,?> |
getDeclaredVersion()
For used to retrieve the declared version when populating the static metamodel.
|
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredVersion(java.lang.Class<Y> javaType) |
<Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> |
getId(java.lang.Class<Y> javaType) |
java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> |
getIdClassAttributes() |
java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> |
getIdClassAttributesSafely()
A form of
getIdClassAttributes() which prefers to return null rather than throw exceptions |
javax.persistence.metamodel.Type<?> |
getIdType() |
AbstractIdentifiableType<? super X> |
getSupertype() |
<Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> |
getVersion(java.lang.Class<Y> javaType) |
boolean |
hasDeclaredVersionAttribute() |
boolean |
hasIdClass() |
boolean |
hasSingleIdAttribute() |
boolean |
hasVersionAttribute() |
protected SingularAttributeImpl |
internalGetId() |
protected SingularAttributeImpl |
internalGetVersion() |
getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes, isPrimitiveVariant, lock
getJavaType, getTypeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes
public AbstractIdentifiableType(java.lang.Class<X> javaType, java.lang.String typeName, AbstractIdentifiableType<? super X> superType, boolean hasIdClass, boolean hasIdentifierProperty, boolean versioned)
public boolean hasIdClass()
public boolean hasSingleIdAttribute()
hasSingleIdAttribute
in interface javax.persistence.metamodel.IdentifiableType<X>
public AbstractIdentifiableType<? super X> getSupertype()
getSupertype
in interface javax.persistence.metamodel.IdentifiableType<X>
getSupertype
in class AbstractManagedType<X>
public <Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> getId(java.lang.Class<Y> javaType)
getId
in interface javax.persistence.metamodel.IdentifiableType<X>
protected SingularAttributeImpl internalGetId()
public <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredId(java.lang.Class<Y> javaType)
getDeclaredId
in interface javax.persistence.metamodel.IdentifiableType<X>
public javax.persistence.metamodel.Type<?> getIdType()
getIdType
in interface javax.persistence.metamodel.IdentifiableType<X>
public java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getIdClassAttributesSafely()
getIdClassAttributes()
which prefers to return null
rather than throw exceptionsnull
public java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getIdClassAttributes()
getIdClassAttributes
in interface javax.persistence.metamodel.IdentifiableType<X>
public boolean hasVersionAttribute()
hasVersionAttribute
in interface javax.persistence.metamodel.IdentifiableType<X>
public boolean hasDeclaredVersionAttribute()
public <Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> getVersion(java.lang.Class<Y> javaType)
getVersion
in interface javax.persistence.metamodel.IdentifiableType<X>
protected SingularAttributeImpl internalGetVersion()
public <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredVersion(java.lang.Class<Y> javaType)
getDeclaredVersion
in interface javax.persistence.metamodel.IdentifiableType<X>
public javax.persistence.metamodel.SingularAttribute<X,?> getDeclaredVersion()
public AbstractIdentifiableType.Builder<X> getBuilder()
getBuilder
in class AbstractManagedType<X>
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.