Package io.micronaut.data.model
Class AbstractPersistentEntity
- java.lang.Object
-
- io.micronaut.data.model.AbstractPersistentEntity
-
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider
,io.micronaut.core.annotation.AnnotationSource
,io.micronaut.core.naming.Named
,PersistentElement
,PersistentEntity
- Direct Known Subclasses:
RuntimePersistentEntity
,SourcePersistentEntity
public abstract class AbstractPersistentEntity extends java.lang.Object implements PersistentEntity
Abstract version of thePersistentEntity
interface.- Since:
- 1.0.0
- Author:
- graemerocher
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPersistentEntity(io.micronaut.core.annotation.AnnotationMetadataProvider annotationMetadataProvider)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.Optional<NamingStrategy>
findNamingStrategy()
Find the naming strategy that is defined for the entity.java.lang.String
getAliasName()
io.micronaut.core.annotation.AnnotationMetadata
getAnnotationMetadata()
NamingStrategy
getNamingStrategy()
Obtain the naming strategy for the entity.java.lang.String
getPersistedName()
The persisted name is the fully qualified name including potential schema definitions.int
hashCode()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, 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.PersistentEntity
getAssociations, getCompositeIdentity, getDecapitalizedName, getEmbedded, getIdentity, getIdentityByName, getName, getParentEntity, getPath, getPersistentProperties, getPersistentPropertyNames, getPropertyByName, getPropertyByPath, getPropertyPath, getPropertyPath, getRootEntity, getSimpleName, getVersion, hasCompositeIdentity, hasIdentity, isEmbeddable, isOwningEntity, isRoot, isVersioned
-
-
-
-
Method Detail
-
getAliasName
@NonNull public java.lang.String getAliasName()
- Specified by:
getAliasName
in interfacePersistentEntity
- Returns:
- A name to use when referring to this element via an alias.
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
- Specified by:
getAnnotationMetadata
in interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getNamingStrategy
@NonNull public NamingStrategy getNamingStrategy()
Obtain the naming strategy for the entity.- Specified by:
getNamingStrategy
in interfacePersistentEntity
- Returns:
- The naming strategy
-
findNamingStrategy
@NonNull public java.util.Optional<NamingStrategy> findNamingStrategy()
Description copied from interface:PersistentEntity
Find the naming strategy that is defined for the entity.- Specified by:
findNamingStrategy
in interfacePersistentEntity
- Returns:
- The optional naming strategy
-
getPersistedName
@NonNull public java.lang.String getPersistedName()
Description copied from interface:PersistentElement
The persisted name is the fully qualified name including potential schema definitions.- Specified by:
getPersistedName
in interfacePersistentElement
- Returns:
- The persisted name.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-