Package io.micronaut.data.model.runtime
Class RuntimeAssociation<T>
java.lang.Object
io.micronaut.data.model.runtime.RuntimePersistentProperty<T>
io.micronaut.data.model.runtime.RuntimeAssociation<T>
- Type Parameters:
T
- the owning type
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider
,io.micronaut.core.annotation.AnnotationSource
,io.micronaut.core.naming.Named
,Association
,PersistentElement
,PersistentProperty
A runtime representation of
Association
.- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from class io.micronaut.data.model.runtime.RuntimePersistentProperty
EMPTY_PROPERTY_ARRAY
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Method Summary
Modifier and TypeMethodDescription@NonNull RuntimePersistentEntity<?>
The associated entity if any.Retrieves the inverse side of the association.getKind()
boolean
boolean
Whether a property is required to be specified.Methods inherited from class io.micronaut.data.model.runtime.RuntimePersistentProperty
equals, getAlias, getAnnotationMetadata, getArgument, getConverter, getDataType, getJsonDataType, getName, getOwner, getPersistedName, getProperty, getType, getTypeName, hashCode, isAssignable, isAssignable, isConstructorArgument, isEnum, isOptional, isReadOnly, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
Methods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
Methods inherited from interface io.micronaut.data.model.Association
doesCascade, getCascadeTypes, getInversePathSide, hasDeclaredAliasName, isBidirectional
Methods inherited from interface io.micronaut.data.model.PersistentElement
getPersistedName
Methods inherited from interface io.micronaut.data.model.PersistentProperty
getAlias, getCapitalizedName, getCapitilizedName, getConverter, getDataType, getJsonDataType, getName, getOwner, getTypeName, isAssignable, isAssignable, isAutoPopulated, isConstructorArgument, isEmbedded, isEnum, isGenerated, isOptional, isReadOnly
-
Method Details
-
isForeignKey
public boolean isForeignKey()- Specified by:
isForeignKey
in interfaceAssociation
- Returns:
- Whether the association is a foreign key association
-
getAliasName
- Specified by:
getAliasName
in interfaceAssociation
- Returns:
- The alias name representation.
-
getKind
- Specified by:
getKind
in interfaceAssociation
- Returns:
- The relationship kind
-
isRequired
public boolean isRequired()Description copied from interface:PersistentProperty
Whether a property is required to be specified. This returns false if the property is both not nullable and not generated.- Specified by:
isRequired
in interfacePersistentProperty
- Returns:
- True if the property is required
- See Also:
-
getInverseSide
Description copied from interface:Association
Retrieves the inverse side of the association. If there is one.- Specified by:
getInverseSide
in interfaceAssociation
- Returns:
- The association.
-
getAssociatedEntity
Description copied from interface:Association
The associated entity if any.- Specified by:
getAssociatedEntity
in interfaceAssociation
- Returns:
- The associated entity
-