X - the generic entity type.public abstract class AbstractManagedType<X> extends AbstractType<X> implements javax.persistence.metamodel.ManagedType<X>
ManagedType interface.| Modifier and Type | Class and Description |
|---|---|
private static class |
AbstractManagedType.InheritanceModel
The Class InheritanceModel.
|
| Modifier and Type | Field and Description |
|---|---|
private Map<String,javax.persistence.Column> |
columnBindings
The column bindings.
|
private Map<String,javax.persistence.metamodel.PluralAttribute<X,?,?>> |
declaredPluralAttributes
The declared plural attributes.
|
private Map<String,javax.persistence.metamodel.SingularAttribute<X,?>> |
declaredSingluarAttribs
The declared singluar attribs.
|
private EntityAnnotationProcessor |
entityAnnotationProcessor
The entity annotation processor.
|
private boolean |
hasEmbeddableAttribute
Whether a managed type has embeddable attribute.
|
private boolean |
hasLobAttribute
The has lob attribute.
|
protected boolean |
hasValidationConstraints
Whether a managed type has validation constraints.
|
private AbstractManagedType.InheritanceModel |
model
The model.
|
private List<javax.persistence.metamodel.ManagedType<X>> |
subManagedTypes
The sub managed types.
|
private javax.persistence.metamodel.ManagedType<? super X> |
superClazzType
The super clazz type.
|
private static List<Class<? extends Annotation>> |
validJPAAnnotations
The Constant validJPAAnnotations.
|
| Constructor and Description |
|---|
AbstractManagedType(Class<X> clazz,
javax.persistence.metamodel.Type.PersistenceType persistenceType,
javax.persistence.metamodel.ManagedType<? super X> superClazzType)
Super constructor with arguments.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPluralAttribute(String attributeName,
javax.persistence.metamodel.PluralAttribute<X,?,?> attribute)
Adds the plural attribute.
|
void |
addSingularAttribute(String attributeName,
javax.persistence.metamodel.SingularAttribute<X,?> attribute)
Adds the singular attribute.
|
private void |
addSubManagedType(javax.persistence.metamodel.ManagedType inheritedType)
Adds the sub managed type.
|
private void |
bindAttribute(Annotation annotation)
Bind attribute.
|
private void |
bindTypeAnnotations()
Bind type annotations.
|
private AbstractManagedType.InheritanceModel |
buildInheritenceModel()
Build inheritance model.
|
private void |
checkForValid()
Check for valid.
|
private void |
checkForValid(String paramName,
javax.persistence.metamodel.Attribute<? super X,?> attribute)
Check for valid.
|
javax.persistence.metamodel.Attribute<? super X,?> |
getAttribute(String paramName) |
javax.persistence.Column |
getAttributeBinding(Field attribute)
Gets the attribute binding.
|
Set<javax.persistence.metamodel.Attribute<? super X,?>> |
getAttributes() |
javax.persistence.metamodel.CollectionAttribute<? super X,?> |
getCollection(String paramName) |
<E> javax.persistence.metamodel.CollectionAttribute<? super X,E> |
getCollection(String paramName,
Class<E> paramClass) |
javax.persistence.metamodel.Attribute<X,?> |
getDeclaredAttribute(String paramName) |
private javax.persistence.metamodel.Attribute<X,?> |
getDeclaredAttribute(String paramName,
boolean checkValidity)
Gets the declared attribute.
|
Set<javax.persistence.metamodel.Attribute<X,?>> |
getDeclaredAttributes() |
javax.persistence.metamodel.CollectionAttribute<X,?> |
getDeclaredCollection(String paramName) |
<E> javax.persistence.metamodel.CollectionAttribute<X,E> |
getDeclaredCollection(String paramString,
Class<E> paramClass) |
javax.persistence.metamodel.ListAttribute<X,?> |
getDeclaredList(String paramName) |
<E> javax.persistence.metamodel.ListAttribute<X,E> |
getDeclaredList(String paramName,
Class<E> paramClass) |
javax.persistence.metamodel.MapAttribute<X,?,?> |
getDeclaredMap(String paramName) |
<K,V> javax.persistence.metamodel.MapAttribute<X,K,V> |
getDeclaredMap(String paramName,
Class<K> keyClazz,
Class<V> valueClazz) |
private javax.persistence.metamodel.PluralAttribute<X,?,?> |
getDeclaredPluralAttribute(String paramName)
Gets the declared plural attribute.
|
Set<javax.persistence.metamodel.PluralAttribute<X,?,?>> |
getDeclaredPluralAttributes() |
javax.persistence.metamodel.SetAttribute<X,?> |
getDeclaredSet(String paramName) |
<E> javax.persistence.metamodel.SetAttribute<X,E> |
getDeclaredSet(String paramName,
Class<E> paramClass) |
javax.persistence.metamodel.SingularAttribute<X,?> |
getDeclaredSingularAttribute(String paramString) |
private javax.persistence.metamodel.SingularAttribute<X,?> |
getDeclaredSingularAttribute(String paramString,
boolean checkValidity)
Returns declared singular attribute.
|
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredSingularAttribute(String paramString,
Class<Y> paramClass) |
private <Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredSingularAttribute(String paramString,
Class<Y> paramClass,
boolean checkValidity)
Returns declared singular attribute.
|
Set<javax.persistence.metamodel.SingularAttribute<X,?>> |
getDeclaredSingularAttributes() |
String |
getDiscriminatorColumn()
Gets the discriminator column.
|
String |
getDiscriminatorValue()
Gets the discriminator value.
|
EntityAnnotationProcessor |
getEntityAnnotation()
Gets the entity annotation.
|
javax.persistence.InheritanceType |
getInheritenceType()
Gets the inheritence type.
|
javax.persistence.metamodel.ListAttribute<? super X,?> |
getList(String paramName) |
<E> javax.persistence.metamodel.ListAttribute<? super X,E> |
getList(String paramName,
Class<E> paramClass) |
javax.persistence.metamodel.MapAttribute<? super X,?,?> |
getMap(String paramName) |
<K,V> javax.persistence.metamodel.MapAttribute<? super X,K,V> |
getMap(String paramName,
Class<K> keyClazz,
Class<V> valueClazz) |
Set<javax.persistence.metamodel.PluralAttribute<? super X,?,?>> |
getPluralAttributes() |
private javax.persistence.metamodel.PluralAttribute<? super X,?,?> |
getPluralAttriute(String paramName)
Gets the plural attriute.
|
String |
getSchemaName()
Gets the schema name.
|
javax.persistence.metamodel.SetAttribute<? super X,?> |
getSet(String paramName) |
<E> javax.persistence.metamodel.SetAttribute<? super X,E> |
getSet(String paramName,
Class<E> paramClass) |
javax.persistence.metamodel.SingularAttribute<? super X,?> |
getSingularAttribute(String paramString) |
private javax.persistence.metamodel.SingularAttribute<? super X,?> |
getSingularAttribute(String paramString,
boolean checkValidity)
Gets the singular attribute.
|
<Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> |
getSingularAttribute(String paramString,
Class<Y> paramClass) |
Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> |
getSingularAttributes() |
List<javax.persistence.metamodel.ManagedType<X>> |
getSubManagedType()
Gets the sub managed type.
|
(package private) javax.persistence.metamodel.ManagedType<? super X> |
getSuperClazzType()
Gets the super clazz type.
|
String |
getTableName()
Gets the table name.
|
boolean |
hasEmbeddableAttribute()
Checks for embeddable attribute.
|
boolean |
hasLobAttribute()
Checks for lob attribute.
|
boolean |
hasValidationConstraints()
Checks for validation constraints.
|
private <E> boolean |
isBindable(javax.persistence.metamodel.Bindable<?> attribute,
Class<E> elementType)
Checks if is bindable.
|
private boolean |
isCollectionAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
Checks if is collection attribute.
|
boolean |
isInherited()
Checks if is inherited.
|
private boolean |
isListAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
Checks if is list attribute.
|
private boolean |
isMapAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
Checks if is map attribute.
|
private boolean |
isSetAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
Checks if is sets the attribute.
|
private <E> boolean |
onCheckCollectionAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute,
Class<E> paramClass)
On check collection attribute.
|
private <E> boolean |
onCheckListAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute,
Class<E> paramClass)
On check list attribute.
|
private <V> boolean |
onCheckMapAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute,
Class<V> valueClazz)
On check map attribute.
|
private <E> boolean |
onCheckSetAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute,
Class<E> paramClass)
On check set attribute.
|
private void |
onEmbeddableAttribute(Field field)
Sets if a managed type consists of an embeddable attribute.
|
private AbstractManagedType.InheritanceModel |
onStrategyType(AbstractManagedType.InheritanceModel model,
javax.persistence.InheritanceType strategyType,
String descriminator,
String descriminatorValue,
String tableName,
String schemaName)
On strategy type.
|
private void |
onValidateAttributeConstraints(Field field)
Sets the validation constraint present field if an attribute has a
constraint present.
|
private void |
onValidity(String paramString,
boolean checkValidity,
javax.persistence.metamodel.SingularAttribute<? super X,?> attribute)
On validity check.
|
void |
setHasLobAttribute(boolean hasLobAttribute)
Sets the checks for lob attribute.
|
getJavaType, getPersistenceTypeprivate javax.persistence.metamodel.ManagedType<? super X> superClazzType
private Map<String,javax.persistence.metamodel.SingularAttribute<X,?>> declaredSingluarAttribs
private Map<String,javax.persistence.metamodel.PluralAttribute<X,?,?>> declaredPluralAttributes
private static final List<Class<? extends Annotation>> validJPAAnnotations
private AbstractManagedType.InheritanceModel model
private EntityAnnotationProcessor entityAnnotationProcessor
private List<javax.persistence.metamodel.ManagedType<X>> subManagedTypes
private boolean hasLobAttribute
protected boolean hasValidationConstraints
private boolean hasEmbeddableAttribute
AbstractManagedType(Class<X> clazz, javax.persistence.metamodel.Type.PersistenceType persistenceType, javax.persistence.metamodel.ManagedType<? super X> superClazzType)
clazz - parameterised class.persistenceType - persistenceType.superClazzType - the super clazz typepublic boolean hasLobAttribute()
public void setHasLobAttribute(boolean hasLobAttribute)
hasLobAttribute - the new checks for lob attributepublic Set<javax.persistence.metamodel.Attribute<? super X,?>> getAttributes()
getAttributes in interface javax.persistence.metamodel.ManagedType<X>public Set<javax.persistence.metamodel.Attribute<X,?>> getDeclaredAttributes()
getDeclaredAttributes in interface javax.persistence.metamodel.ManagedType<X>public <Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> getSingularAttribute(String paramString, Class<Y> paramClass)
getSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>public <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredSingularAttribute(String paramString, Class<Y> paramClass)
getDeclaredSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>public Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getSingularAttributes()
getSingularAttributes in interface javax.persistence.metamodel.ManagedType<X>public Set<javax.persistence.metamodel.SingularAttribute<X,?>> getDeclaredSingularAttributes()
getDeclaredSingularAttributes in interface javax.persistence.metamodel.ManagedType<X>public <E> javax.persistence.metamodel.CollectionAttribute<? super X,E> getCollection(String paramName, Class<E> paramClass)
getCollection in interface javax.persistence.metamodel.ManagedType<X>public <E> javax.persistence.metamodel.CollectionAttribute<X,E> getDeclaredCollection(String paramString, Class<E> paramClass)
getDeclaredCollection in interface javax.persistence.metamodel.ManagedType<X>public <E> javax.persistence.metamodel.SetAttribute<? super X,E> getSet(String paramName, Class<E> paramClass)
getSet in interface javax.persistence.metamodel.ManagedType<X>public <E> javax.persistence.metamodel.SetAttribute<X,E> getDeclaredSet(String paramName, Class<E> paramClass)
getDeclaredSet in interface javax.persistence.metamodel.ManagedType<X>public <E> javax.persistence.metamodel.ListAttribute<? super X,E> getList(String paramName, Class<E> paramClass)
getList in interface javax.persistence.metamodel.ManagedType<X>public <E> javax.persistence.metamodel.ListAttribute<X,E> getDeclaredList(String paramName, Class<E> paramClass)
getDeclaredList in interface javax.persistence.metamodel.ManagedType<X>public <K,V> javax.persistence.metamodel.MapAttribute<? super X,K,V> getMap(String paramName, Class<K> keyClazz, Class<V> valueClazz)
getMap in interface javax.persistence.metamodel.ManagedType<X>public <K,V> javax.persistence.metamodel.MapAttribute<X,K,V> getDeclaredMap(String paramName, Class<K> keyClazz, Class<V> valueClazz)
getDeclaredMap in interface javax.persistence.metamodel.ManagedType<X>public Set<javax.persistence.metamodel.PluralAttribute<? super X,?,?>> getPluralAttributes()
getPluralAttributes in interface javax.persistence.metamodel.ManagedType<X>public Set<javax.persistence.metamodel.PluralAttribute<X,?,?>> getDeclaredPluralAttributes()
getDeclaredPluralAttributes in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.Attribute<? super X,?> getAttribute(String paramName)
getAttribute in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.Attribute<X,?> getDeclaredAttribute(String paramName)
getDeclaredAttribute in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.SingularAttribute<? super X,?> getSingularAttribute(String paramString)
getSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>private javax.persistence.metamodel.SingularAttribute<? super X,?> getSingularAttribute(String paramString, boolean checkValidity)
paramString - the param stringcheckValidity - the check validitypublic javax.persistence.metamodel.SingularAttribute<X,?> getDeclaredSingularAttribute(String paramString)
getDeclaredSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.CollectionAttribute<? super X,?> getCollection(String paramName)
getCollection in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.CollectionAttribute<X,?> getDeclaredCollection(String paramName)
getDeclaredCollection in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.SetAttribute<? super X,?> getSet(String paramName)
getSet in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.SetAttribute<X,?> getDeclaredSet(String paramName)
getDeclaredSet in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.ListAttribute<? super X,?> getList(String paramName)
getList in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.ListAttribute<X,?> getDeclaredList(String paramName)
getDeclaredList in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.MapAttribute<? super X,?,?> getMap(String paramName)
getMap in interface javax.persistence.metamodel.ManagedType<X>public javax.persistence.metamodel.MapAttribute<X,?,?> getDeclaredMap(String paramName)
getDeclaredMap in interface javax.persistence.metamodel.ManagedType<X>javax.persistence.metamodel.ManagedType<? super X> getSuperClazzType()
public void addSingularAttribute(String attributeName, javax.persistence.metamodel.SingularAttribute<X,?> attribute)
attributeName - the attribute nameattribute - the attributepublic void addPluralAttribute(String attributeName, javax.persistence.metamodel.PluralAttribute<X,?,?> attribute)
attributeName - the attribute nameattribute - the attributepublic javax.persistence.Column getAttributeBinding(Field attribute)
attribute - the attributeprivate void addSubManagedType(javax.persistence.metamodel.ManagedType inheritedType)
inheritedType - the inherited typepublic List<javax.persistence.metamodel.ManagedType<X>> getSubManagedType()
private javax.persistence.metamodel.PluralAttribute<X,?,?> getDeclaredPluralAttribute(String paramName)
paramName - the param nameprivate javax.persistence.metamodel.PluralAttribute<? super X,?,?> getPluralAttriute(String paramName)
paramName - the param nameprivate <E> boolean onCheckCollectionAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute, Class<E> paramClass)
E - the element typepluralAttribute - the plural attributeparamClass - the param classprivate <E> boolean onCheckSetAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute, Class<E> paramClass)
E - the element typepluralAttribute - the plural attributeparamClass - the param classprivate <E> boolean onCheckListAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute, Class<E> paramClass)
E - the element typepluralAttribute - the plural attributeparamClass - the param classprivate <V> boolean onCheckMapAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> pluralAttribute, Class<V> valueClazz)
V - the value typepluralAttribute - the plural attributevalueClazz - the value clazzprivate boolean isCollectionAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
attribute - the attributeprivate boolean isListAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
attribute - the attributeprivate boolean isSetAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
attribute - the attributeprivate boolean isMapAttribute(javax.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
attribute - the attributeprivate <E> boolean isBindable(javax.persistence.metamodel.Bindable<?> attribute,
Class<E> elementType)
E - the element typeattribute - the attributeelementType - the element typeprivate void checkForValid(String paramName, javax.persistence.metamodel.Attribute<? super X,?> attribute)
paramName - the param nameattribute - the attributeprivate javax.persistence.metamodel.Attribute<X,?> getDeclaredAttribute(String paramName, boolean checkValidity)
paramName - the param namecheckValidity - the check validityprivate <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredSingularAttribute(String paramString, Class<Y> paramClass, boolean checkValidity)
Y - the generic typeparamString - the param stringparamClass - the param classcheckValidity - the check validityprivate javax.persistence.metamodel.SingularAttribute<X,?> getDeclaredSingularAttribute(String paramString, boolean checkValidity)
paramString - the param stringcheckValidity - the check validityprivate void onValidity(String paramString, boolean checkValidity, javax.persistence.metamodel.SingularAttribute<? super X,?> attribute)
paramString - the param stringcheckValidity - the check validityattribute - the attributeprivate void bindTypeAnnotations()
private void bindAttribute(Annotation annotation)
annotation - the annotationprivate void checkForValid()
private AbstractManagedType.InheritanceModel buildInheritenceModel()
private AbstractManagedType.InheritanceModel onStrategyType(AbstractManagedType.InheritanceModel model, javax.persistence.InheritanceType strategyType, String descriminator, String descriminatorValue, String tableName, String schemaName)
model - the modelstrategyType - the strategy typedescriminator - the descriminatordescriminatorValue - the descriminator valuetableName - the table nameschemaName - the schema namepublic boolean isInherited()
public javax.persistence.InheritanceType getInheritenceType()
public String getDiscriminatorColumn()
public String getDiscriminatorValue()
public String getTableName()
public String getSchemaName()
public EntityAnnotationProcessor getEntityAnnotation()
public boolean hasValidationConstraints()
private void onValidateAttributeConstraints(Field field)
field - the fieldprivate void onEmbeddableAttribute(Field field)
field - the fieldpublic boolean hasEmbeddableAttribute()
Copyright © 2015. All Rights Reserved.