Class SourcePersistentEntity
java.lang.Object
io.micronaut.data.model.AbstractPersistentEntity
io.micronaut.data.processor.model.SourcePersistentEntity
- All Implemented Interfaces:
- io.micronaut.core.annotation.AnnotatedElement,- io.micronaut.core.annotation.AnnotationMetadata,- io.micronaut.core.annotation.AnnotationMetadataDelegate,- io.micronaut.core.annotation.AnnotationMetadataProvider,- io.micronaut.core.annotation.AnnotationSource,- io.micronaut.core.naming.Described,- io.micronaut.core.naming.Named,- PersistentElement,- PersistentEntity,- io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>,- io.micronaut.inject.ast.Element,- io.micronaut.inject.ast.TypedElement
@Internal
public class SourcePersistentEntity
extends AbstractPersistentEntity
implements PersistentEntity, io.micronaut.inject.ast.TypedElement
An implementation of 
PersistentEntity that operates on the sources.- Since:
- 1.0
- Author:
- graemerocher
- 
Field SummaryFields inherited from interface io.micronaut.core.annotation.AnnotationMetadataCLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface io.micronaut.core.annotation.AnnotationSourceEMPTYFields inherited from interface io.micronaut.inject.ast.ElementEMPTY_ELEMENT_ARRAYFields inherited from interface io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegateEMPTY
- 
Constructor SummaryConstructorsConstructorDescriptionSourcePersistentEntity(@NonNull io.micronaut.inject.ast.ClassElement classElement, @NonNull Function<io.micronaut.inject.ast.ClassElement, SourcePersistentEntity> entityResolver) Default constructor.
- 
Method SummaryModifier and TypeMethodDescriptionio.micronaut.inject.ast.ClassElement@Nullable SourcePersistentProperty[]The composite id.@Nullable SourcePersistentPropertyReturns the identity of the instance.@Nullable SourcePersistentPropertygetIdentityByName(String name) Obtains an identity PersistentProperty instance by name.Returns all identity properties.Obtains a PersistentProperty representing id or version property by name.@NonNull StringgetName()The entity name including any package prefix.@Nullable PersistentEntityReturns the parent entity of this entity.@NonNull List<SourcePersistentProperty>A list of properties to be persisted.A list of property names that a persistent.@Nullable SourcePersistentPropertygetPropertyByName(String name) Obtains a PersistentProperty instance by name.@NonNull io.micronaut.inject.ast.ClassElementgetType()@Nullable SourcePersistentPropertyReturns the version property.booleanHas composite identity.booleanHas identity.booleanisOwningEntity(PersistentEntity owner) Returns whether the specified entity asserts ownership over this entity.booleanbooleanisPublic()toString()Methods inherited from class io.micronaut.data.model.AbstractPersistentEntityequals, findNamingStrategy, getAliasName, getAnnotationMetadata, getNamingStrategy, getPersistedName, hashCode, logDebugMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotatedElementisDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataenumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegatebooleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvidergetAnnotationMetadataMethods inherited from interface io.micronaut.inject.ast.Elementannotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype, withAnnotationMetadataMethods inherited from interface io.micronaut.data.model.PersistentElementgetPersistedNameMethods inherited from interface io.micronaut.data.model.PersistentEntityfindNamingStrategy, getAliasName, getAssociations, getDecapitalizedName, getEmbedded, getNamingStrategy, getPath, getPropertyByPath, getPropertyPath, getPropertyPath, getRootEntity, isEmbeddable, isRoot, isVersionedMethods inherited from interface io.micronaut.inject.ast.TypedElementgetArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
- 
Constructor Details- 
SourcePersistentEntitypublic SourcePersistentEntity(@NonNull @NonNull io.micronaut.inject.ast.ClassElement classElement, @NonNull @NonNull Function<io.micronaut.inject.ast.ClassElement, SourcePersistentEntity> entityResolver) Default constructor.- Parameters:
- classElement- The class element
- entityResolver- The entity resolver to resolve any additional entities such as associations
 
 
- 
- 
Method Details- 
getNameDescription copied from interface:PersistentEntityThe entity name including any package prefix.- Specified by:
- getNamein interface- io.micronaut.inject.ast.Element
- Specified by:
- getNamein interface- io.micronaut.core.naming.Named
- Specified by:
- getNamein interface- PersistentEntity
- Returns:
- The entity name
 
