Package io.micronaut.data.model
Class PersistentPropertyPath
- java.lang.Object
-
- io.micronaut.data.model.PersistentPropertyPath
-
- Direct Known Subclasses:
PersistentAssociationPath
public class PersistentPropertyPath extends java.lang.Object
The property path representation.- Since:
- 2.4.0
- Author:
- Denis Stepanov
-
-
Constructor Summary
Constructors Constructor Description PersistentPropertyPath(java.util.List<Association> associations, PersistentProperty property)
Default constructor.PersistentPropertyPath(java.util.List<Association> associations, PersistentProperty property, java.lang.String path)
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<PersistentEntity>
findPropertyOwner()
Find the owner of the possible embedded property.java.lang.String[]
getArrayPath()
java.util.List<Association>
getAssociations()
NamingStrategy
getNamingStrategy()
Get naming strategy for thpe property.java.lang.String
getPath()
PersistentProperty
getProperty()
java.lang.Object
getPropertyValue(java.lang.Object bean)
Gets property path value.static PersistentPropertyPath
of(java.util.List<Association> associations, PersistentProperty property)
CreatesPersistentPropertyPath
orPersistentAssociationPath
.static PersistentPropertyPath
of(java.util.List<Association> associations, PersistentProperty property, java.lang.String path)
CreatesPersistentPropertyPath
orPersistentAssociationPath
.java.lang.Object
setPropertyValue(java.lang.Object bean, java.lang.Object value)
Sets property path value.
-
-
-
Constructor Detail
-
PersistentPropertyPath
public PersistentPropertyPath(java.util.List<Association> associations, @NonNull PersistentProperty property)
Default constructor.- Parameters:
associations
- The associationsproperty
- The property
-
PersistentPropertyPath
public PersistentPropertyPath(java.util.List<Association> associations, @NonNull PersistentProperty property, @Nullable java.lang.String path)
Default constructor.- Parameters:
associations
- The associationsproperty
- The propertypath
- The path
-
-
Method Detail
-
of
public static PersistentPropertyPath of(java.util.List<Association> associations, @NonNull PersistentProperty property)
CreatesPersistentPropertyPath
orPersistentAssociationPath
.- Parameters:
associations
- The associationsproperty
- The property- Returns:
- new instance of
PersistentPropertyPath
orPersistentAssociationPath
-
of
public static PersistentPropertyPath of(java.util.List<Association> associations, @NonNull PersistentProperty property, @Nullable java.lang.String path)
CreatesPersistentPropertyPath
orPersistentAssociationPath
.- Parameters:
associations
- The associationsproperty
- The propertypath
- The path- Returns:
- new instance of
PersistentPropertyPath
orPersistentAssociationPath
-
setPropertyValue
public java.lang.Object setPropertyValue(java.lang.Object bean, java.lang.Object value)
Sets property path value. (Only possible for runtime properties)- Parameters:
bean
- The root beanvalue
- The value- Returns:
- The root bean - possibly modified
-
getPropertyValue
public java.lang.Object getPropertyValue(java.lang.Object bean)
Gets property path value. (Only possible for runtime properties)- Parameters:
bean
- The root bean- Returns:
- The value
-
getAssociations
@NonNull public java.util.List<Association> getAssociations()
- Returns:
- The associations
-
getProperty
@NonNull public PersistentProperty getProperty()
- Returns:
- The property
-
getPath
@NonNull public java.lang.String getPath()
- Returns:
- The path
-
getArrayPath
@NonNull public java.lang.String[] getArrayPath()
- Returns:
- The array path
-
findPropertyOwner
public java.util.Optional<PersistentEntity> findPropertyOwner()
Find the owner of the possible embedded property.- Returns:
- the optional owner
-
getNamingStrategy
public NamingStrategy getNamingStrategy()
Get naming strategy for thpe property.- Returns:
- the naming strategy
-
-