Class RuntimePersistentProperty<T>

java.lang.Object
io.micronaut.data.model.runtime.RuntimePersistentProperty<T>
Type Parameters:
T - The owner type
All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.naming.Named, PersistentElement, PersistentProperty
Direct Known Subclasses:
RuntimeAssociation

public class RuntimePersistentProperty<T> extends Object implements PersistentProperty
A runtime representation of PersistentProperty.
Since:
1.0.0
Author:
graemerocher
  • Field Details

  • 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.
    • getArgument

      public io.micronaut.core.type.Argument<Object> getArgument()
      Returns:
      The argument for this property.
    • isConstructorArgument

      public boolean isConstructorArgument()
      Specified by:
      isConstructorArgument in interface PersistentProperty
      Returns:
      Is the property also a constructor argument.
    • isOptional

      public final 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.
    • getDataType

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

      public JsonDataType getJsonDataType()
      Specified by:
      getJsonDataType in interface PersistentProperty
      Returns:
      The json data type for DataType.JSON fields. If none specified, default is JsonDataType.DEFAULT.
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: PersistentProperty
      Whether the property is read-only, for example for generated values.
      Specified by:
      isReadOnly in interface PersistentProperty
      Returns:
      True if it is read-only
    • getType

      @NonNull public @NonNull Class<?> getType()
      Returns:
      The property type, unwrapped if primitive
    • getName

      @NonNull public @NonNull String getName()
      Description copied from interface: PersistentProperty
      The name of the property.
      Specified by:
      getName in interface io.micronaut.core.naming.Named
      Specified by:
      getName in interface PersistentProperty
      Returns:
      The property name
    • 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 RuntimePersistentEntity<T> 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
    • isAssignable

      public boolean isAssignable(@NonNull @NonNull Class<?> type)
      Description copied from interface: PersistentProperty
      Is the property assignable to the given type.
      Specified by:
      isAssignable in interface PersistentProperty
      Parameters:
      type - The type
      Returns:
      True it is
    • getAnnotationMetadata

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

      public io.micronaut.core.beans.BeanProperty<T,Object> getProperty()
      Returns:
      The backing bean property
    • getConverter

      public AttributeConverter<Object,Object> getConverter()
      Specified by:
      getConverter in interface PersistentProperty
      Returns:
      Returns possible property convertor.
    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object