Class SourcePersistentProperty

java.lang.Object
io.micronaut.data.processor.model.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.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>, io.micronaut.inject.ast.Element, io.micronaut.inject.ast.TypedElement
Direct Known Subclasses:
SourceAssociation

@Internal public class SourcePersistentProperty extends 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

    Fields inherited from interface io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    The alias of the property if used in a query.
    io.micronaut.core.annotation.AnnotationMetadata
     
    @Nullable String
    Returns converter class name if present.
     
    @NonNull String
    The name of the property.
     
    Obtains the owner of this persistent property.
    @NonNull String
    The persisted name is the fully qualified name including potential schema definitions.
    @NonNull io.micronaut.inject.ast.PropertyElement
     
    @NonNull io.micronaut.inject.ast.ClassElement
     
    @NonNull String
    The type of the property.
    int
     
    boolean
    isAssignable(@NonNull String type)
    Is the property assignable to the given type name.
    boolean
     
    boolean
    Whether the property can be set to null.
    boolean
     
    boolean
     
     

    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

    enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent

    Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate

    booleanValue, 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, 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, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype, withAnnotationMetadata

    Methods inherited from interface io.micronaut.inject.ast.TypedElement

    getArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
  • Method Details

    • getAlias

      public String getAlias()
      Description copied from interface: PersistentProperty
      The alias of the property if used in a query.
      Specified by:
      getAlias in interface PersistentProperty
      Returns:
      The alias.
    • isOptional

      public boolean isOptional()
      Description copied from interface: PersistentProperty
      Whether the property can be set to null.
      Specified by:
      isOptional in interface PersistentProperty
      Returns:
      True if it can
    • isEnum

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getDataType

      public DataType getDataType()
      Specified by:
      getDataType in interface PersistentProperty
      Returns:
      The data type
    • hashCode

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

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

      @NonNull public @NonNull 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 Object getNativeType()
      Specified by:
      getNativeType in interface io.micronaut.inject.ast.Element
    • getTypeName

      @NonNull public @NonNull String getTypeName()
      Description copied from interface: PersistentProperty
      The type of the property.
      Specified by:
      getTypeName in interface PersistentProperty
      Returns:
      The property type
    • getOwner

      @NonNull public @NonNull PersistentEntity getOwner()
      Description copied from interface: PersistentProperty
      Obtains the owner of this persistent property.
      Specified by:
      getOwner in interface PersistentProperty
      Returns:
      The owner
    • isAssignable

      public boolean isAssignable(@NonNull @NonNull 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 @NonNull io.micronaut.inject.ast.PropertyElement getPropertyElement()
      Returns:
      The property element.
    • getType

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

      @NonNull public @NonNull 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 @Nullable String getConverterClassName()
      Returns converter class name if present.
      Returns:
      the converter's class name
    • toString

      public String toString()
      Overrides:
      toString in class Object