- 
getSimpleName- Specified by:
- getSimpleNamein interface- io.micronaut.inject.ast.Element
- Specified by:
- getSimpleNamein interface- PersistentEntity
- Returns:
- The simple name without the package of entity
 
- 
isProtectedpublic boolean isProtected()- Specified by:
- isProtectedin interface- io.micronaut.inject.ast.Element
 
- 
isPublicpublic boolean isPublic()- Specified by:
- isPublicin interface- io.micronaut.inject.ast.Element
 
- 
getNativeType- Specified by:
- getNativeTypein interface- io.micronaut.inject.ast.Element
 
- 
hasCompositeIdentitypublic boolean hasCompositeIdentity()Description copied from interface:PersistentEntityHas composite identity.- Specified by:
- hasCompositeIdentityin interface- PersistentEntity
- Returns:
- The true if composite identity present
 
- 
hasIdentitypublic boolean hasIdentity()Description copied from interface:PersistentEntityHas identity.- Specified by:
- hasIdentityin interface- PersistentEntity
- Returns:
- The true if identity present
 
- 
getCompositeIdentityDescription copied from interface:PersistentEntityThe composite id.- Specified by:
- getCompositeIdentityin interface- PersistentEntity
- Returns:
- The composite id or null if there isn't one
 
- 
getIdentityDescription copied from interface:PersistentEntityReturns the identity of the instance.- Specified by:
- getIdentityin interface- PersistentEntity
- Returns:
- The identity or null if there isn't one
 
- 
getIdentityPropertiesDescription copied from interface:PersistentEntityReturns all identity properties.- Specified by:
- getIdentityPropertiesin interface- PersistentEntity
- Returns:
- The identity properties
 
- 
getVersionDescription copied from interface:PersistentEntityReturns the version property.- Specified by:
- getVersionin interface- PersistentEntity
- Returns:
- the property
 
- 
getPersistentPropertiesDescription copied from interface:PersistentEntityA list of properties to be persisted.- Specified by:
- getPersistentPropertiesin interface- PersistentEntity
- Returns:
- A list of PersistentProperty instances
 
- 
getPropertyByNameDescription copied from interface:PersistentEntityObtains a PersistentProperty instance by name.- Specified by:
- getPropertyByNamein interface- PersistentEntity
- Parameters:
- name- The name of the property
- Returns:
- The PersistentProperty or null if it doesn't exist
 
- 
getIdentityByNameDescription copied from interface:PersistentEntityObtains an identity PersistentProperty instance by name.- Specified by:
- getIdentityByNamein interface- PersistentEntity
- Parameters:
- name- The name of the identity property
- Returns:
- The PersistentProperty or null if it doesn't exist
 
- 
getIdOrVersionPropertyByNameObtains a PersistentProperty representing id or version property by name.- Parameters:
- name- The name of the id or version property
- Returns:
- The PersistentProperty used as id or version or null if it doesn't exist
 
- 
getPersistentPropertyNamesDescription copied from interface:PersistentEntityA list of property names that a persistent.- Specified by:
- getPersistentPropertyNamesin interface- PersistentEntity
- Returns:
- A List of strings
 
- 
isOwningEntityDescription copied from interface:PersistentEntityReturns whether the specified entity asserts ownership over this entity.- Specified by:
- isOwningEntityin interface- PersistentEntity
- Parameters:
- owner- The owning entity
- Returns:
- True if it does own this entity
 
- 
getParentEntityDescription copied from interface:PersistentEntityReturns the parent entity of this entity.- Specified by:
- getParentEntityin interface- PersistentEntity
- Returns:
- The ParentEntity instance
 
- 
getClassElementpublic io.micronaut.inject.ast.ClassElement getClassElement()- Returns:
- The class element
 
- 
getType@NonNull public @NonNull io.micronaut.inject.ast.ClassElement getType()- Specified by:
- getTypein interface- io.micronaut.inject.ast.TypedElement
 
- 
toString
 
-