Class SourcePersistentProperty

  • 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, PersistentProperty, io.micronaut.inject.ast.Element, io.micronaut.inject.ast.TypedElement
    Direct Known Subclasses:
    SourceAssociation

    @Internal
    public class SourcePersistentProperty
    extends java.lang.Object
    implements PersistentProperty, io.micronaut.inject.ast.TypedElement
    Source code level implementation of PersistentProperty.
    Since:
    1.0.0
    Author:
    graemerocher
    • Field Summary

      • Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata

        CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
      • Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

        EMPTY
      • Fields inherited from interface io.micronaut.inject.ast.Element

        EMPTY_ELEMENT_ARRAY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()  
      java.lang.String getConverterClassName()
      Returns converter class name if present.
      DataType getDataType()  
      java.lang.String getName()
      The name of the property.
      java.lang.Object getNativeType()  
      PersistentEntity getOwner()
      Obtains the owner of this persistent property.
      java.lang.String getPersistedName()
      The persisted name is the fully qualified name including potential schema definitions.
      io.micronaut.inject.ast.PropertyElement getPropertyElement()  
      io.micronaut.inject.ast.ClassElement getType()  
      java.lang.String getTypeName()
      The type of the property.
      int hashCode()  
      boolean isAssignable​(java.lang.String type)
      Is the property assignable to the given type name.
      boolean isEnum()  
      boolean isOptional()
      Whether the property can be set to null.
      boolean isProtected()  
      boolean isPublic()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement

        isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata

        getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate

        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, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, 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, synthesizeDeclaredAnnotationsByType
      • Methods inherited from interface io.micronaut.inject.ast.Element

        annotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
      • Methods inherited from interface io.micronaut.inject.ast.TypedElement

        getArrayDimensions, getGenericType, isArray, isPrimitive
    • Method Detail

      • isEnum

        public boolean isEnum()
        Specified by:
        isEnum in interface PersistentProperty
        Returns:
        Returns whether the property is an enum.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getAnnotationMetadata

        public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
        Specified by:
        getAnnotationMetadata in interface io.micronaut.core.annotation.AnnotationMetadataProvider
      • getName

        @NonNull
        public java.lang.String getName()
        Description copied from interface: PersistentProperty
        The name of the property.
        Specified by:
        getName in interface io.micronaut.inject.ast.Element
        Specified by:
        getName in interface io.micronaut.core.naming.Named
        Specified by:
        getName in interface PersistentProperty
        Returns:
        The property name
      • isProtected

        public boolean isProtected()
        Specified by:
        isProtected in interface io.micronaut.inject.ast.Element
      • isPublic

        public boolean isPublic()
        Specified by:
        isPublic in interface io.micronaut.inject.ast.Element
      • getNativeType

        public java.lang.Object getNativeType()
        Specified by:
        getNativeType in interface io.micronaut.inject.ast.Element
      • isAssignable

        public boolean isAssignable​(@NonNull
                                    java.lang.String type)
        Description copied from interface: PersistentProperty
        Is the property assignable to the given type name.
        Specified by:
        isAssignable in interface PersistentProperty
        Parameters:
        type - The type name
        Returns:
        True if it is
      • getPropertyElement

        @NonNull
        public io.micronaut.inject.ast.PropertyElement getPropertyElement()
        Returns:
        The property element.
      • getType

        @NonNull
        public io.micronaut.inject.ast.ClassElement getType()
        Specified by:
        getType in interface io.micronaut.inject.ast.TypedElement
      • getPersistedName

        @NonNull
        public java.lang.String getPersistedName()
        Description copied from interface: PersistentElement
        The persisted name is the fully qualified name including potential schema definitions.
        Specified by:
        getPersistedName in interface PersistentElement
        Returns:
        The persisted name.
      • getConverterClassName

        @Nullable
        public java.lang.String getConverterClassName()
        Returns converter class name if present.
        Returns:
        the converter's class name
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object