T
- The typepublic class RuntimePersistentEntity<T> extends AbstractPersistentEntity implements PersistentEntity
PersistentEntity
that uses pre-computed Introspected
bean data and is completely stateless.Constructor and Description |
---|
RuntimePersistentEntity(io.micronaut.core.beans.BeanIntrospection<T> introspection)
Default constructor.
|
RuntimePersistentEntity(java.lang.Class<T> type)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAliasName() |
java.util.Collection<RuntimeAssociation<T>> |
getAssociations()
A list of the associations for this entity.
|
PersistentProperty[] |
getCompositeIdentity()
The composite id.
|
RuntimePersistentProperty<T>[] |
getConstructorArguments() |
java.util.Collection<Embedded> |
getEmbedded()
A list of embedded associations for this entity.
|
protected RuntimePersistentEntity<T> |
getEntity(java.lang.Class<T> type)
Obtain an entity for the given type.
|
RuntimePersistentProperty<T> |
getIdentity()
Returns the identity of the instance.
|
io.micronaut.core.beans.BeanIntrospection<T> |
getIntrospection() |
java.lang.String |
getName()
The entity name including any package prefix.
|
PersistentEntity |
getParentEntity()
Returns the parent entity of this entity.
|
java.util.Collection<RuntimePersistentProperty<T>> |
getPersistentProperties()
A list of properties to be persisted.
|
java.util.List<java.lang.String> |
getPersistentPropertyNames()
A list of property names that a persistent.
|
RuntimePersistentProperty<T> |
getPropertyByName(java.lang.String name)
Obtains a PersistentProperty instance by name.
|
RuntimePersistentProperty<T> |
getVersion()
Returns the version property.
|
boolean |
isOwningEntity(PersistentEntity owner)
Returns whether the specified entity asserts ownership over this
entity.
|
equals, getAnnotationMetadata, getNamingStrategy, getPersistedName, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getDecapitalizedName, getNamingStrategy, getPath, getPropertyByPath, getRootEntity, getSimpleName, isEmbeddable, isRoot, isVersioned, of, of
getPersistedName
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
public RuntimePersistentEntity(@NonNull java.lang.Class<T> type)
type
- The typepublic RuntimePersistentEntity(@NonNull io.micronaut.core.beans.BeanIntrospection<T> introspection)
introspection
- The introspection@NonNull public java.lang.String getAliasName()
getAliasName
in interface PersistentEntity
getAliasName
in class AbstractPersistentEntity
public io.micronaut.core.beans.BeanIntrospection<T> getIntrospection()
@NonNull public java.lang.String getName()
PersistentEntity
getName
in interface io.micronaut.core.naming.Named
getName
in interface PersistentEntity
@Nullable public PersistentProperty[] getCompositeIdentity()
PersistentEntity
getCompositeIdentity
in interface PersistentEntity
@Nullable public RuntimePersistentProperty<T> getIdentity()
PersistentEntity
getIdentity
in interface PersistentEntity
@Nullable public RuntimePersistentProperty<T> getVersion()
PersistentEntity
getVersion
in interface PersistentEntity
@NonNull public java.util.Collection<RuntimePersistentProperty<T>> getPersistentProperties()
PersistentEntity
getPersistentProperties
in interface PersistentEntity
@NonNull public java.util.Collection<RuntimeAssociation<T>> getAssociations()
PersistentEntity
PersistentEntity.getPersistentProperties()
getAssociations
in interface PersistentEntity
@NonNull public java.util.Collection<Embedded> getEmbedded()
PersistentEntity
PersistentEntity.getPersistentProperties()
getEmbedded
in interface PersistentEntity
@Nullable public RuntimePersistentProperty<T> getPropertyByName(java.lang.String name)
PersistentEntity
getPropertyByName
in interface PersistentEntity
name
- The name of the property@NonNull public java.util.List<java.lang.String> getPersistentPropertyNames()
PersistentEntity
getPersistentPropertyNames
in interface PersistentEntity
public boolean isOwningEntity(PersistentEntity owner)
PersistentEntity
isOwningEntity
in interface PersistentEntity
owner
- The owning entity@Nullable public PersistentEntity getParentEntity()
PersistentEntity
getParentEntity
in interface PersistentEntity
protected RuntimePersistentEntity<T> getEntity(java.lang.Class<T> type)
type
- The typeio.micronaut.core.beans.exceptions.IntrospectionException
- if the entity doesn't existpublic RuntimePersistentProperty<T>[] getConstructorArguments()