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 |
hasAutoPopulatedProperties() |
boolean |
hasPostLoadEventListeners()
Does the entity have post-load event listeners.
|
boolean |
hasPostPersistEventListeners()
Does the entity have post-persist event listeners.
|
boolean |
hasPostRemoveEventListeners()
Does the entity have post-remove event listeners.
|
boolean |
hasPostUpdateEventListeners()
Does the entity have post-update event listeners.
|
boolean |
hasPrePersistEventListeners()
Does the entity have pre-persist event listeners.
|
boolean |
hasPreRemoveEventListeners()
Does the entity have pre-remove event listeners.
|
boolean |
hasPreUpdateEventListeners()
Does the entity have pre-update event listeners.
|
boolean |
isOwningEntity(PersistentEntity owner)
Returns whether the specified entity asserts ownership over this
entity.
|
java.lang.String |
toString() |
equals, getAnnotationMetadata, getNamingStrategy, getPersistedName, hashCode
clone, finalize, getClass, notify, notifyAll, 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 introspectionpublic boolean hasPrePersistEventListeners()
public boolean hasPreRemoveEventListeners()
public boolean hasPreUpdateEventListeners()
public boolean hasPostPersistEventListeners()
public boolean hasPostUpdateEventListeners()
public boolean hasPostRemoveEventListeners()
public boolean hasPostLoadEventListeners()
public java.lang.String toString()
toString
in class java.lang.Object
@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()
public boolean hasAutoPopulatedProperties()