@Internal public class SourcePersistentEntity extends AbstractPersistentEntity implements PersistentEntity, io.micronaut.inject.ast.TypedElement
PersistentEntity
that operates on the sources.Constructor and Description |
---|
SourcePersistentEntity(io.micronaut.inject.ast.ClassElement classElement,
java.util.function.Function<io.micronaut.inject.ast.ClassElement,SourcePersistentEntity> entityResolver)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.inject.ast.ClassElement |
getClassElement() |
SourcePersistentProperty[] |
getCompositeIdentity()
The composite id.
|
SourcePersistentProperty |
getIdentity()
Returns the identity of the instance.
|
SourcePersistentProperty |
getIdentityByName(java.lang.String name)
Obtains an identity PersistentProperty instance by name.
|
SourcePersistentProperty |
getIdOrVersionPropertyByName(java.lang.String name)
Obtains a PersistentProperty representing id or version property by name.
|
java.lang.String |
getName()
The entity name including any package prefix.
|
java.lang.Object |
getNativeType() |
PersistentEntity |
getParentEntity()
Returns the parent entity of this entity.
|
java.util.List<SourcePersistentProperty> |
getPersistentProperties()
A list of properties to be persisted.
|
java.util.List<java.lang.String> |
getPersistentPropertyNames()
A list of property names that a persistent.
|
SourcePersistentProperty |
getPropertyByName(java.lang.String name)
Obtains a PersistentProperty instance by name.
|
java.lang.String |
getSimpleName() |
io.micronaut.inject.ast.ClassElement |
getType() |
SourcePersistentProperty |
getVersion()
Returns the version property.
|
boolean |
hasCompositeIdentity()
Has composite identity.
|
boolean |
hasIdentity()
Has identity.
|
boolean |
isOwningEntity(PersistentEntity owner)
Returns whether the specified entity asserts ownership over this
entity.
|
boolean |
isProtected() |
boolean |
isPublic() |
java.lang.String |
toString() |
equals, findNamingStrategy, getAliasName, getAnnotationMetadata, getNamingStrategy, getPersistedName, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findNamingStrategy, getAliasName, getAssociations, getDecapitalizedName, getEmbedded, getNamingStrategy, getPath, getPropertyByPath, getPropertyPath, getRootEntity, isEmbeddable, isRoot, isVersioned, of, of
getPersistedName
getArrayDimensions, getGenericType, isArray, isPrimitive
annotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
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, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, 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, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
public SourcePersistentEntity(@NonNull io.micronaut.inject.ast.ClassElement classElement, @NonNull java.util.function.Function<io.micronaut.inject.ast.ClassElement,SourcePersistentEntity> entityResolver)
classElement
- The class elemententityResolver
- The entity resolver to resolve any additional entities such as associations@NonNull public java.lang.String getName()
PersistentEntity
getName
in interface io.micronaut.core.naming.Named
getName
in interface PersistentEntity
getName
in interface io.micronaut.inject.ast.Element
public java.lang.String getSimpleName()
getSimpleName
in interface PersistentEntity
getSimpleName
in interface io.micronaut.inject.ast.Element
public boolean isProtected()
isProtected
in interface io.micronaut.inject.ast.Element
public boolean isPublic()
isPublic
in interface io.micronaut.inject.ast.Element
public java.lang.Object getNativeType()
getNativeType
in interface io.micronaut.inject.ast.Element
public boolean hasCompositeIdentity()
PersistentEntity
hasCompositeIdentity
in interface PersistentEntity
public boolean hasIdentity()
PersistentEntity
hasIdentity
in interface PersistentEntity
@Nullable public SourcePersistentProperty[] getCompositeIdentity()
PersistentEntity
getCompositeIdentity
in interface PersistentEntity
@Nullable public SourcePersistentProperty getIdentity()
PersistentEntity
getIdentity
in interface PersistentEntity
@Nullable public SourcePersistentProperty getVersion()
PersistentEntity
getVersion
in interface PersistentEntity
@NonNull public java.util.List<SourcePersistentProperty> getPersistentProperties()
PersistentEntity
getPersistentProperties
in interface PersistentEntity
@Nullable public SourcePersistentProperty getPropertyByName(java.lang.String name)
PersistentEntity
getPropertyByName
in interface PersistentEntity
name
- The name of the property@Nullable public SourcePersistentProperty getIdentityByName(java.lang.String name)
PersistentEntity
getIdentityByName
in interface PersistentEntity
name
- The name of the identity propertypublic SourcePersistentProperty getIdOrVersionPropertyByName(java.lang.String name)
name
- The name of the id or version 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
public io.micronaut.inject.ast.ClassElement getClassElement()
@NonNull public io.micronaut.inject.ast.ClassElement getType()
getType
in interface io.micronaut.inject.ast.TypedElement
public java.lang.String toString()
toString
in class java.lang.Object