@Internal public class SourcePersistentEntity extends AbstractPersistentEntity implements PersistentEntity, io.micronaut.inject.ast.TypedElement
PersistentEntity
that operates on the sources.Constructor and Description |
---|
SourcePersistentEntity(io.micronaut.inject.ast.ClassElement classElement,
java.util.function.Function<io.micronaut.inject.ast.ClassElement,SourcePersistentEntity> entityResolver)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Association> |
getAssociations()
A list of the associations for this entity.
|
io.micronaut.inject.ast.ClassElement |
getClassElement() |
PersistentProperty[] |
getCompositeIdentity()
The composite id.
|
java.util.List<Embedded> |
getEmbedded()
A list of embedded associations for this entity.
|
SourcePersistentProperty |
getIdentity()
Returns the identity of the instance.
|
SourcePersistentProperty |
getIdOrVersionPropertyByName(java.lang.String name)
Obtains a PersistentProperty representing id or version property by name.
|
java.lang.String |
getName()
The entity name including any package prefix.
|
java.lang.Object |
getNativeType() |
PersistentEntity |
getParentEntity()
Returns the parent entity of this entity.
|
java.util.List<SourcePersistentProperty> |
getPersistentProperties()
A list of properties to be persisted.
|
java.util.List<java.lang.String> |
getPersistentPropertyNames()
A list of property names that a persistent.
|
SourcePersistentProperty |
getPropertyByName(java.lang.String name)
Obtains a PersistentProperty instance by name.
|
java.lang.String |
getSimpleName() |
io.micronaut.inject.ast.ClassElement |
getType() |
SourcePersistentProperty |
getVersion()
Returns the version property.
|
boolean |
isOwningEntity(PersistentEntity owner)
Returns whether the specified entity asserts ownership over this
entity.
|
boolean |
isProtected() |
boolean |
isPublic() |
java.lang.String |
toString() |
equals, getAliasName, getAnnotationMetadata, getNamingStrategy, getPersistedName, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAliasName, getDecapitalizedName, getNamingStrategy, getPath, getPropertyByPath, getRootEntity, isEmbeddable, isRoot, isVersioned, of, of
getPersistedName
getArrayDimensions, getGenericType, isArray, isPrimitive
annotate, annotate, annotate, annotate, getDocumentation, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
public SourcePersistentEntity(@NonNull io.micronaut.inject.ast.ClassElement classElement, @NonNull java.util.function.Function<io.micronaut.inject.ast.ClassElement,SourcePersistentEntity> entityResolver)
classElement
- The class elemententityResolver
- The entity resolver to resolve any additional entities such as associations@NonNull public java.lang.String getName()
PersistentEntity
getName
in interface io.micronaut.core.naming.Named
getName
in interface PersistentEntity
getName
in interface io.micronaut.inject.ast.Element
public java.lang.String getSimpleName()
getSimpleName
in interface PersistentEntity
getSimpleName
in interface io.micronaut.inject.ast.Element
public boolean isProtected()
isProtected
in interface io.micronaut.inject.ast.Element
public boolean isPublic()
isPublic
in interface io.micronaut.inject.ast.Element
public java.lang.Object getNativeType()
getNativeType
in interface io.micronaut.inject.ast.Element
@Nullable public PersistentProperty[] getCompositeIdentity()
PersistentEntity
getCompositeIdentity
in interface PersistentEntity
@Nullable public SourcePersistentProperty getIdentity()
PersistentEntity
getIdentity
in interface PersistentEntity
@Nullable public SourcePersistentProperty getVersion()
PersistentEntity
getVersion
in interface PersistentEntity
@NonNull public java.util.List<SourcePersistentProperty> getPersistentProperties()
PersistentEntity
getPersistentProperties
in interface PersistentEntity
@NonNull public java.util.List<Association> getAssociations()
PersistentEntity
PersistentEntity.getPersistentProperties()
getAssociations
in interface PersistentEntity
@NonNull public java.util.List<Embedded> getEmbedded()
PersistentEntity
PersistentEntity.getPersistentProperties()
getEmbedded
in interface PersistentEntity
@Nullable public SourcePersistentProperty getPropertyByName(java.lang.String name)
PersistentEntity
getPropertyByName
in interface PersistentEntity
name
- The name of the propertypublic SourcePersistentProperty getIdOrVersionPropertyByName(java.lang.String name)
name
- The name of the id or version property@NonNull public java.util.List<java.lang.String> getPersistentPropertyNames()
PersistentEntity
getPersistentPropertyNames
in interface PersistentEntity
public boolean isOwningEntity(PersistentEntity owner)
PersistentEntity
isOwningEntity
in interface PersistentEntity
owner
- The owning entity@Nullable public PersistentEntity getParentEntity()
PersistentEntity
getParentEntity
in interface PersistentEntity
public io.micronaut.inject.ast.ClassElement getClassElement()
@NonNull public io.micronaut.inject.ast.ClassElement getType()
getType
in interface io.micronaut.inject.ast.TypedElement
public java.lang.String toString()
toString
in class java.lang.Object