Package io.micronaut.data.model.runtime
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
A runtime representation of
PersistentProperty.- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
FieldsFields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.annotation.AnnotationMetadataio.micronaut.core.type.Argument<Object>@NonNull StringgetName()The name of the property.@NonNull RuntimePersistentEntity<T>getOwner()Obtains the owner of this persistent property.@NonNull StringThe persisted name is the fully qualified name including potential schema definitions.@NonNull Class<?>getType()@NonNull StringThe type of the property.booleanisAssignable(@NonNull Class<?> type) Is the property assignable to the given type.booleanisAssignable(@NonNull String type) Is the property assignable to the given type name.booleanbooleanisEnum()final booleanWhether the property can be set to null.booleanWhether the property is read-only, for example for generated values.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.data.model.PersistentProperty
getCapitilizedName, isAutoPopulated, isGenerated, isRequired
-
Field Details
-
EMPTY_PROPERTY_ARRAY
-
-
Method Details
-
getArgument
- Returns:
- The argument for this property.
-
isConstructorArgument
public boolean isConstructorArgument()- Specified by:
isConstructorArgumentin interfacePersistentProperty- Returns:
- Is the property also a constructor argument.
-
isOptional
public final 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.
-
getDataType
- Specified by:
getDataTypein interfacePersistentProperty- Returns:
- The data type
-
getJsonDataType
- Specified by:
getJsonDataTypein interfacePersistentProperty- Returns:
- The json data type for
DataType.JSONfields. If none specified, default isJsonDataType.DEFAULT.
-
isReadOnly
public boolean isReadOnly()Description copied from interface:PersistentPropertyWhether the property is read-only, for example for generated values.- Specified by:
isReadOnlyin interfacePersistentProperty- Returns:
- True if it is read-only
-
getType
- Returns:
- The property type, unwrapped if primitive
-
getName
Description copied from interface:PersistentPropertyThe name of the property.- Specified by:
getNamein interfaceio.micronaut.core.naming.Named- Specified by:
getNamein interfacePersistentProperty- Returns:
- The property name
-
getTypeName
Description copied from interface:PersistentPropertyThe type of the property.- Specified by:
getTypeNamein interfacePersistentProperty- Returns:
- The property type
-
getOwner
Description copied from interface:PersistentPropertyObtains the owner of this persistent property.- Specified by:
getOwnerin interfacePersistentProperty- Returns:
- The owner
-
isAssignable
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
-
isAssignable
Description copied from interface:PersistentPropertyIs the property assignable to the given type.- Specified by:
isAssignablein interfacePersistentProperty- Parameters:
type- The type- Returns:
- True it is
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getProperty
- Returns:
- The backing bean property
-
getConverter
- Specified by:
getConverterin interfacePersistentProperty- Returns:
- Returns possible property convertor.
-
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.
-
toString
-