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.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 ofPersistentProperty.- Since:
- 1.0.0
- Author:
- graemerocher
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)io.micronaut.core.annotation.AnnotationMetadatagetAnnotationMetadata()java.lang.StringgetConverterClassName()Returns converter class name if present.DataTypegetDataType()java.lang.StringgetName()The name of the property.java.lang.ObjectgetNativeType()PersistentEntitygetOwner()Obtains the owner of this persistent property.java.lang.StringgetPersistedName()The persisted name is the fully qualified name including potential schema definitions.io.micronaut.inject.ast.PropertyElementgetPropertyElement()io.micronaut.inject.ast.ClassElementgetType()java.lang.StringgetTypeName()The type of the property.inthashCode()booleanisAssignable(java.lang.String type)Is the property assignable to the given type name.booleanisEnum()booleanisOptional()Whether the property can be set to null.booleanisProtected()booleanisPublic()java.lang.StringtoString()-
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.data.model.PersistentProperty
getCapitilizedName, getConverter, isAssignable, isAutoPopulated, isConstructorArgument, isGenerated, isReadOnly, isRequired
-
-
-
-
Method Detail
-
isOptional
public boolean isOptional()
Description copied from interface:PersistentPropertyWhether the property can be set to null.- Specified by:
isOptionalin interfacePersistentProperty- Returns:
- True if it can
-
isEnum
public boolean isEnum()
- Specified by:
isEnumin interfacePersistentProperty- Returns:
- Returns whether the property is an enum.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getDataType
public DataType getDataType()
- Specified by:
getDataTypein interfacePersistentProperty- Returns:
- The data type
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getName
@NonNull public java.lang.String getName()
Description copied from interface:PersistentPropertyThe name of the property.- Specified by:
getNamein interfaceio.micronaut.inject.ast.Element- Specified by:
getNamein interfaceio.micronaut.core.naming.Named- Specified by:
getNamein interfacePersistentProperty- Returns:
- The property name
-
isProtected
public boolean isProtected()
- Specified by:
isProtectedin interfaceio.micronaut.inject.ast.Element
-
isPublic
public boolean isPublic()
- Specified by:
isPublicin interfaceio.micronaut.inject.ast.Element
-
getNativeType
public java.lang.Object getNativeType()
- Specified by:
getNativeTypein interfaceio.micronaut.inject.ast.Element
-
getTypeName
@NonNull public java.lang.String getTypeName()
Description copied from interface:PersistentPropertyThe type of the property.- Specified by:
getTypeNamein interfacePersistentProperty- Returns:
- The property type
-
getOwner
@NonNull public PersistentEntity getOwner()
Description copied from interface:PersistentPropertyObtains the owner of this persistent property.- Specified by:
getOwnerin interfacePersistentProperty- Returns:
- The owner
-
isAssignable
public boolean isAssignable(@NonNull java.lang.String type)Description copied from interface:PersistentPropertyIs the property assignable to the given type name.- Specified by:
isAssignablein interfacePersistentProperty- 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:
getTypein interfaceio.micronaut.inject.ast.TypedElement
-
getPersistedName
@NonNull public java.lang.String getPersistedName()
Description copied from interface:PersistentElementThe persisted name is the fully qualified name including potential schema definitions.- Specified by:
getPersistedNamein interfacePersistentElement- 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:
toStringin classjava.lang.Object
-
-