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 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.data.model.PersistentProperty
getCapitilizedName, getConverter, isAssignable, isAutoPopulated, isConstructorArgument, isGenerated, isReadOnly, isRequired
-
-
-
-
Method Detail
-
isOptional
public boolean isOptional()
Description copied from interface:PersistentProperty
Whether the property can be set to null.- Specified by:
isOptional
in interfacePersistentProperty
- Returns:
- True if it can
-
isEnum
public boolean isEnum()
- Specified by:
isEnum
in interfacePersistentProperty
- Returns:
- Returns whether the property is an enum.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
getDataType
public DataType getDataType()
- Specified by:
getDataType
in interfacePersistentProperty
- Returns:
- The data type
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
- Specified by:
getAnnotationMetadata
in interfaceio.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 interfaceio.micronaut.inject.ast.Element
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
- Specified by:
getName
in interfacePersistentProperty
- Returns:
- The property name
-
isProtected
public boolean isProtected()
- Specified by:
isProtected
in interfaceio.micronaut.inject.ast.Element
-
isPublic
public boolean isPublic()
- Specified by:
isPublic
in interfaceio.micronaut.inject.ast.Element
-
getNativeType
public java.lang.Object getNativeType()
- Specified by:
getNativeType
in interfaceio.micronaut.inject.ast.Element
-
getTypeName
@NonNull public java.lang.String getTypeName()
Description copied from interface:PersistentProperty
The type of the property.- Specified by:
getTypeName
in interfacePersistentProperty
- Returns:
- The property type
-
getOwner
@NonNull public PersistentEntity getOwner()
Description copied from interface:PersistentProperty
Obtains the owner of this persistent property.- Specified by:
getOwner
in interfacePersistentProperty
- Returns:
- The owner
-
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 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:
getType
in interfaceio.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 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:
toString
in classjava.lang.Object
-
-